public class SQLAccessControlContextFactory extends Object
Constructor and Description |
---|
SQLAccessControlContextFactory() |
Modifier and Type | Method and Description |
---|---|
static AccessControlContext |
getAccessControlContext(Connection connection,
String schemaName,
SQLProfile sqlProfile,
AuthenticationProvider authenticationProvider)
Creates an
AccessControlContext instance backed by the specified database connection. |
static AccessControlContext |
getAccessControlContext(Connection connection,
String schemaName,
SQLProfile sqlProfile,
PasswordEncryptor passwordEncryptor)
Creates an
AccessControlContext instance backed by the specified database connection. |
static AccessControlContext |
getAccessControlContext(DataSource dataSource,
String schemaName,
SQLProfile sqlProfile,
AuthenticationProvider authenticationProvider)
Creates an
AccessControlContext instance backed by the specified database data source. |
static AccessControlContext |
getAccessControlContext(DataSource dataSource,
String schemaName,
SQLProfile sqlProfile,
PasswordEncryptor passwordEncryptor)
Creates an
AccessControlContext instance backed by the specified database data source. |
static void |
postDeserialize(AccessControlContext accessControlContext,
Connection connection)
Re-initializes the specified deserialized accessControlContext with the specified connection.
|
static void |
postDeserialize(AccessControlContext accessControlContext,
DataSource dataSource)
Re-initializes the specified deserialized accessControlContext with the specified data source.
|
public static AccessControlContext getAccessControlContext(Connection connection, String schemaName, SQLProfile sqlProfile, PasswordEncryptor passwordEncryptor)
AccessControlContext
instance backed by the specified database connection. A set of valid
OACC database tables are expected to reside in the specified schema. The dialect of SQL supported by the database
server for which the connection is provided is specified using the SQLProfile parameter. The access control
context returned by this method uses the built-in authentication provider for resource authentication. The
built-in authentication provider delegates all password encryption and decryption to the PasswordEncryptor
instance provided -- therefore it is imperative that the PasswordEncryptor
instance is able to decrypt
existing resource passwords.connection
- a database connection with access to the required OACC tablesschemaName
- the name of the schema in the database containing the OACC tablessqlProfile
- the database provider and dialect of SQL supported for the database server associated
with the connection providedpasswordEncryptor
- a PasswordEncryptor
instance to which the built-in authentication provider
delegates all password encryption and decryptionAccessControlContext
instance ready to receive API callspublic static AccessControlContext getAccessControlContext(DataSource dataSource, String schemaName, SQLProfile sqlProfile, PasswordEncryptor passwordEncryptor)
AccessControlContext
instance backed by the specified database data source. A set of valid
OACC database tables are expected to reside in the specified schema. The dialect of SQL supported by the database
server for which the data source is provided is specified using the SQLProfile parameter. The access control
context returned by this method uses the built-in authentication provider for resource authentication. The
built-in authentication provider delegates all password encryption and decryption to the PasswordEncryptor
instance provided -- therefore it is important that the PasswordEncryptor
instance is able to decrypt
existing resource passwords.dataSource
- a database data source with access to the required OACC tablesschemaName
- the name of the schema in the database containing the OACC tablessqlProfile
- the database provider and dialect of SQL supported for the database server associated
with the data source providedpasswordEncryptor
- a PasswordEncryptor
instance to which the built-in authentication provider
delegates all password encryption and decryptionAccessControlContext
instance ready to receive API callspublic static AccessControlContext getAccessControlContext(Connection connection, String schemaName, SQLProfile sqlProfile, AuthenticationProvider authenticationProvider)
AccessControlContext
instance backed by the specified database connection. A set of valid
OACC database tables are expected to reside in the specified schema. The dialect of SQL supported by the database
server for which the connection is provided is specified using the SQLProfile parameter. The access control
context returned by this method delegates all resource authentication to the specified custom authentication
provider.connection
- a database connection with access to the required OACC tablesschemaName
- the name of the schema in the database containing the OACC tablessqlProfile
- the database provider and dialect of SQL supported for the database server associated
with the connection providedauthenticationProvider
- an AuthenticationProvider
instance to which all resource authentication is
delegatedAccessControlContext
instance ready to receive API callspublic static AccessControlContext getAccessControlContext(DataSource dataSource, String schemaName, SQLProfile sqlProfile, AuthenticationProvider authenticationProvider)
AccessControlContext
instance backed by the specified database data source. A set of valid
OACC database tables are expected to reside in the specified schema. The dialect of SQL supported by the database
server for which the data source is provided is specified using the SQLProfile parameter. The access control
context returned by this method delegates all resource authentication to the specified custom authentication
provider.dataSource
- a database data source with access to the required OACC tablesschemaName
- the name of the schema in the database containing the OACC tablessqlProfile
- the database provider and dialect of SQL supported for the database server associated
with the connection providedauthenticationProvider
- an AuthenticationProvider
instance to which all resource authentication is
delegatedAccessControlContext
instance ready to receive API callspublic static void postDeserialize(AccessControlContext accessControlContext, Connection connection)
accessControlContext
- the accessControlContext on which to reset the database connectionconnection
- the database connection to be reset on the accessControlContextpublic static void postDeserialize(AccessControlContext accessControlContext, DataSource dataSource)
accessControlContext
- the accessControlContext on which to reset the database connectiondataSource
- the database dataSource to be reset on the accessControlContext
OACC is a Java Application Security Framework developed by Acciente, LLC., released under Apache License 2.0.
Copyright 2009-2018, Acciente, LLC.