public class DummyAuthzCredentialGenerator extends AuthzCredentialGenerator
AuthzCredentialGenerator.ClassCode| Modifier and Type | Field and Description |
|---|---|
static byte |
ADMIN_ROLE |
static byte |
READER_ROLE |
static byte |
WRITER_ROLE |
generator| Constructor and Description |
|---|
DummyAuthzCredentialGenerator() |
| Modifier and Type | Method and Description |
|---|---|
AuthzCredentialGenerator.ClassCode |
classCode()
The
AuthzCredentialGenerator.ClassCode of the particular implementation. |
protected java.security.Principal |
getAllowedPrincipal(OperationContext.OperationCode[] opCodes,
java.lang.String[] regionNames,
int index)
Get a
Principal generated using the given index allowed to perform the given
OperationContext.OperationCodes for the given region. |
java.lang.String |
getAuthorizationCallback()
The name of the
AccessControl factory function that should be used as the authorization
module on the server side. |
protected java.security.Principal |
getDisallowedPrincipal(OperationContext.OperationCode[] opCodes,
java.lang.String[] regionNames,
int index)
Get a
Principal generated using the given index not allowed to perform the given
OperationContext.OperationCodes for the given region. |
protected int |
getNumPrincipalTries(OperationContext.OperationCode[] opCodes,
java.lang.String[] regionNames)
Get the number of tries to be done for obtaining valid credentials for the given operations in
the given region.
|
static byte |
getRequiredRole(OperationContext.OperationCode[] opCodes) |
protected java.util.Properties |
init()
Initialize the authorized credential generator.
|
create, getAllowedCredentials, getCredentialGenerator, getDisallowedCredentials, getSystemProperties, initpublic static final byte READER_ROLE
public static final byte WRITER_ROLE
public static final byte ADMIN_ROLE
public static byte getRequiredRole(OperationContext.OperationCode[] opCodes)
protected java.util.Properties init()
throws java.lang.IllegalArgumentException
AuthzCredentialGeneratorinit in class AuthzCredentialGeneratorjava.lang.IllegalArgumentException - when the CredentialGenerator is incompatible with this
authorization module.public AuthzCredentialGenerator.ClassCode classCode()
AuthzCredentialGeneratorAuthzCredentialGenerator.ClassCode of the particular implementation.classCode in class AuthzCredentialGeneratorClassCodepublic java.lang.String getAuthorizationCallback()
AuthzCredentialGeneratorAccessControl factory function that should be used as the authorization
module on the server side.getAuthorizationCallback in class AuthzCredentialGeneratorAccessControl factory functionprotected java.security.Principal getAllowedPrincipal(OperationContext.OperationCode[] opCodes, java.lang.String[] regionNames, int index)
AuthzCredentialGeneratorPrincipal generated using the given index allowed to perform the given
OperationContext.OperationCodes for the given region.
Required to be implemented by concrete classes that implement this abstract class.getAllowedPrincipal in class AuthzCredentialGeneratoropCodes - the OperationContext.OperationCodes of the operations requiring authorizationregionNames - list of the region names requiring authorization; a value of null indicates
all regionsindex - used to generate multiple such principals by passing different values for thisPrincipal authorized to perform the given operation in the given regionprotected java.security.Principal getDisallowedPrincipal(OperationContext.OperationCode[] opCodes, java.lang.String[] regionNames, int index)
AuthzCredentialGeneratorPrincipal generated using the given index not allowed to perform the given
OperationContext.OperationCodes for the given region.
Required to be implemented by concrete classes that implement this abstract class.getDisallowedPrincipal in class AuthzCredentialGeneratoropCodes - the OperationContext.OperationCodes of the operations requiring authorization failureregionNames - list of the region names requiring authorization failure; a value of null
indicates all regionsindex - used to generate multiple such principals by passing different values for thisPrincipal not authorized to perform the given operation in the given regionprotected int getNumPrincipalTries(OperationContext.OperationCode[] opCodes, java.lang.String[] regionNames)
AuthzCredentialGeneratorAuthzCredentialGenerator.getAllowedPrincipal(org.apache.geode.cache.operations.OperationContext.OperationCode[], java.lang.String[], int) method returns valid
principals for values of index from 0 through (n-1) where n is the value
returned by this method. It is recommended that the principals so returned be unique for
efficiency.
This will be used by AuthzCredentialGenerator.getAllowedCredentials(org.apache.geode.cache.operations.OperationContext.OperationCode[], java.lang.String[], int) to step through different principals and
obtain a set of valid credentials.
Required to be implemented by concrete classes that implement this abstract class.getNumPrincipalTries in class AuthzCredentialGeneratoropCodes - the OperationContext.OperationCodes of the operations requiring authorizationregionNames - list of the region names requiring authorization; a value of null indicates
all regions