A JNDI ObjectFactory for a PolicyRegistration.
A JNDI ObjectFactory for a PolicyRegistration. This is a work around for SECURITY-864.
This uses deprecated API that is likely going away with Elytron.
Two classes are offered
PolicyRegistration
is not needed but a lookup happens anyway.You need to create a JBoss module
${JBOSS_HOME}/modules/system/layers/base/com/github/marschall/policyregistrationfactory/main
folder (or whatever your distribution layer is)For EmptyPolicyRegistrationObjectFactory
add the following to your server configuration (eg. standalone.xml
)
<subsystem xmlns="urn:jboss:domain:naming:2.0">
<bindings>
<object-factory
name="java:/policyRegistration"
module="com.github.marschall.policyregistrationfactory"
class="com.github.marschall.policyregistrationfactory.EmptyPolicyRegistrationObjectFactory"></object-factory>
</bindings>
</subsystem>
For JBossPolicyRegistrationObjectFactory
add the following to your server configuration (eg. standalone.xml
)
<subsystem xmlns="urn:jboss:domain:naming:2.0">
<bindings>
<object-factory
name="java:/policyRegistration"
module="com.github.marschall.policyregistrationfactory"
class="com.github.marschall.policyregistrationfactory.JBossPolicyRegistrationObjectFactory"></object-factory>
</bindings>
</subsystem>