Wildfly 24 - can someone help my to create a file realm?

175 views
Skip to first unread message

Ralph Soika

unread,
Jul 4, 2021, 5:50:14 AM7/4/21
to WildFly

Hi,

I am now struggling several days creating a simple file realm in Wildfly 24 to test my existing jakarta application. To be honest, I did not care about the Elytron framework through the last releases and used always the 'old'  security domain like this:

<security-domain name="imixsrealm">
<authentication>
<login-module code="UsersRoles" flag="required">
<module-option name="usersProperties" value="${jboss.server.config.dir}/sampleapp-users.properties"/>
<module-option name="rolesProperties" value="${jboss.server.config.dir}/sampleapp-roles.properties"/>
</login-module>
<login-module code="RoleMapping" flag="required">
<module-option name="rolesProperties" value="file:${jboss.server.config.dir}/imixsrealm.properties"/>
<module-option name="replaceRole" value="false"/>
</login-module>
</authentication>
</security-domain>

I understand that this is no longer working / or should not be used in Wildfly 24.

My application expects a realm with the name 'imixsrealm'. This application is interoperable on different application severs. So I can not change the realm name to the wildfly default 'ApplicationRealm'


First I thought I would be able to configure this in the standalone.xml file directly because we use Docker to start the application. But I had no success.

So I installed a  plain wildfly 24 server with the management web console and tried to configure this through the browser.

But always when  I use the CLI tool 'bin/add-user.sh' I will never be asked to place the user into my new realm / properties files. This command seems to be only able to add users into the application-users.properties.

I thought I have enough experience with Wildfly as I worked with the server since version 1. But at the moment I am totally lost and feel like a newbie. 

Please can some one give me an example how to configure a simple file realm in Wildfly 24 with the name 'imixsrealm' that is used in my web application?



Ralph Soika

unread,
Jul 4, 2021, 10:10:01 AM7/4/21
to WildFly
Finally I succeeded. I wrote a short blog about that journey ;-)

Reply all
Reply to author
Forward
0 new messages