Configuration Examples The OPSS Java SE Client
23.1.3 Configuring DB-Based OPSS Security Stores
This section assumes that a DB-based store has been set to be used as the OPSS security store. For details about setting up nodes in a DB, see section Section 8.3.1, Prerequisites to Using a DB-Based Security Store. Note the following important points regarding the sample configuration below: ■ The value of the configuration property jdbc.url should be identical to the name of the JDBC data source entered when the data source was created. ■ The values of the bootstrap credentials map and key must match those passed to the WLST script addBootStrapCredential when the bootstrap credential was created. The following fragment illustrates the configuration of DB-based policy, credential, and key stores in the file jps-config-jse.xml valid only for a Java SE application: jpsConfig … propertySets propertySet name=props.db.1 property value=cn=myDomain name=oracle.security.jps.farm.name property value=DB_ORACLE name=server.type property value=cn=myRoot name=oracle.security.jps.ldap.root.name property name=jdbc.url value=jdbc:oracle:thin:myhost.com:1521srv_name 23-4 Oracle Fusion Middleware Application Security Guide property name=jdbc.driver value=oracle.jdbc.driver.OracleDriver property name=bootstrap.security.principal.key value=myKeyName property name=bootstrap.security.principal.map value=myMapName propertySet propertySets serviceProviders serviceProvider class=oracle.security.jps.internal.policystore.OPSSPolicyStoreProvider type=POLICY_STORE name=policy.rdbms descriptionDBMS based PolicyStoredescription serviceProvider serviceProvider class=oracle.security.jps.internal.credstore.rdbms.DbmsCredentialStoreProvider type=CREDENTIAL_STORE name=db.credentialstore.provider serviceProvider class=oracle.security.jps.internal.keystore.KeyStoreProvider type=KEY_STORE name=keystore.provider property name=provider.property.name value=owsm serviceProvider serviceProviders serviceInstances serviceInstance name=policystore.rdbms provider=db.policystore.provider propertySetRef ref = props.db.1 property name=policystore.type value=DB_ORACLE serviceInstance serviceInstance name=credstore.rdbms provider=db.credstore.provider propertySetRef ref = props.db.1 serviceInstance serviceInstance name=keystore.rdbms provider=db.keystore.provider propertySetRef ref = props.db.1 property name=keystore.provider.type value=db serviceInstance serviceInstances jpsContexts default=default jpsContext name=default serviceInstanceRef ref=policystore.rdbms serviceInstanceRef ref=credstore.rdbms serviceInstanceRef ref=keystore.rdbms jpsContext jpsContexts jpsConfig23.2 Unsupported Methods for File-Based Policy Stores
This release does not support, for file-based policy stores, methods involving the following features: ■ Bulk authorization ■ Complex queries ■ Cascading deletions Bulk authorization is encapsulated in the following method of the interface oracle.security.jps.service.policystore: Authorization for Java SE Applications 23-5 java.util.SetResourceActionsEntry checkBulkAuthorizationjavax.security.auth.Subject subject, java.util.SetResourceActionsEntry requestedResources throws PolicyStoreException Complex queries relates to any method that takes a query. When the policy store is file-based, the query must be simple; if such a method is passed a complex query and the policy store is file-based, the method will throw an exception. A simple query is a query with just one search criterion; a complex query is a query with two or more search criteria; each call to addQuery adds a criterion to the query. The following code fragment that illustrates the building of a simple query that returns of all permissions with a display name matching the string MyDisplayName: PermissionSetSearchQuery query = new PermissionSetSearchQuery; query.addQueryPermissionSetSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME, false, ComparatorType.EQUALITY, MyDisplayName, BaseSearchQuery.MATCHER.EXACT; getPermissionSetsquery; The following example illustrates the building of a complex query that returns all permission sets with a given resource type and a given resource instance name: PermissionSetSearchQuery query = new PermissionSetSearchQuery; query.addQueryPermissionSetSearchQuery.SEARCH_PROPERTY.RESOURCE_TYPE, false, ComparatorType.EQUALITY, MyResourceType, BaseSearchQuery.MATCHER.EXACT; query.addQueryPermissionSetSearchQuery.SEARCH_PROPERTY.RESOURCE_NAME, false, ComparatorType.EQUALITY, MyResourceInstanceName, BaseSearchQuery.MATCHER.EXACT; query.setANDMatch; getPermissionSetsquery; Cascading deletions relates to any method that includes the Boolean argument cascadeDelete. The only value allowed for this argument in case the policy store is file-based is FALSE. Here is an example of such a method in the interface ResourceTypeManager: void deleteResourceTypeEntryReference rtRef, boolean cascadeDelete throws PolicyObjectNotFoundException, PolicyStoreOperationNotAllowedException, PolicyStoreException 23-6 Oracle Fusion Middleware Application Security Guide 24 Developing with the Credential Store Framework 24-1 24 Developing with the Credential Store Framework This chapter describes how to work with the APIs for the Credential Store Framework CSF. In an earlier chapter, we explained how applications can use CSF to securely store the credentials for external systems Web sites, databases, and so on in a credential store; and the additional benefits of CSF, such as the ability to audit credential store operations and use common Oracle Fusion Middleware user interfaces. Prior to using the information in this chapter to work with the CSF APIs, it is strongly recommended that you familiarize yourself with the context in which these APIs are used. For details, see: ■ Chapter 19, Developing Secure Applications with Oracle Platform Security Services ■ Section 19.2.4, The Credential Store Framework API , which shows a common usage scenario This chapter contains the following sections: ■ About the Credential Store Framework API ■ Overview of Application Development with CSF ■ Setting the Java Security Policy Permissions ■ Guidelines for the Map Name ■ Configuring the Credential Store ■ Steps for Using the API ■ Examples ■ Best Practices24.1 About the Credential Store Framework API
A credential store is used for secure storage of credentials. The credential store framework CSF API is used to access and perform operations on the credential store. The Credential Store Framework: ■ enables you to manage credentials securely ■ provides an API for storage, retrieval, and maintenance of credentials in different back-end repositories 24-2 Oracle Fusion Middleware Application Security Guide ■ supports file-based Oracle wallet and LDAP-based credential management Critical create, update, delete functions provided by the CSF API include: ■ verifying if a credential map, or a credential with a given key, exists in the store ■ returning credentials associated with mapname, key ■ assigning credentials to mapname, key ■ deleting credentials associated with a given map name, or a given map name and key ■ resetting credentials for a specified mapname, key Operations on CredentialStore are secured by CredentialAccessPermission, which implements the fine-grained access control model utilized by CSF.24.2 Overview of Application Development with CSF
Knowledge of the following areas is helpful in getting your applications to work with the credential store framework: ■ Determining appropriate map names and key names to use. This is critical in an environment with multiple applications storing credentials in the common credential store. ■ Provisioning Java security policies. Policy permissions are set in the policy store, which can be file-based system-jazn-data.xml or LDAP-based. Setting appropriate permissions to enable application usage without compromising the security of your data requires careful consideration of permission settings. ■ How to define the credential store instance in jps-config.xml. You will need to define the service instance in jps-config.xml only if manually crafting the configuration file. ■ Steps to take in setting up the environment. The steps are different for stand-alone applications and those that operate in an Oracle WebLogic Server environment. Subsequent sections provide details about each of these tasks.24.3 Setting the Java Security Policy Permissions
The Oracle Platform Security Services policy provider is set when the server is started. When the provider is file-based, the policy data is stored in system-jazn-data.xml. See Also: ■ Chapter 10, Managing the Credential Store See Also: Section 9.1, Managing the Policy Store . Note: The file-based provider is already configured by default, and can be changed to an LDAP-based provider. See Section 8.6, Migrating the OPSS Security Store .Parts
» Oracle Fusion Middleware Online Documentation Library
» OPSS Main Features What is Oracle Platform Security Services?
» Supported Server Platforms What is Oracle Platform Security Services?
» Scenario 3: Securing a Java SE Application
» Oracle ADF Security Overview OPSS for Administrators Terminology
» Permission Inheritance and the Role Hierarchy
» The Authenticated Role Oracle Fusion Middleware Online Documentation Library
» Administrative Users and Roles Managing User Accounts The Role Category
» Supported LDAP Identity Store Types
» Oracle WebLogic Authenticators Authentication Basics
» Policy Store Basics Oracle Fusion Middleware Online Documentation Library
» Credential Store Basics Oracle Fusion Middleware Online Documentation Library
» Supported LDAP-, DB-, and File-Based Services
» Management Tools Oracle Fusion Middleware Online Documentation Library
» Packaging Requirements Example Scenarios
» Other Scenarios Oracle Fusion Middleware Online Documentation Library
» Choosing the Administration Tool According to Technology
» Setting Up a Brand New Production Environment
» Typical Security Practices with Typical Security Practices with the Administration Console
» Overview Oracle Fusion Middleware Online Documentation Library
» Deploying Java EE and Oracle ADF Applications with Fusion Middleware Control
» Deploying to a Test Environment
» Deploying Standard Java EE Applications
» Migrating Providers other than Policy and Credential Providers
» Migrating Large Volume Policy and Credential Stores
» Migrating Audit Policies Migrating from a Test to a Production Environment
» About the Identity Store Service
» Service Architecture Introduction to the Identity Store Service
» Configuring the Identity Store Provider
» What is Configured? Configuring the Identity Store Service
» Configuring the Service for Multiple LDAP using WLST Configuring Other Parameters
» Configuring Split Profiles Configuration in Other Application Servers
» Java SE Environments Configuring the Identity Store Service
» Querying the Identity Store Programmatically
» Introduction to the OPSS Security Store
» Multiple-Node Server Environments Using an LDAP-Based OPSS Security Store
» Prerequisites to Using an LDAP-Based Security Store
» Dropping the OPSS Schema in an Oracle Database
» In that dialog, select the prefix and, in the Component hierarchy, check AS
» Creating a Data Source Instance
» Maintaining a DB-Based Security Store
» Connecting to a DB Server with sqlplus or JDBC OCI Driver This task involves
» Navigate to Data Sources YourDataSourceName Custom Properties.
» Configuring the OPSS Security Store
» Log in to Fusion Middleware Control and navigate to Domain Security
» Click the button Change Association to display the Set Security Provider page,
» If you have selected Database, enter the name of the data source in the Datasource
» Optionally, check the box Use SSL to Connect to establish an anonymous SSL
» In the text box Connect DN, enter the full distinguished name, a string
» In the box Password, enter the user password, also a string containing
» In the Root Node Details area, enter the root DN in the box Root DN, which
» Optionally, in the Policy Store Properties and Credential Store Properties areas,
» Setting Up a One- Way SSL Connection
» Securing Access to Oracle Internet Directory Nodes
» Reassociating with the Script reassociateSecurityStore
» Migrating with Fusion Middleware Control
» Migrating with the Script migrateSecurityStore
» Use the button Delete to remove a selected item from any table. When finished
» Cataloging Oracle Internet Directory Attributes
» To display roles in an application, expand the Search area, choose the application
» To create an application role, click Create to display the Create Application Role
» Click Add Application Role, to display the Add Application Role dialog.
» Select roles from the box Available Roles, as appropriate, and use the buttons
» Click Add Group, to display the Add Group dialog.
» Select groups from the box Available Groups, as appropriate, and use the
» Click Add User, to display the Add User dialog.
» Select users from the box Available Users, as appropriate, and use the buttons
» Click Create Like, to display the Create Application Role Like page. Notice
» Modify the list of roles and users, as appropriate, and then click OK.
» Log in to Fusion Middleware Control and navigate to Domain Security System
» listAppStripes Managing Application Policies with OPSS Scripts
» createAppRole Managing Application Policies with OPSS Scripts
» deleteAppRole grantAppRole Managing Application Policies with OPSS Scripts
» revokeAppRole listAppRoles Managing Application Policies with OPSS Scripts
» listAppRolesMembers grantPermission Managing Application Policies with OPSS Scripts
» revokePermission Managing Application Policies with OPSS Scripts
» listPermissions Managing Application Policies with OPSS Scripts
» deleteAppPolicies createResourceType Managing Application Policies with OPSS Scripts
» getResourceType deleteResourceType Managing Application Policies with OPSS Scripts
» createResource Managing Application Policies with OPSS Scripts
» deleteResource listResources Managing Application Policies with OPSS Scripts
» listResourceActions createEntitlement Managing Application Policies with OPSS Scripts
» getEntitlement Managing Application Policies with OPSS Scripts
» deleteEntitlement Managing Application Policies with OPSS Scripts
» addResourceToEntitlement Managing Application Policies with OPSS Scripts
» revokeResourceFromEntitlement Managing Application Policies with OPSS Scripts
» listEntitlements Managing Application Policies with OPSS Scripts
» grantEntitlement Managing Application Policies with OPSS Scripts
» listResourceTypes reassociateSecurityStore Managing Application Policies with OPSS Scripts
» The user accesses the functionality secured by the application role.
» Granting Policies to Anonymous and Authenticated Roles with WLST Scripts
» Guidelines for Configuring the Policy Store
» Credential Types Managing the Credential Store
» Managing Credentials with Fusion Middleware Control
» listCred Managing Credentials with OPSS Scripts
» updateCred Managing Credentials with OPSS Scripts
» createCred Managing Credentials with OPSS Scripts
» deleteCred Managing Credentials with OPSS Scripts
» modifyBootStrapCredential Managing Credentials with OPSS Scripts
» addBootStrapCredential Managing Credentials with OPSS Scripts
» Objectives of Auditing Benefits and Features of the Oracle Fusion Middleware Audit Framework
» Oracle Fusion Middleware Audit Framework in 11g
» Audit Architecture Oracle Fusion Middleware Audit Framework Concepts
» Key Technical Concepts Oracle Fusion Middleware Audit Framework Concepts
» Audit Record Storage Analytics
» Audit Administration Tasks Oracle Fusion Middleware Online Documentation Library
» Choose Create at the starting screen. Click Next.
» Multiple Data Sources Enter the following details for the new data source:
» Open the opmn.xml file, which resides in
» Configuring the Stand-alone Audit Loader
» If you made any policy changes, click Apply to save the changes. For Java
» Click Select Failures Only to select only failed events in the policy - for example,
» ImportExport - These buttons enable you to save and re-use a policy
» Optionally, under “Users to Always Audit”, a comma-separated list of users can
» Manage Audit Policies Manually
» Audit Log Timestamps Audit Logs
» Schema Overview Advanced Management of Database Store
» Table Attributes Indexing Scheme Backup and Recovery
» Importing and Exporting Data Partitioning
» About Oracle Business Intelligence Publisher
» Install Oracle Business Intelligence Publisher
» Set Up Oracle Reports in Oracle Business Intelligence Publisher
» Configure Scheduler in Oracle Business Intelligence Publisher
» Organization of Audit Reports
» View Audit Reports Oracle Fusion Middleware Online Documentation Library
» Example of Oracle Business Intelligence Publisher Reports
» List of Audit Reports in Oracle Business Intelligence Publisher
» The condition is now included in the report. Be sure to click Save again on the
» Choosing the Right SSO Solution for Your Deployment
» About Using the Identity Asserter Function with Oracle Access Manager
» Choosing Applications for Oracle Access Manager SSO Scenarios and Solutions
» Implementation: Using the Provider with OAM 11g versus OAM 10g
» Requirements for the Provider with Oracle Access Manager
» Setting Up Debugging in the WebLogic Administration Console
» Previewing Pre-Seeded OAM 11g Policies for Use by the OAM 10g AccessGate
» Install and set up Oracle Internet Directory for Oracle Access Manager.
» Optional Installing the Authentication Provider with Oracle Access Manager 11g
» WebGate for Identity Asserter for Single Sign-On
» AccessGate for the Authenticator or for Oracle Web Services Manager
» Provision the agent. For example:
» Locate the remote registration script.
» No Oracle Fusion Middleware Application
» With Oracle Fusion Middleware Application Installed
» Click Security Realms, Default Realm Name, and click Providers.
» OAM Identity Asserter Configuring Identity Assertion for SSO with Oracle Access Manager 11g
» Click Lock Edit, if desired.
» OAM Authenticator Configuring the Authenticator Function for Oracle Access Manager 11g
» Click Security Realms and select the realm you want to configure.
» Select Providers, Authentication, and click New to display the Create a New
» Logout for 11g WebGate and OAM 11g
» Optional Logout for 10g WebGate with Oracle Access Manager 11g
» Synchronizing the User and SSO Sessions: SSO Synchronization Filter
» Troubleshooting Tips Oracle Fusion Middleware Online Documentation Library
» An Oracle Internet Directory or Oracle Sun One LDAP directory server configured
» Alternative Process for Configuring Logout
» Oracle Access Manager Authentication Provider Parameter List
» OAMCfgTool Parameters and Values
» Sample Policy Domain and AccessGate Profile Created with OAMCfgTool
» Known Issues: JAR Files and OAMCfgTool
» Establishing Trust with Oracle WebLogic Server
» Output LDIF Created Validate
» Fresh WebGate ProfileWebGate Not Installed Fresh WebGate Profile with Installed WebGate
» Setting Up the Login Form for the Identity Asserter and OAM 10g
» Testing Identity Assertion for SSO with OAM 10g
» Creating an Authentication Scheme for the Authenticator
» Authentication Rule Oracle Fusion Middleware Online Documentation Library
» OAM Authenticator Configuring Providers for the Authenticator in a WebLogic Domain
» Ensure that the parameter Control Flag is set to OPTIONAL initially.
» From the WebLogic Administration Console, go to Security Realms, myrealm,
» Configuring the Application Authentication Method for the Authenticator
» Mapping the Authenticated User to a Group in LDAP
» Testing the Oracle Access Manager Authenticator Implementation
» General Tab Creating an Policy Domain for Use with Oracle Web Services Manager
» Resources Tab Creating an Policy Domain for Use with Oracle Web Services Manager
» Authorization Rules Tab Creating an Policy Domain for Use with Oracle Web Services Manager
» General Tab Oracle Fusion Middleware Online Documentation Library
» Timing Conditions Oracle Fusion Middleware Online Documentation Library
» Actions Oracle Fusion Middleware Online Documentation Library
» Allow Access Oracle Fusion Middleware Online Documentation Library
» Configuring Oracle Web Services Manager Policies for Web Services
» OAM Identity Asserter Configuring Providers in a WebLogic Domain for Oracle Web Services Manager
» Click the Provider Specific tab and specify the following required settings
» About Using IPv6 Troubleshooting Tips for OAM Provider Deployments
» Apache Bridge Failure: Timed Out
» Authenticated User with Access Denied
» Browser Back Button Results in Error
» Client in Cluster with Load-Balanced WebGates
» Log in to Oracle Technology Network at:
» Locate the OAMCfgTool ZIP file with Access Manager Core Components
» Extract and copy oamcfgtool.jar to the computer hosting WebGate:
» Error 401: Unable to Access the Application Error 403: Unable to Access the Application
» JAAS Control Flag Click Access System Configuration, and then click AccessGate
» Oracle WebLogic Server Fails to Start
» Oracle ADF Integration and Cert Mode
» About Protected_JSessionId_Policy
» Consumption of Headers with OSSO Identity Asserter
» New Users of the OSSO Identity Asserter
» Oracle WebLogic Server 10.3.1+ Oracle Fusion Middleware Online Documentation Library
» Click Security Realms, Default Realm Name, Providers.
» Check whether the server is being hit without first going through authentication
» URL Rewriting and JSESSIONID
» About mod_osso, OSSO Cookies, and Directives
» About Using IPv6 Troubleshooting for an OSSO Identity Asserter Deployment
» Introduction Oracle Fusion Middleware Online Documentation Library
» Terminology Oracle Fusion Middleware Online Documentation Library
» OID for Identity and Policy Stores
» OAM and OSSO for User Authentication and Web SSO
» OIM for User and Role Provisioning
» OPSS for User and Role Profiling
» OAPM for Application Policy Management
» OPSS for Cryptography Oracle Identity and Access Management Suite
» Development Phase Security Life Cycle of an Application
» Summary of Tasks per Participant per Phase
» Oracle Platform Security Services
» Use Case 1 - Java EE Application
» Credentials Required Security Features
» Authentication Required Security Features
» Authorization Required Security Features
» Container-Based Authentication Integrating Authentication
» Oracle WebLogic Server Authentication Providers
» Functional Security Integrating Authorization
» Functional Security with ADF
» Cryptography Integrating the Credential Store
» The Development Cycle OPSS for Developers
» Challenges of Securing Java Applications
» Meeting the Challenges with Oracle Platform Security Services OPSS Architecture
» The LoginService API OPSS APIs
» The User and Role API JAAS Authorization and the JpsAuth.checkPermission API
» Java EE Application using OPSS APIs Authenticating with OPSS APIs
» Programmatic Authorization Credential Store Framework
» User and Role Common Uses of OPSS
» Oracle ADF Authorization Common Uses of OPSS
» About Oracle ADF Using OPSS with Oracle Application Development Framework
» The Oracle ADF Development Life Cycle
» Using the Oracle Security Developer Tools
» Using OPSS Outside Oracle JDeveloperOracle ADF
» Introduction to Authorization Authorization Overview
» The Resource Catalog The JAASOPSS Authorization Model
» Managing Policies The JAASOPSS Authorization Model
» The Class ResourcePermission The JAASOPSS Authorization Model
» Interceptor Configuration Syntax Configuring the Servlet Filter and the EJB Interceptor
» Summary of Filter and Interceptor Parameters
» Configuring the Application Stripe for Application MBeans
» The Security Policy Model Choosing the Appropriate Class for Enterprise Groups and Users
» Packaging Policies with Application
» Packaging Credentials with Application
» Parameters Controlling Policy Migration
» Policy Parameter Configuration According to Behavior
» Using a Wallet-Based Credential Store
» Parameters Controlling Credential Migration
» Credential Parameter Configuration According to Behavior
» Supported Permission Classes Configuring Applications to Use OPSS
» Specifying Bootstrap Credentials Manually
» Migrating Identities with migrateSecurityStore
» Example of Configuration File jps-config.xml
» Links to Authentication Topics for Java EE Applications
» The Identity Store Authentication for Java SE Applications
» Configuring an LDAP Identity Store in Java SE Applications
» Supported Login Modules for Java SE Applications
» Using the OPSS API LoginService in Java SE Applications
» Supported Services The OPSS Java SE Client
» Configuration Examples The OPSS Java SE Client
» Configuring File-Based Policy and Credential Stores
» Configuring LDAP-Based Policy and Credential Stores
» Configuring DB-Based OPSS Security Stores
» Unsupported Methods for File-Based Policy Stores
» About the Credential Store Framework API
» Guidelines for Granting Permissions Permissions Grant Example 1
» Overview of Application Development with CSF Guidelines for the Map Name
» Code for CSF Operations Example 1: Java SE Application with Wallet Store
» Example 2: Java EE Application with Wallet Store
» Example 3: Java EE Application with LDAP Store
» Configuring the Credential Store Best Practices
» User and Role API and the Oracle WebLogic Server Authenticators
» Summary of Roles and Classes
» Understanding Service Providers Working with Service Providers
» Selecting the Provider Working with Service Providers
» Creating the Provider Instance
» Properties for Provider Configuration
» Configuring the Provider when Creating a Factory Instance
» Configuring the Provider when Creating a Store Instance
» Runtime Configuration Working with Service Providers
» Specifying Search Parameters Searching the Repository
» Using Search Filters Searching the Repository
» Handling Special Characters when Creating Identities Creating an Identity
» Example 1: Searching for Users
» Example 2: User Management in an Oracle Internet Directory Store
» Example 3: User Management in a Microsoft Active Directory Store
» Out-of-the-box Support for SSL
» Customizing SSL Support for the User and Role API
» User Authentication The User and Role API Reference
» SPI Overview Types of User and Role Providers
» Developing a Read-Only Provider
» Policy-Related Scripts Oracle Fusion Middleware Online Documentation Library
» Credential-Related Scripts Oracle Fusion Middleware Online Documentation Library
Show more