2.9.4 create-jacc-provider
Enables administrators to create a JACC provider that can be used by third-party authorization modules for applications running in Java EE Server.
Synopsis
asadmin [asadmin-options] create-jacc-provider [--help] --policyproviderclass pol-provider-class --policyconfigfactoryclass pc-factory-class [--property name=value[:name=value]...] [--target target] jacc-provider-name
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The create-jacc-provider subcommand of asadmin creates a JSR-115—compliant Java Authorization Contract for Containers (JACC) provider that can be used for authorization of applications running in Java EE Server. The default Application Server installation includes two JACC providers, named default and simple. The create-jacc-provider subcommand makes it possible to specify additional third-party JACC providers. This command is supported in remote mode only.
The JACC provider is created as a jacc-provider element within the security-service element in the domain's domain.xml file.
Precondition
DAS has to be in a running state.
Files
-
The JACC provider is created as a jacc-provider element within the security-service element in the domain's domain.xml file.
-
For Operand jacc-provider-name: The name of the provider used to reference the jacc-provider element in domain.xml file.
Arguments
- --help | -?
-
Displays the help text for the subcommand.
- --policyproviderclass pol-provider-class
-
Specifies the fully qualified class name for the javax.security.jacc.policy.provider that implements the java.security.Policy.
Type: String
The following values can be specified:
-
A class name which implements the java.security.Policy interface.
Default value: N/A
-
- --policyconfigfactoryclass pc-factory-class
-
Specifies the fully qualified class name for the javax.security.jacc.PolicyConfigurationFactory.provider that implements the provider-specific javax.security.jacc.PolicyConfigurationFactory.
Type: String
The following values can be specified:
-
A class name which implements the javax.security.jacc.PolicyConfigurationFactory interface.
Default value: N/A
-
- --property name=value[:name=value]...
-
Specify property name and property value as a pair for the options when configuring a JACC provider. The specification format is name=value. To specify multiple formats, separate formats with a colon (:). If the same property name is specified more than once, the value specified at the end takes effect.
name
Type: String
The following values can be specified:
-
repository: Specifies the directory containing the JACC policy file. For the default Java EE Server JACC provider, the default directory is ${com.sun.aas.instanceRoot}/generated/policy. This property is not defined by default for the simple Java EE Server JACC provider.
Default value: N/A
value
Type: String
The following values can be specified:
-
Path to the directory that stores the JACC policy file
Default value: ${com.sun.aas.instanceRoot}/generated/policy (The default directory of the default Java EE Server JACC provider)
-
- --target target
-
Specifies the target for which you are creating the JACC provider.
Type: String
The following values can be specified:
-
server
Creates the JACC provider on the default server instance. This is the default value.
-
configuration_name
Creates the JACC provider in the specified configuration.
-
cluster_name
Creates the JACC provider on all server instances in the specified cluster.
-
instance_name
Creates the JACC provider on a specified server instance.
Default value: server
-
- jacc-provider-name
-
Specifies the name of the provider, used to reference the jacc-provider element in domain.xml.
Type: String
The following values can be specified:
-
Specify provider name
Default value: N/A
-
Examples
The following example will create jacc provider on the server instance instance1:
asadmin create-jacc-provider --target instance1 --policyproviderclass com.sun.enterprise.security.provider.PolicyWrapper --policyconfigfactoryclass com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl testJACC
Exit Status
Exit Status |
Explanation |
---|---|
0 |
command executed successfully. |
1 |
error in executing the command. |