0

I am using a WildFly(version - 19) to do file directory listing using below configuration.

<subsystem xmlns="urn:jboss:domain:undertow:10.0">
    ...
    <host name="default-host" alias="localhost">
        <location name="/SoftwareRepository" handler="SoftwareRepo"/>
    </host>
    ...
    <handlers>
        <file name="SoftwareRepo" path = "<Path to Directory>" case-sensitive="false" directory-listing="true"/>
    </handlers>
</subsystem>

This works fine for me and listing the file list for the respective configured path. B

Now, my worry is about authentication. The file directory listing is happening when I access the URL but without any authentication.

How to add any authentication mechanism to do this file handler?

Dhamotharan
  • 1
  • 1
  • 2
  • 1
    The file handler should not be considered something other than a convenience. It certainly isn't meant for production. I'd look to replace this with something else (servlet / jsp, JAX-RS service with a front end, etc) that you can add things like security to. – stdunbar Oct 11 '22 at 20:49
  • @stdunbar do you have an example of an alternative to file handlers that can be put behind an authentication mecanism ? – jhamon Jan 28 '23 at 19:19
  • @jhamon - I don't but it should be easy to do if you keep it simple. The challenge immediately becomes the styling of the site and the usability. For example, how many files do you show? Can you reorder the display by file attributes? How do you manage file system security and not display some data? And so on. Easy to start, hard to finish. – stdunbar Jan 31 '23 at 02:50

0 Answers0