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

Update RestrictedSecurity flags, alter debug comments and profile name #701

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

KostasTsiounis
Copy link
Contributor

The original flag to enable FIPS (i.e., -Dsemeru.fips=true) remains the same, but the one allowing a user to set a custom profile is changed to -Dsemeru.customprofile=<profile.version>.

The debug messages have been altered a bit to only be enabled using the already known and used by similar components -Djava.security.auth.debug flag. The information for available profiles, as well as the profile used in the particular run, is printed as part of the debug messages, instead of specifying additional properties in the custom profile flag.

Further checks are added to ensure solutions are supported in the running platform and the profile is marked as FIPS compliant.

The flag for the custom profile allows the user to either specify the full name of the profile to be used (e.g., -Dsemeru.customprofile=NSS.FIPS140-2), or specify the solution to be used (e.g., -Dsemeru.customprofile=NSS) and allow RestrictedSecurity to pick the default profile for that.

The naming of profiles has, also, been altered to abide by the <solution.version> template (e.g., NSS.FIPS140-2), instead of an integer.

Signed-off by: Kostas Tsiounis kostas.tsiounis@ibm.com

@pshipton pshipton self-requested a review November 27, 2023 22:36
+ selectedProfile);
}
for (Object keyObject : props.keySet()) {
// A matching property is found.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment doesn't seem appropriate here. I don't think it's needed at all. Same in the else case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I restructured the check for the property there and updated the comment to match it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The else case looks good now, but this comment in this place doesn't make sense to me. Maybe if you rewrote it. The next line is checking if the key is a String. The code seem readable enough without any comment here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's about the if that comes after, so I can put it below that. I can also remove it altogether though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with it removed, or if it's closer to the if that it's referring to.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You seem to have removed a comment from the else case, but the comment on line 295 which I was discussing is still there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your updated comment in the else case was fine, up to you if you want to put it back.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine as it is now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you going to remove the comment on line 296?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Done.

@pshipton
Copy link
Member

There is a merge conflict now that needs to be resolved.

@KostasTsiounis
Copy link
Contributor Author

Resolved merge conflict.

@pshipton
Copy link
Member

jenkins compile amac jdknext

@KostasTsiounis
Copy link
Contributor Author

@pshipton I added a commit and it stopped the build. Should we restart it?

@pshipton
Copy link
Member

If all you did was remove the comment, we don't need to rerun the build. Do you need to run any testing on the latest changes? Otherwise I'll go ahead and merge it and you can start backporting.

@KostasTsiounis
Copy link
Contributor Author

No, nothing functional was changed so we should be fine.

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.

2 participants