-
Notifications
You must be signed in to change notification settings - Fork 87
Implement sunset policy handling with suppress and ignore options #1125
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
Conversation
1bdc977 to
a10a032
Compare
|
@keithc-ca Any review suggestions for this PR? |
|
Sorry, I have been very busy. I may not get to this today. One of the things I noted, though, was the time to sunset is truncated down to a number of months, so it will complain (almost) a month sooner than it should. |
8ffcea3 to
7859198
Compare
I updated the code to round up the returned month count. For example, if there are 6 months + 29 days remaining, it will now return 7 instead of the previous 6. |
41e018f to
309ed51
Compare
|
@keithc-ca Any review suggestions for this PR? We’re aiming to include it in the January release. |
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
10a223e to
7faaf30
Compare
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
410a3b9 to
dbb0f36
Compare
|
Please update the commit message; the summary (first) line should be no more than 70 characters long. |
dbb0f36 to
af30946
Compare
Updated. |
|
As I was reading the updated commit message, two things occur to me:
|
|
More concretely, I was thinking something like this: if ("ignore".equals(sunsetPolicy)) {
return;
}
int expireMonths = monthsToPolicySunset(restricts.descSunsetDate);
if (expireMonths <= 0) { // SunsetDate is in the past.
if ("quiet".equals(sunsetPolicy)) {
System.exit(1);
}
printStackTraceAndExit("The requested restricted security profile " + restricts.profileID
+ " expired on " + restricts.descSunsetDate
+ ": java will stop because certified cryptography use cannot be guaranteed."
+ " Use -Dsemeru.restrictedsecurity.sunsetpolicy=quiet to stop displaying this message."
+ " Use the -Dsemeru.restrictedsecurity.sunsetpolicy=ignore to allow java to start while"
+ " possibly using uncertified cryptography.");
} else if ((expireMonths <= 6) && !"quiet".equals(sunsetPolicy)) {
System.err.println("The restricted security profile " + restricts.profileID
+ " will expire on " + restricts.descSunsetDate
+ ", after which java will fail to start if this profile is specified."
+ " The latest Semeru Runtimes release may include an updated security profile.");
} |
e656f27 to
3229c52
Compare
|
For the comment:
I have updated the code so that specifying only: For the suggestion:
According to the design document @jasonkatonica FYI. |
d9df894 to
c1a78b7
Compare
keithc-ca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also rebase to avoid implicit merges
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
d2de6e7 to
c8e70fc
Compare
Rebased and squashed. |
4b14254 to
bfc2005
Compare
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
d7fbec4 to
8689a64
Compare
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java
Outdated
Show resolved
Hide resolved
f1a4e3a to
3d470d7
Compare
|
Jenkins test sanity amac jdknext |
|
Reopened eclipse-openj9/openj9#21732 for the test failure. |
|
Grinder https://openj9-jenkins.osuosl.org/job/Grinder/4854 failed. |
e7505b3 to
2d8a702
Compare
Updated TestProperties.java to skip the property-list test when OpenJCEPlusFIPS is not available. |
68fda6d to
9af7539
Compare
Added logic to handle restricted security profile sunset behavior using -Dsemeru.restrictedsecurity.suppresssunsetwarning and -Dsemeru.restrictedsecurity.ignoresunsetexpiration system properties. When suppresssunsetwarning is true, all sunset warning messages are suppressed; if the profile is expired and ignoresunsetexpiration is false, the JVM exits silently with status 1. When suppresssunsetwarning is false. If the profile has expired and ignoresunsetexpiration is false, a fatal error is printed and the JVM terminates. If expired and ignoresunsetexpiration is true, a warning message is printed indicating uncertified cryptography may be active. If the profile will expire within six months, a generic warning message is printed. Signed-off-by: Tao Liu <[email protected]>
a4478ea to
477bbee
Compare
|
Only the test has changed since the previous build; it passed in https://openj9-jenkins.osuosl.org/job/Grinder/4857. |
Added logic to handle restricted security profile sunset behavior using -Dsemeru.restrictedsecurity.suppresssunsetwarning and -Dsemeru.restrictedsecurity.ignoresunsetexpiration system properties.
When suppresssunsetwarning is true, all sunset warning messages are suppressed; if the profile is expired and
ignoresunsetexpiration is false, the JVM exits silently with status 1.
When suppresssunsetwarning is false. If the profile has expired and ignoresunsetexpiration is false, a fatal error is printed and the JVM terminates. If expired and ignoresunsetexpiration is true, a warning message is printed indicating uncertified cryptography may be active. If the profile will expire within six months, a generic warning message is printed.