Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for fields specified during api call when applying templates #172

Closed
havetisyan opened this issue Jul 17, 2017 · 0 comments
Closed

Comments

@havetisyan
Copy link
Collaborator

Currently templates are static set of roles and policies - the only variable being the domain name. The requirement from MH2 is to allow dynamic variables defined in the template where the caller can specify what those values should be.

We currently have domain which is replaced with the actual domain name. Now, we can additional variables into the template - e.g:

{code}
"paas_assertions": {
"policies": [
{
"name": "domain:policy._app__deploy",
"modified": "1970-01-01T00:00:00.000Z",
"assertions": [
{
"resource": "domain:daemon.service",
"role": "domain:role._app__deployer",
"action": "update”
}
]
}
]
}
{code}

So in this template we have three variables:

domain - user has no control over this one
service - service name
app - application name

So then zms-cli (which also needs to be updated along with the RDL,etc) will execute the following command:

zms-cli -d sports.site add-template paas_assertions app=api service=storage

Requirements:

  1. The rules/policies that the templates will generate will be unique - you can't get the same role/policy name from different templates
havetisyan added a commit that referenced this issue Jul 18, 2017
#172 Dynamic field support in templates
WindzCUHK pushed a commit to WindzCUHK/athenz that referenced this issue Nov 12, 2019
AthenZ#172 Dynamic field support in templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant