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

Allow extension of RestrictedSecurity profiles #2

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

KostasTsiounis
Copy link
Contributor

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 profile B, using RestrictedSecurity.<profile A name>.extends = RestrictedSecurity.<profile B name>. This allows profile A to inherit all of profile B's properties. One can add additional properties to profile A, 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 kostas.tsiounis@ibm.com

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 profile B, using
RestrictedSecurity.<profile A name>.extends =
RestrictedSecurity.<profile B name>. This allows profile A to inherit
all of profile B's properties. One can add additional properties to
profile A, 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.

Signed-off-by: Kostas Tsiounis <kostas.tsiounis@ibm.com>
@KostasTsiounis
Copy link
Contributor Author

FYI @keithc-ca

@keithc-ca keithc-ca self-requested a review June 20, 2024 17:53
@keithc-ca
Copy link
Member

Jenkins copyright check

@keithc-ca
Copy link
Member

Jenkins test sanity alinux jdk23

@keithc-ca keithc-ca merged commit a3d4e12 into ibmruntimes:openj9 Jun 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants