-
Notifications
You must be signed in to change notification settings - Fork 465
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
[WFCORE-6411] Make it possible to use JaasSecurityRealm via a custom-realm resource #5587
Conversation
20e5f0e
to
7ea6ab5
Compare
...ytron/src/test/java/org/wildfly/test/security/common/elytron/JaasCustomRealmWrapperTest.java
Show resolved
Hide resolved
...ytron/src/test/java/org/wildfly/test/security/common/elytron/JaasCustomRealmWrapperTest.java
Show resolved
Hide resolved
File jarFile = new File(tmpDir.getRoot(), "testJaasCustomRealm.jar"); | ||
jar.as(ZipExporter.class).exportTo(jarFile, true); | ||
CLIWrapper cli = new CLIWrapper(true); | ||
cli.sendLine("module add --name=" + "jaasWrapperModule " + " --resources=" + TestSuiteEnvironment.getSystemProperty("jboss.dist", null) + "/modules/system/layers/base/org/wildfly/extension/elytron " + " --dependencies=org.wildfly.extension.elytron,org.wildfly.security.elytron"); |
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.
"module add --name=" + "jaasWrapperModule " + " --resources="
-> "module add --name=jaasWrapperModule --resources="
?
"/modules/system/layers/base/org/wildfly/extension/elytron " + " --dependencies=org.wildfly.extension.elytron,org.wildfly.security.elytron"
-> "/modules/system/layers/base/org/wildfly/extension/elytron --dependencies=org.wildfly.extension.elytron,org.wildfly.security.elytron"
?
jar.as(ZipExporter.class).exportTo(jarFile, true); | ||
CLIWrapper cli = new CLIWrapper(true); | ||
cli.sendLine("module add --name=" + "jaasWrapperModule " + " --resources=" + TestSuiteEnvironment.getSystemProperty("jboss.dist", null) + "/modules/system/layers/base/org/wildfly/extension/elytron " + " --dependencies=org.wildfly.extension.elytron,org.wildfly.security.elytron"); | ||
cli.sendLine("module add --name=" + "jaasLoginModule " + " --resources=" + jarFile.getAbsolutePath() + " --dependencies=org.wildfly.security.elytron"); |
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.
"module add --name=" + "jaasLoginModule " + " --resources="
-> "module add --name=jaasLoginModule --resources="
?
@AfterClass | ||
public static void cleanUp() throws Exception { | ||
CLIWrapper cli = new CLIWrapper(true); | ||
cli.sendLine("module remove --name=" + "jaasWrapperModule"); |
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.
"module remove --name=" + "jaasWrapperModule"
-> "module remove --name=jaasWrapperModule"
?
And the same for the next line.
@@ -0,0 +1,6 @@ | |||
Entry1 { | |||
org.wildfly.security.auth.TestLoginModule required; |
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.
org.wildfly.security.auth
It seems the content of this config file is not used as the module is in a different package.
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.
Just a minor note, I understand this PR will need to add the required transformers and bump the Elytron model.
And one suggestion, if it is in progress, you can use a draft to express the current PR status/intention, Jobs are also executed on Draft PRs.
8d70ddd
to
6fac6ad
Compare
Hi @yersan , actually this PR does not introduce any new elements to the schema so it does not need the transformers or elytron bump model. This feature is to allow users to use a code via a resource that is available in older versions. This is done so that older versions of the server can use this code when it is backported, without making changes to the model. It is not a draft anymore, though now I am having issues with the galleon and bootable-jar profiles that I need to figure out |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
1b975a2
to
18e516f
Compare
Yes, we have already bumped the WildFly Core Kernel version but we have not released it so the WildFly 31 exclusion is not yet available on WildFly Full. |
a5ce76c
to
f9801fa
Compare
@yersan I have rebased this PR and created a combined WFLY PR here: wildfly/wildfly#17622 . The combined PR also contains a commit for https://issues.redhat.com/browse/WFLY-19030 , I hope that is correct. Thanks again! |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@Skyllarr this got a conflict, could you take a look and rebase it again? thanks |
f9801fa
to
3cc35f9
Compare
@yersan This is now rebased |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
https://ci.wildfly.org/buildConfiguration/WF_WildFlyCoreIntegrationExperiments/417090 (Linux integration) After rebasing, the Galleon integration job has failed twice. It needs some investigation. |
Hm there was a change in wildfly repo also: https://github.com/wildfly/wildfly/pull/17618/files where the |
@Skyllarr for those two, we could have your wildfly PR rebased on top of main. I don't have any clue about the other two yet. |
I can reproduce the failure in wildfly repo on my branch even after rebasing, so looking |
3cc35f9
to
bb0806b
Compare
@yersan I've rebased and updated this branc hand the wildfly branch wildfly/wildfly#17622 . The LayersTestCase in wildfly-core and wildfly are now passing locally for me with |
<dependencies> | ||
<module name="java.logging"/> | ||
<module name="java.xml"/> | ||
<module name="javax.xml.stream.api"/> |
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.
The javax.xml.stream.api
is deprecated and should not be used here. According to the note on this module:
Lines 8 to 11 in cdadfc5
<!-- | |
This module is deprecated and any use of it should be replaced | |
with java.xml JPMS module provided by Java SE. | |
--> |
it should be replaced by java.xml
, which is already in the org.wildfly.extension.elytron.jaas-realm
dependency list.
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.
@@ -31,6 +31,7 @@ public class LayersTestCase { | |||
// This is the expected set of un-referenced modules found when scanning | |||
// the test-standalone-reference configuration. | |||
private static final String[] NOT_REFERENCED = { | |||
"javax.xml.stream.api", |
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.
The usage of this module is unexpected. This change can be removed by removing the javax.xml.stream.api
dependency from org.wildfly.extension.elytron.jaas-realm
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.
Removed in #5861
Core -> WildFly Preview Integration Build 13302 outcome was UNKNOWN using a merge of bb0806b |
Core -> Full Integration Build 13479 outcome was UNKNOWN using a merge of bb0806b |
Core -> Full Integration Build 13239 outcome was UNKNOWN using a merge of bb0806b |
https://issues.redhat.com/browse/WFCORE-6411
Related PR for wildfly repo : wildfly/wildfly#17077