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

[RHPAM-4714] wildfly-elytron as provided #2961

Merged
merged 3 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@
<artifactId>simpleclient_httpserver</artifactId>
</dependency>

<!-- Test - Wildfly Elytron -->
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-auth-server</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron</artifactId>
<scope>provided</scope>
Copy link
Contributor

Choose a reason for hiding this comment

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

This works only for EAP.
For Tomcat and others this approach produce ClassNotFoundException because SecurityDomain is expected to be on classpath according to current implementation - https://github.com/kiegroup/droolsjbpm-integration/blob/main/kie-server-parent/kie-server-services/kie-server-services-common/src/main/java/org/kie/server/services/impl/security/ElytronIdentityProvider.java#L33

So either the code should handle the case if SecurityDomain is not on classpath or wildfly-elytron-auth-server needs to be bundled to war files for all application servers.

Copy link
Member Author

Choose a reason for hiding this comment

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

we could try something like that:

    <dependency>
      <groupId>org.wildfly.security</groupId>
      <artifactId>wildfly-elytron</artifactId>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>org.wildfly.security</groupId>
          <artifactId>wildfly-elytron-auth-server</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.wildfly.security</groupId>
      <artifactId>wildfly-elytron-auth-server</artifactId>
    </dependency>

In this way wildfly-elytron-auth-server should be bundled to war files for all application servers, wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

i think we need to differentiate then different AS platforms as it should be anyway better
so to have tomcat and similar deployment profile/tests

Copy link
Member Author

Choose a reason for hiding this comment

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

I see there is already a wildfly profile, we could add wildfly-elytron-auth-server only if wildfly profile is not enabled - but I don't know exactly the purpose of that profile though

Copy link
Member Author

@lampajr lampajr May 24, 2023

Choose a reason for hiding this comment

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

or even add something like that for tomcat, which follows the same approach I see in the whole project:

  <profiles>
    <profile>
      <id>tomcat9</id>
      <activation>
        <property>
          <name>container.profile</name>
          <value>tomcat9</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.wildfly.security</groupId>
          <artifactId>wildfly-elytron-auth-server</artifactId>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

Copy link
Member

Choose a reason for hiding this comment

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

that's great, thanks @lampajr !

</dependency>

<!-- security -->
Expand Down Expand Up @@ -214,4 +215,21 @@

</dependencies>

<profiles>
<profile>
<id>tomcat9</id>
<activation>
<property>
<name>container.profile</name>
<value>tomcat9</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-auth-server</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,13 @@
<artifactId>jakarta.json-api</artifactId>
<scope>test</scope>
</dependency>

<!-- Test - Wildfly Elytron -->
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-auth-server</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@
<artifactId>wildfly-client-config</artifactId>
<scope>test</scope>
</dependency>

<!-- Test - Wildfly Elytron -->
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-auth-server</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@
<artifactId>toxiproxy</artifactId>
<scope>test</scope>
</dependency>

<!-- Test - Wildfly Elytron -->
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-auth-server</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>

<!-- Test - Wildfly Elytron -->
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-auth-server</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down