In Java EE some servers unfortunately require a vendor specific group to role mapping for the security configuration. For these servers, such mapping is mandatory even when there really is nothing to map.
Unfortunately, IBM Liberty is such a server. It requires a mapping in a file called ibm-application-bnd.xml
, that one is supposed to put inside an EAR's META-INF/ folder. For example:
<?xml version="1.0" encoding="UTF-8"?>
<application-bnd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-application-bnd_1_2.xsd"
xmlns="http://websphere.ibm.com/xml/ns/javaee"
version="1.2">
<security-role name="architect">
<group name="architect" />
</security-role>
</application-bnd>
Even more unfortunate is that seemingly this file can only be used from an EAR.
How can group to role mapping be specified from within the application archive when using a WAR with Liberty?
(solutions that require me to change anything inside the server, or interact with any kind of console or graphical admin interface are unfortunately not usable for me)