public class SecurityPolicyManager extends SystemHandleBase
CommonSecurityPolicy
Modifier and Type | Class and Description |
---|---|
private static class |
SecurityPolicyManager.DomainRegistry
Domain registry.
|
static class |
SecurityPolicyManager.DomainStateError
Errors for getDomainAccessCode method.
|
private static class |
SecurityPolicyManager.PersistentDomain
Domain loaded from the connected permanent database.
|
static class |
SecurityPolicyManager.RuntimeDomain
Runtime security domain.
|
private static class |
SecurityPolicyManager.WorkArea
Stores global data relating to the state of the current context.
|
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CIPHER_NAMES
Supported symmetric ciphers' list as String.
|
private static java.util.Set<java.lang.String> |
DIGESTS
Supported PBE hash algorithms.
|
private static ContextLocal<SecurityPolicyManager.WorkArea> |
work
Context local proxy that allows SECURITY-POLICY attributes to be pushed from
server to the client.
|
Constructor and Description |
---|
SecurityPolicyManager() |
Modifier and Type | Method and Description |
---|---|
static handle |
asHandle()
Get a the instance for the SECURITY-POLICY system handle.
|
private static void |
authenticationNotSupported()
Report "authentication not supported" error.
|
static handle |
getClient()
Implementation of SECURITY-POLICY:GET-CLIENT method.
|
static java.util.Optional<java.lang.String> |
getDomainAccessCode(java.lang.String domainName,
java.util.function.Consumer<SecurityPolicyManager.DomainStateError> error)
Get domain access code by domain name.
|
static raw |
getEncryptionSalt()
Implementation of ENCRYPTION-SALT attribute getter.
|
static character |
getPbeHashAlgorithm()
Implementation of PBE-HASH-ALGORITHM attribute getter.
|
static integer |
getPbeKeyRounds()
Implementation of PBE-KEY-ROUNDS attribute getter.
|
(package private) static CryptoUtils.CipherParams |
getSymmetricCiperParams()
Provides the decoded value of the
SECURITY-POLICY:SYMMETRIC-ENCRYPTION-ALGORITHM attribute.
|
(package private) static CryptoUtils.CipherParams |
getSymmetricCipherParams(java.lang.String spec)
Provides the decoded value of the symmetric encryption algorithm For internal
use.
|
static character |
getSymmetricEncryptionAlgorithm()
Implementation of SECURITY-POLICY:SYMMETRIC-ENCRYPTION-ALGORITHM attribute
getter.
|
static raw |
getSymmetricEncryptionIV()
Implementation of SECURITY-POLICY:SYMMETRIC-ENCRYPTION-IV attribute getter.
|
static raw |
getSymmetricEncryptionKey()
Implementation of SECURITY-POLICY:SYMMETRIC-ENCRYPTION-KEY attribute getter.
|
(package private) static raw |
getSymmetricEncryptionKeyInternal()
Implementation of SECURITY-POLICY:SYMMETRIC-ENCRYPTION-KEY attribute getter
for internal use.
|
static character |
getSymmetricSupport()
Implementation of SECURITY-POLICY:SYMMETRIC-SUPPORT attribute getter.
|
static java.lang.Long |
id()
Get this resource's ID.
|
private static logical |
invaliadLoadDomainsParam()
Report invalid parameter for LOAD-DOMAINS and return
new logical(false) . |
private static void |
invalidValue(int code,
java.lang.String aname)
Report invalid attribute value error.
|
static logical |
loadDomains(character name)
Loads registered domains from the specified (and connected) OpenEdge RDBMS into the ABL
session domain registry.
|
static logical |
loadDomains(int num)
Loads registered domains from the specified (and connected) OpenEdge RDBMS into the ABL
session domain registry.
|
static logical |
loadDomains(integer num)
Loads registered domains from the specified (and connected) OpenEdge RDBMS into the ABL
session domain registry.
|
static logical |
loadDomains(java.lang.String name)
Loads registered domains from the specified (and connected) OpenEdge RDBMS into the ABL
session domain registry.
|
private static logical |
loadDomains(java.lang.String dbn,
Persistence persistence)
Loads registered domains from the specified (and connected) OpenEdge RDBMS into the ABL
session domain registry.
|
private static logical |
loadDomainsFailed(int code,
java.lang.String reason)
Report LOAD-DOMAINS failure and return
new logical(false) . |
static logical |
lockRegistration()
Implementation of SECURITY-POLICY:LOCK-REGISTRATION method.
|
static void |
readOnlyError(java.lang.String attribute)
API needed to implement read-only attribute assignment (a 4GL "feature").
|
static void |
readOnlyError(java.lang.String attribute,
java.lang.Object expr)
API needed to implement read-only attribute assignment (a 4GL "feature").
|
static logical |
registerDomain(character domainName,
character accessCode)
Implementation of SECURITY-POLICY:REGISTER-DOMAIN method.
|
static logical |
registerDomain(character domainName,
character accessCode,
character domainDesc)
Implementation of SECURITY-POLICY:REGISTER-DOMAIN method.
|
static logical |
registerDomain(character domainName,
character accessCode,
character domainDesc,
character domainType)
Implementation of SECURITY-POLICY:REGISTER-DOMAIN method.
|
static logical |
setClient(handle h)
Implementation of SECURITY-POLICY:SET-CLIENT method.
|
static void |
setEncryptionSalt(raw salt)
Implementation of SECURITY-POLICY:ENCRYPTION-SALT attribute setter.
|
static void |
setPbeHashAlgorithm(character aname)
Implementation of SECURITY-POLICY:PBE-HASH-ALGORITHM attribute setter.
|
static void |
setPbeKeyRounds(integer rounds)
Implementation of SECURITY-POLICY:PBE-KEY-ROUNDS attribute setter.
|
static void |
setSymmetricEncryptionAlgorithm(character aname)
Implementation of SECURITY-POLICY:SYMMETRIC-ENCRYPTION-ALGORITHM attribute
setter.
|
static void |
setSymmetricEncryptionIV(raw iv)
Implementation of SECURITY-POLICY:SYMMETRIC-ENCRYPTION-IV attribute setter.
|
static void |
setSymmetricEncryptionKey(raw key)
Implementation of SECURITY-POLICY:SYMMETRIC-ENCRYPTION-ALGORITHM attribute
setter.
|
getResourceType, id, unknown, valid
private static final java.lang.String CIPHER_NAMES
private static final java.util.Set<java.lang.String> DIGESTS
private static final ContextLocal<SecurityPolicyManager.WorkArea> work
public static handle asHandle()
StaticProxy.obtain(Class, Class[])
, using the
CommonSecurityPolicy
interface and its methods implemented by these
classes: SecurityPolicyManager
.public static character getSymmetricSupport()
static CryptoUtils.CipherParams getSymmetricCiperParams()
static CryptoUtils.CipherParams getSymmetricCipherParams(java.lang.String spec)
spec
- The algorithm spec string. If is is null or empty the value of
the SECURITY-POLICY:SYMMETRIC-ENCRYPTION-ALGORITHM attribute is
decodedjava.lang.IllegalArgumentException
- if the invalid parameter was
providedpublic static character getSymmetricEncryptionAlgorithm()
public static void setSymmetricEncryptionAlgorithm(character aname)
aname
- The name of the default cryptographic algorithm.public static raw getSymmetricEncryptionKey()
public static void setSymmetricEncryptionKey(raw key)
key
- The default encryption key.public static raw getSymmetricEncryptionIV()
public static void setSymmetricEncryptionIV(raw iv)
iv
- The default initialization vector value.public static raw getEncryptionSalt()
public static void setEncryptionSalt(raw salt)
salt
- The default salt value.public static integer getPbeKeyRounds()
public static void setPbeKeyRounds(integer rounds)
rounds
- The number of hash algorithm iterations.public static character getPbeHashAlgorithm()
public static void setPbeHashAlgorithm(character aname)
aname
- The number of hash algorithm iterations.public static handle getClient()
public static java.util.Optional<java.lang.String> getDomainAccessCode(java.lang.String domainName, java.util.function.Consumer<SecurityPolicyManager.DomainStateError> error)
domainName
- domain name.error
- Consumer
for an error code.public static logical setClient(handle h)
h
- The handle to an unsealed or a sealed client-principal object.true
if operation succeeded or false
otherwise.public static logical registerDomain(character domainName, character accessCode)
domainName
- A character expression that specifies the name of this
security domain.accessCode
- A character expression that specifies the secret value to
use when authenticating or validating a client-principal
object that represents a user identity in this domain.true
if operation succeeded or false
otherwisepublic static logical registerDomain(character domainName, character accessCode, character domainDesc)
domainName
- A character expression that specifies the name of this
security domain.accessCode
- A character expression that specifies the secret value to
use when authenticating or validating a client-principal
object that represents a user identity in this domain.domainDesc
- An optional character expression that specifies a
description for this domain.true
if operation succeeded or false
otherwisepublic static logical registerDomain(character domainName, character accessCode, character domainDesc, character domainType)
domainName
- A character expression that specifies the name of this
security domain.accessCode
- A character expression that specifies the secret value to
use when authenticating or validating a client-principal
object that represents a user identity in this domain.domainDesc
- An optional character expression that specifies a
description for this domain.domainType
- An optional character expression that specifies an
application-defined authentication system for user
authentication and single-sign-on (SSO) operations.true
if operation succeeded or false
otherwisepublic static logical lockRegistration()
true
if operation succeeded or false
otherwise.public static logical loadDomains(integer num)
num
- The sequence number of a connected database from which to load registered domains.true
if operation succeeded or
false
otherwise.public static logical loadDomains(int num)
num
- The sequence number of a connected database from which to load registered domainstrue
if operation succeeded or
false
otherwisepublic static logical loadDomains(character name)
name
- The logical name or alias of a connected database from which to load registered
domains.true
if operation succeeded or
false
otherwise.public static logical loadDomains(java.lang.String name)
name
- The logical name or alias of a connected database from which to load registered
domains.true
if operation succeeded or
false
otherwise.public static void readOnlyError(java.lang.String attribute)
attribute
- The attribute's name.handle.readOnlyError(handle, String)
public static void readOnlyError(java.lang.String attribute, java.lang.Object expr)
attribute
- The attribute's name.expr
- The value which is attempted to be assigned to the read-only attribute.handle.readOnlyError(handle, String, Object)
public static java.lang.Long id()
static raw getSymmetricEncryptionKeyInternal()
private static void authenticationNotSupported()
private static logical loadDomains(java.lang.String dbn, Persistence persistence)
dbn
- database name;persistence
- The Persistence
instance for a connected database from which to load
registered domainstrue
if operation succeeded or
false
otherwiseprivate static logical loadDomainsFailed(int code, java.lang.String reason)
new logical(false)
.code
- error codereason
- failure reasonfalse
private static logical invaliadLoadDomainsParam()
new logical(false)
.false
private static void invalidValue(int code, java.lang.String aname)
code
- error codeaname
- attribute name