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

[WFCORE-6834] wildfly-elytron-integration jar duplicated in server modules #6014

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

ivassile
Copy link
Contributor

@ivassile ivassile commented May 27, 2024

@github-actions github-actions bot added the deps-ok Dependencies have been checked, and there are no significant changes label May 27, 2024
@wildfly-ci
Copy link

Core -> WildFly Preview Integration Build 13623 outcome was FAILURE using a merge of 28eeaef
Summary: Tests failed: 1 (1 new), passed: 4998, ignored: 84 Build time: 02:59:51

Failed tests

org.jboss.as.test.integration.domain.HostExcludesTestCase.testHostExcludes: java.lang.AssertionError: The following extensions [org.wildfly.extension.elytron.jaas-realm] have been removed on the current release. Remove them on ExtensionConf.CURRENT object defined in this test. The following extensions [] have been added on the current release. Add them to ExtensionConf.CURRENT object defined in this test.
	at org.jboss.as.test.integration.domain.HostExcludesTestCase.testHostExcludes(HostExcludesTestCase.java:377)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
------- Stdout: -------
 [0m21:39:34,087 INFO  [org.jboss.modules] (main) JBoss Modules version 2.1.5.Final
 [0m [0m21:39:34,359 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
 [0m [0m21:39:34,378 INFO  [org.jboss.as.process.Host Controller.status] (main) WFLYPC0018: Starting process 'Host Controller'
 [0m [0m21:39:34,888 INFO  [org.jboss.as.process.Host Controller.system.stdout] (stdout for Host Controller) [Host Controller]  [0m21:39:34,871 INFO  [org.jboss.modules] (main) JBoss Modules version 2.1.5.Final [0m
 [0m[Host Controller]  [0m21:39:35,354 INFO  [org.jboss.msc] (main) JBoss MSC version 1.5.4.Final [0m
[Host Controller]  [0m [0m21:39:35,361 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final [0m
[Host Controller]  [0m [0m21:39:35,407 INFO  [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: WildFly Preview 33.0.0.Beta1-SNAPSHOT (WildFly Core 25.0.0.Beta3-SNAPSHOT) starting [0m
[Host Controller]  [0m [0m21:39:35,876 INFO  [org.wildfly.security] (Controller Boot Thread) ELY00001: WildFly Elytron version 2.4.2.Final [0m
[Host Controller]  [0m [0m21:39:36,267 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0003: Creating http management service using network interface (management) port (9990) securePort (-1) [0m
[Host Controller]  [0m [0m21:39:36,295 INFO  [org.xnio] (MSC service thread 1-7) XNIO version 3.8.14.Final [0m
[Host Controller]  [0m [0m21:39:36,304 INFO  [org.xnio.nio] (MSC service thread 1-7) XNIO NIO Implementation Version 3.8.14.Final [0m
[Host Controller]  [0m [0m21:39:36,367 INFO  [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 5.0.28.Final [0m
[Host Controller]  [0m [0m21:39:37,811 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=default/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. [0m
[Host Controller]  [0m [0m21:39:37,912 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=ha/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. [0m
[Host Controller]  [0m [0m21:39:37,979 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=full/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. [0m
[Host Controller]  [0m [0m21:39:38,017 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=full-ha/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. [0m
[Host Controller]  [0m [0m21:39:38,315 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0062: Http management interface listening on http://127.0.0.1:9990/management and https://127.0.0.1:-1/management [0m
[Host Controller]  [0m [0m21:39:38,315 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0053: Admin console listening on http://127.0.0.1:9990 and https://127.0.0.1:-1 [0m
[Host Controller]  [0m [0m21:39:38,352 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Preview 33.0.0.Beta1-SNAPSHOT (WildFly Core 25.0.0.Beta3-SNAPSHOT) (Host Controller) started in 3857ms - Started 70 of 70 services (13 services are lazy, passive or on-demand) - Host Controller configuration files in use: testing-domain13978425164590584439.xml, testing-host17015774823967676384.xml [0m


@wildfly-ci
Copy link

Core -> Full Integration Build 13824 outcome was FAILURE using a merge of 28eeaef
Summary: Tests failed: 1 (1 new), passed: 6048, ignored: 90 Build time: 03:55:46

Failed tests

org.jboss.as.test.integration.domain.HostExcludesTestCase.testHostExcludes: java.lang.AssertionError: The following extensions [org.wildfly.extension.elytron.jaas-realm] have been removed on the current release. Remove them on ExtensionConf.CURRENT object defined in this test. The following extensions [] have been added on the current release. Add them to ExtensionConf.CURRENT object defined in this test.
	at org.jboss.as.test.integration.domain.HostExcludesTestCase.testHostExcludes(HostExcludesTestCase.java:377)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
------- Stdout: -------
 [0m22:52:20,558 INFO  [org.jboss.modules] (main) JBoss Modules version 2.1.5.Final
 [0m [0m22:52:20,865 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
 [0m [0m22:52:20,877 INFO  [org.jboss.as.process.Host Controller.status] (main) WFLYPC0018: Starting process 'Host Controller'
 [0m [0m22:52:21,383 INFO  [org.jboss.as.process.Host Controller.system.stdout] (stdout for Host Controller) [Host Controller]  [0m22:52:21,355 INFO  [org.jboss.modules] (main) JBoss Modules version 2.1.5.Final [0m
 [0m[Host Controller]  [0m22:52:21,690 INFO  [org.jboss.msc] (main) JBoss MSC version 1.5.4.Final [0m
[Host Controller]  [0m [0m22:52:21,699 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final [0m
[Host Controller]  [0m [0m22:52:21,757 INFO  [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: WildFly Full 33.0.0.Beta1-SNAPSHOT (WildFly Core 25.0.0.Beta3-SNAPSHOT) starting [0m
[Host Controller]  [0m [0m22:52:22,256 INFO  [org.wildfly.security] (Controller Boot Thread) ELY00001: WildFly Elytron version 2.4.2.Final [0m
[Host Controller]  [0m [0m22:52:22,760 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0003: Creating http management service using network interface (management) port (9990) securePort (-1) [0m
[Host Controller]  [0m [0m22:52:22,782 INFO  [org.xnio] (MSC service thread 1-8) XNIO version 3.8.14.Final [0m
[Host Controller]  [0m [0m22:52:22,789 INFO  [org.xnio.nio] (MSC service thread 1-8) XNIO NIO Implementation Version 3.8.14.Final [0m
[Host Controller]  [0m [0m22:52:22,858 INFO  [org.jboss.remoting] (MSC service thread 1-7) JBoss Remoting version 5.0.28.Final [0m
[Host Controller]  [0m [0m22:52:24,415 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=default/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. [0m
[Host Controller]  [0m [0m22:52:24,530 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=ha/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. [0m
[Host Controller]  [0m [0m22:52:24,588 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=full/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. [0m
[Host Controller]  [0m [0m22:52:24,659 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=full-ha/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. [0m
[Host Controller]  [0m [0m22:52:24,921 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0062: Http management interface listening on http://[::1]:9990/management and https://[::1]:-1/management [0m
[Host Controller]  [0m [0m22:52:24,922 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0053: Admin console listening on http://[::1]:9990 and https://[::1]:-1 [0m
[Host Controller]  [0m [0m22:52:24,978 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 33.0.0.Beta1-SNAPSHOT (WildFly Core 25.0.0.Beta3-SNAPSHOT) (Host Controller) started in 4001ms - Started 70 of 70 services (13 services are lazy, passive or on-demand) - Host Controller configuration files in use: testing-domain148641253502868097.xml, testing-host11360403851047435706.xml [0m


@soul2zimate
Copy link
Contributor

@ivassile The failure seems related

org.jboss.as.test.integration.domain.HostExcludesTestCase
testHostExcludes
Stacktrace
java.lang.AssertionError: The following extensions [org.wildfly.extension.elytron.jaas-realm] have been removed on the current release. Remove them on ExtensionConf.CURRENT object defined in this test. The following extensions [] have been added on the current release. Add them to ExtensionConf.CURRENT object defined in this test.
  at org.junit.Assert.fail(Assert.java:89)

@ivassile
Copy link
Contributor Author

@ivassile The failure seems related

org.jboss.as.test.integration.domain.HostExcludesTestCase
testHostExcludes
Stacktrace
java.lang.AssertionError: The following extensions [org.wildfly.extension.elytron.jaas-realm] have been removed on the current release. Remove them on ExtensionConf.CURRENT object defined in this test. The following extensions [] have been added on the current release. Add them to ExtensionConf.CURRENT object defined in this test.
  at org.junit.Assert.fail(Assert.java:89)

Yes. I'm aware that we probably need changes in WF. Since I don't know all the detailed requirements for the original implementation which causes this issue, I asked @fjuma to review and provide feedback on the changes we need.

Copy link
Collaborator

@yersan yersan left a comment

Choose a reason for hiding this comment

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

Looking at this case, I realised that org.wildfly.extension.elytron.jaas-realm is not really an extension, it is just a JBoss Modules module that exposes org/wildfly/extension/elytron/JaasCustomSecurityRealmWrapper.

My naive understanding of why it was implemented this way is that Elytron expects the use of a JBoss Modules module to create a custom realm. @fjuma, correct me if I am wrong here.

In such a case, it seems that naming it starting with org.wildfly.extension. was not correct at all, as it makes it to look like a regular WildFly extension instead of a login module that can be used to provide a custom realm. @fjuma, are there any other reasons for naming it with the org.wildfly.extension. prefix? Is there a requirement that forces us to keep the elytron integration artifact as a resource instead of a dependency?

@ivassile In any case, org.wildfly.extension.elytron.jaas-realm is not an extension so we should remove it from HostExcludesTestCase and host exclusions. HostExcludesTestCase could be adapted to understand more these cases since what it does is to search for JBoss Modules modules that supplies a META-INF/services/org.jboss.as.controller.Extension resource. It assumes if a JBoss Modules module supplies this resource, then the module is supplying an extension, but that's not the case for org.wildfly.extension.elytron.jaas-realm module.

I've just opened https://issues.redhat.com/browse/WFLY-19378 to adress this.

@ivassile
Copy link
Contributor Author

ivassile commented Jun 4, 2024

@fjuma The jbeap issue is on EAP 8 Update 3 payload. Can you please review this PR and comment on the @yersan questions? Thanks!

@bstansberry
Copy link
Contributor

@yersan @ivassile @fjuma The org.wildfly.extension.elytron.jaas-realm module is jboss.api=deprecated, which means we are a long time away from being able to rename it. So, while I agree that the name is unfortunate and it would be nice to rename it, I think the best we can do is make sure there's an issue to eventually remove the module, and even having that JIRA shouldn't block getting any fix done.

Removing and renaming are both breaking changes so there's not much point doing two breaking changes when one will suffice.

@yersan
Copy link
Collaborator

yersan commented Jun 13, 2024

@bstansberry @fjuma @ivassile
I've added https://issues.redhat.com/browse/WFCORE-6852 to track such a removal.

Looking at this case, I realized that org.wildfly.extension.elytron.jaas-realm is not really an extension, it is just a JBoss Modules module that exposes org/wildfly/extension/elytron/JaasCustomSecurityRealmWrapper.

I also want to correct this, I missinterpreted it. This module is not just exporting the org/wildfly/extension/elytron/JaasCustomSecurityRealmWrapper (there is an exclude). It looks like this configuration is exporting everything under org.wildfly.core:wildfly-elytron-integration except the JaasCustomSecurityRealmWrapper resource. I've asked about it in Zulip to be sure that's the case.

If this is correct, I'm wondering if the correct approach would be to also export the moved resource as a dependency and add a filter to that dependency that excludes the aforementioned resource.

@yersan yersan added the 25.x label Jul 8, 2024
@@ -48,5 +44,6 @@
<module name="org.jboss.logmanager"/>
<module name="org.wildfly.common"/>
<module name="org.wildfly.security.elytron-private" export="true"/>
<module name="org.wildfly.extension.elytron"/>
Copy link
Collaborator

@yersan yersan Jul 8, 2024

Choose a reason for hiding this comment

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

The most equivalent configuration would be by re-exporting org.wildfly.extension.elytron from this module. We would like to limit it to the org.wildfly.extension.elytron package only, so use the following:

        <module name="org.wildfly.extension.elytron" export="true">
            <exports>
                <exclude path="org/wildfly/extension/elytron/*"/>
            </exports>
        </module>

@@ -33,10 +33,6 @@
<exclude path="org/wildfly/extension/elytron/JaasCustomSecurityRealmWrapper"/>
</exports>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This export was not excluding JaasCustomSecurityRealmWrapper as seems to be the intention, exports/exclude works only with paths and not with specific class resources, but JaasCustomSecurityRealmWrapper is not under a specific package so we cannot easily exclude it from this module export. We can safely remove it from here.

@yersan
Copy link
Collaborator

yersan commented Jul 8, 2024

Hello @ivassile FYI, take a look at Zulip where we have been discussing these points

@yersan yersan merged commit 28eeaef into wildfly:main Jul 12, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
25.x deps-ok Dependencies have been checked, and there are no significant changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants