Hi,
Has anybody used Wildfly/undertow to provide access to static folders for only authorised users?
My use case is that I have web content that I would like to service via Wildfly for only authorised users. Following is what I was able to get it.
In the standalone.xml file, I added the following config.
<server name="default-server">
<http-listener name="default" socket-binding="http"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<location name="/img" handler="images">
<filter-ref name="my-auth"/>
</location>
</host>
</server>
<handlers>
<basic-auth name="my-auth" security-domain="other"/>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content" directory-listing="true"/>
<file name="images" path="/var/images" directory-listing="true"/>
</handlers>
Note that I have my security-domain configured under the security domains subsystem config section.
The problem I am having is when I start Wildfly, I get the following error.
Caused by: java.lang.RuntimeException: JBAS017346: Could not construct handler for class: class io.undertow.security.handlers.AuthenticationCallHandler. with parameters {"security-domain" => "other"}
Can anyone let me know what I maybe doing wrong here.