Allow extension of RestrictedSecurity profiles #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RestrictedSecurity
profiles sometimes share a lot of duplicate settings with only minor differences. With these changes the extension, similar to object-orientation, of profiles becomes possible.More specifically, a profile
A
can extend another a profileB
, usingRestrictedSecurity.<profile A name>.extends = RestrictedSecurity.<profile B name>
. This allows profileA
to inherit all of profileB
's properties. One can add additional properties to profileA
, or amend some of the existing ones. That includes overriding, appending or removing from a property (wherever that's applicable).An additional property is introduced. The
RestrictedSecurity.<profile name>.desc.hash = <hash algorithm>:<hash>
is used to ensure the profile hasn't been unintentionally altered. The profile's properties are hashed using the selected<hash algorithm>
, and the result is compared to the<hash>
provided through the property. This property is mandatory for base profiles (i.e., profiles that are not extending anything), and optional for the rest.Back-ported from: ibmruntimes/openj9-openjdk-jdk#793
Signed-off by: Kostas Tsiounis [email protected]