Extracting policy and access group definitions
The extraction process reads the access control policy and access group information in the database and generates files that capture the information in XML format. The extraction utility uses an input filter XML file to specify which data to extract from the database. You can extract all access group and policy data, all access group data, or all access group and policy data owned by a particular organization.
You should maintain consistency between the XML files and the access control information in the database for several reasons:
- When you create an instance of WebSphere Commerce, the policy and access group definitions are loaded from the XML files.
- The XML files offer a convenient way to directly view and edit your policies and their component parts so keeping the files up-to-date is essential.
When you have finalized and tested your policy changes, you should update the XML files to keep them in sync with policy information in the databases. For a description of the different XML files related to access control policies and access groups, see Define access control policy elements using XML. Explanations on how to extract policy changes from the databases into the XML files and how to load the policy information from the XML files into the databases are also included.
To extract data, use the appropriate filter file:
- If you are extracting access group and policy data for a particular organization, edit the OrganizationPoliciesFilter.xml filter file to specify the organization ID. The OrganizationPoliciesFilter.xml is located in the following directory:
WC_installdir/xml/policies/xml
- Windows: WC_installdir\xml\policies\xml
Search for all instances of "member_id" and modify the associated value to the organizational ID for which you want to extract the policies.
- To run the utility:
AIX|Linux|Solaris|Windows:
You must login as a user which has the following permissions:
- Read/write/execute authority to the directories, subdirectories, and files of WC_installdir/xml/policies and WC_installdir/logs.
- Read/execute authority to the WC_installdir/bin directory and its files.
If the user does not have the required authority, you need to grant this authority using the chmod command.
I5/OS: You must login with a profile which has the following permissions:
- Read/write/execute authority to files under WC_installdir/xml/policies, WC_userdir /instances and WC_userdir /instances/ instance/logs.
- Read/execute authority to the WC_installdir/bin directory and its files.
For example, define the profile with USRCLS *SECOFR.
- From the WC_installdir/bin directory, type the following:
- Windows: acpextract.cmd database_name database_user database_user_password filter_file schema_name
acpextract.sh database_name database_user database_user_password filter_file schema_name
- acpextract filter_file
Where:
- database_name
- (Required) Name of the database in which to load the policy.
- database_user
- (Required) Name of the database user who can connect to the database.
- database_user_password
- (Required) The associated password for the database user.
- filter_file
- (Required)
- ACPoliciesfilter.xml
- Extracts all access group and policy data.
- ACUserGroupsFilter.xml
- Extract all access group data.
- OrganizationPoliciesFilter.xml
- Extract all access group and policy data for a particular organization. Before using this file, it should be edited to specify the required organization ID. The policy data owned by this organization ID will be extracted.
- schema_name
- (Optional) The name of target database schema. This name is normally the same as database_user.
For example:
./acpextract.sh mall dbuser dbusrpwd ACPoliciesfilter.xml
- Windows: acpextract.cmd mall dbuser dbusrpwd ACPoliciesfilter.xml
- Check for errors in the log files. Note that errors might not appear on the command line.
- AIX|Linux|Solaris|Windows:
Check the acpextract.log and messages.txt files in the following directory: WC_installdir/logs
- I5/OS:
WC_userdir /instances/acpextract.log
- I5/OS:
WC_userdir /instances/ instance/logs/messages.txt
- Any error files generated in WC_installdir/xml/policies/xml directory.
The following files are created WC_installdir/xml/policies/xml directory.
- ExtractedACPolicies.xml
- Contains data extracted by the acpextract utility for the given filter criteria.
- ExtractedACPolicies.dtd
- The DTD for the ExtractedACPolicies.xml file.
- AccessControlUserGroups.xml
- The file containing the access group definitions.
- AccessControlPolicies.xml
- The file containing the language-independent access control policy information.
- AccessControlPolicies_ locale.xml
- The language-dependent access control policies file that contains the display names and descriptions.
Related Concepts
Authorization
Understanding access control
Related tasks
Define access control policy elements using XML
Related Reference
acpextract utility
acpload utility
acpnlsload utility
acugload utility