Wildfly 23->30 CustomLogin

46 views
Skip to first unread message

David Silva

unread,
Jun 17, 2024, 10:27:35 AMJun 17
to WildFly

Im having trouble trying to find a solution more efficient for my project.

 SW: Wildfly 30.0 

I upgraded from wildfly 23 to 30.0 

I was using the picketbox to call a CustomLogin inside my WAR in 23. 

With the upgrade to 30.0 the picketbox became deprecated, so the solution was to implement the CustomLogin With JAAS.

 I configurated the wildfly to use the JAAS with elytron and call a jaas.conf with this configuration:

 psstss { 

core.auth.TssLoginModule required 

}; 

but with my tries i can't access the core.auth.TssLoginModule that inside of my WAR file.

So i implemented a Module for wildfly with the TssLoginModule, the login worked but we have code in the login logic that calls another library that is inside the project.

Then i extracted that library and added was a Module for wildfly too .

I got a "triangle" of dependencies, i created a graphic demonstrating the issue.

Capture.PNG

Its a very hard to update solution when i need to change something in the core lib i need to update in the 3 sides.

There is a better way to implement this?

Prarthona Paul

unread,
Jun 24, 2024, 3:40:17 PM (13 days ago) Jun 24
to WildFly
Hello, 
If you are facing issues with circular dependencies, you may be able to use service loaders to solve this issue. 
https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html

Here is an example of a class that uses a service loader: https://github.com/wildfly-security/wildfly-elytron/blob/2.x/http/oidc/src/main/java/org/wildfly/security/http/oidc/JWTClientCredentialsProvider.java

This class implements the following interface: https://github.com/wildfly-security/wildfly-elytron/blob/f77ddaa8e4b292961e67387c7378f6e0932016b6/http/oidc/src/main/java/org/wildfly/security/http/oidc/ClientCredentialsProvider.java#L29

I hope that answers your question. 

If you need guidance regarding JAAS, you can follow this example: https://github.com/wildfly-security-incubator/elytron-examples/tree/main/jaas-realm

Best, 
Prarthona



Reply all
Reply to author
Forward
0 new messages