-
Notifications
You must be signed in to change notification settings - Fork 259
Open
Description
Right now, Policy imports work in a way, that Policy entries from an imported policy are effectively "copied".
There is no possibility to customise an imported policy entry, concretising the "subjects" for which the entry shall be applied.
There are however use cases where this would be very useful, e.g. in order to import the resources part of a policy entry but define the subjects to be applied to this entry in the importing policy.
Example:
{
"policyId": "org.eclipse.ditto:root-policy",
"entries": {
"operator": {
"subjects": {
},
"resources": {
"thing:/": {
"grant": ["READ","WRITE"],
"revoke": []
}
},
"importable": "explicit-additional-subjects" // we could also do "implicit-additional-subjects"
}
}
}The importing policy could then import the explicit policy entry as:
{
"policyId": "org.eclipse.ditto:operator-policy",
"imports": {
"org.eclipse.ditto:root-policy" : {
"entries": [ "operator" ],
"subjects": {
"idp:some-group": {
"type": "Some group as defined in an IdP"
}
}
}
}
}Or the implicit policy entry as:
{
"policyId": "org.eclipse.ditto:operator-policy",
"imports": {
"org.eclipse.ditto:root-policy" : {
"subjects": {
"idp:some-group": {
"type": "Some group as defined in an IdP"
}
}
}
}
}The idea would be that this "merges" the subjects from the imported policy (if there are any) with the ones from the importing policy.
Metadata
Metadata
Assignees
Labels
No labels