PolicyRegistrationFactory

A JNDI ObjectFactory for a JBossPolicyRegistration.

License

License

MIT
GroupId

GroupId

com.github.marschall
ArtifactId

ArtifactId

policy-registration-factory
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

PolicyRegistrationFactory
A JNDI ObjectFactory for a JBossPolicyRegistration.
Project URL

Project URL

https://github.com/marschall/policy-registration-factory
Source Code Management

Source Code Management

https://github.com/marschall/policy-registration-factory

Download policy-registration-factory

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.marschall/policy-registration-factory/ -->
<dependency>
    <groupId>com.github.marschall</groupId>
    <artifactId>policy-registration-factory</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.marschall/policy-registration-factory/
implementation 'com.github.marschall:policy-registration-factory:0.2.0'
// https://jarcasting.com/artifacts/com.github.marschall/policy-registration-factory/
implementation ("com.github.marschall:policy-registration-factory:0.2.0")
'com.github.marschall:policy-registration-factory:jar:0.2.0'
<dependency org="com.github.marschall" name="policy-registration-factory" rev="0.2.0">
  <artifact name="policy-registration-factory" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.marschall', module='policy-registration-factory', version='0.2.0')
)
libraryDependencies += "com.github.marschall" % "policy-registration-factory" % "0.2.0"
[com.github.marschall/policy-registration-factory "0.2.0"]

Dependencies

provided (1)

Group / Artifact Type Version
org.picketbox : jbosssx-bare jar 4.9.6.Final

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Policy Registration Factory Javadocs Maven Central

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

com.github.marschall.policyregistrationfactory.EmptyPolicyRegistrationObjectFactory
Creates a PolicyRegistration that always throws an UnsupportedOperationException. Useful for cases when a PolicyRegistration is not needed but a lookup happens anyway.
com.github.marschall.policyregistrationfactory.JBossPolicyRegistrationObjectFactory
Creates a new JBossPolicyRegistration.

Installation

You need to create a JBoss module

  • put the jar in a ${JBOSS_HOME}/modules/system/layers/base/com/github/marschall/policyregistrationfactory/main folder (or whatever your distribution layer is)
  • add a module.xml to the folder into which you put the jar, you can take the one from the root of the JAR
  • configure the object factory and bind it to a name

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"/>
  </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"/>
  </bindings>
</subsystem>

Versions

Version
0.2.0
0.1.0