public class SQLAccessControlContextFactory extends Object
Constructor and Description |
---|
SQLAccessControlContextFactory() |
Modifier and Type | Method and Description |
---|---|
static AccessControlContext |
getAccessControlContext(Connection connection,
String schemaName,
SQLProfile sqlProfile)
Deprecated.
as of OACC v2.0.0-rc8, replaced by
getAccessControlContext(Connection, String, SQLProfile, PasswordEncryptor) where the password encryptor
parameter is an instance of the new Jasypt password encryptor implementation
JasyptPasswordEncryptor . |
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)
Deprecated.
as of OACC v2.0.0-rc8, replaced by
getAccessControlContext(DataSource, String, SQLProfile, PasswordEncryptor) where the password encryptor
parameter is an instance of the new Jasypt password encryptor implementation
JasyptPasswordEncryptor . |
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.
|
static void |
preSerialize(AccessControlContext accessControlContext)
Deprecated.
As of v2.0.0-rc.6; no replacement method necessary because unserializable fields are now marked as transient
|
@Deprecated public static AccessControlContext getAccessControlContext(Connection connection, String schemaName, SQLProfile sqlProfile)
getAccessControlContext(Connection, String, SQLProfile, PasswordEncryptor)
where the password encryptor
parameter is an instance of the new Jasypt password encryptor implementation
JasyptPasswordEncryptor
.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 that delegates all password encryption
and decryption to a PasswordEncryptor
instance provided by
LegacyJasyptPasswordEncryptor.newInstance()
-- therefore the instance returned by this method may
only be used when all existing resource passwords were encrypted using Jasypt. This method is deprecated, please
see the deprecation note below.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 providedAccessControlContext
instance ready to receive API calls@Deprecated public static AccessControlContext getAccessControlContext(DataSource dataSource, String schemaName, SQLProfile sqlProfile)
getAccessControlContext(DataSource, String, SQLProfile, PasswordEncryptor)
where the password encryptor
parameter is an instance of the new Jasypt password encryptor implementation
JasyptPasswordEncryptor
.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 that delegates all password encryption
and decryption to a PasswordEncryptor
instance provided by
LegacyJasyptPasswordEncryptor.newInstance()
-- therefore the instance returned by this method may
only be used when all existing resource passwords were encrypted using Jasypt. This method is deprecated, please
see the deprecation note below.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 providedAccessControlContext
instance ready to receive API callspublic 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 calls@Deprecated public static void preSerialize(AccessControlContext accessControlContext)
public 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-2017, Acciente, LLC.