I have a docker image of a websphere liberty based application. By default, this image uses Basic Authentication with a basicRegistry that has a couple sample users. The basicRegistry group is then bound to a security-role as follows (and this security role is referenced from the application's web.xml):
<webApplication id="myWebapp" ...>
<application-bnd>
<security-role name="Users">
<group name="Users"/>
</security-role>
</application-bnd>
</webApplication>
Now, in my environment, authentication will be handled outside of this container, and so I want to disable the basic auth check and make this open to everyone that can get to it. Rather than repackaging the whole server.xml, I was hoping to just add some configuration to configDropins/override in order to disable authentication for the webapp.
After trying it, I'm rather confused about whether/how this is supposed to work... Here is the observated behavior:
If I first start the server, then add a config snippet to configDropins/override such as the following:
<webApplication id="myWebapp">
<application-bnd>
<security-role name="Users">
<special-subject type="EVERYONE"/>
</security-role>
</application-bnd>
</webApplication>
Then the webapp will reload and basic auth is turned off (good).
However, when I package this same config snippet in configDropins/override and then start the server, the webapp starts up with basic auth enabled and all requests fail with an HTTP 401 status.
Can anyone help me understand this behavior and/or offer an alternative approach?