In 12c, the OWSM security policy configuration is saved to a separate file called wsm-assembly.xml
In order to update values in wsm-assembly.xml, the service needs to use the <policySet>.
e.g. A configuration plan is required to change both a HTTP port number, and the csf-key used by the oracle/wss_username_token_client_policy OWSM policy.
Replacement without configuration plan:
Open wsm-assembly.xml file and add below code
<?xml version='1.0' encoding='windows-1252'?>
<orawsp:wsm-assembly xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy" xmlns:mds="http://xmlns.oracle.com/mds">
<sca11:policySet xmlns:sca11="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="policySet" appliesTo="SCA-REST-REFERENCE()" attachTo="REFERENCE('Get_Service_Now')" orawsp:highId="2" xml:id="SCA-REST-REFERENCE__REFERENCE__Get_Service_Now__">
<wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" DigestAlgorithm="http://www.w3.org/ns/ws-policy/Sha1Exc" URI="oracle/wss_http_token_client_policy" orawsp:status="enabled" orawsp:id="1"><orawsp:OverrideProperty orawsp:name="csf-key" orawsp:value="yourkey"/>
</wsp:PolicyReference>
<wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" DigestAlgorithm="http://www.w3.org/ns/ws-policy/Sha1Exc" URI="oracle/log_policy" orawsp:status="enabled" orawsp:id="2"/>
</sca11:policySet>
</orawsp:wsm-assembly>
Replacement with configuration plan:
To do this, <searchReplace> would be used to change the HTTP port number, while <policySet> would be used to change the csf-key :-
<searchReplace>
<search>7777</search>
<replace>8888</replace>
</searchReplace>
<policySet id="SCA-REFERENCE__REFERENCE__PartnerLink1___and_PORT__TIB_spcGroup_spcOrder_spcInsert_spcWorkflow_spcProcess__">
<wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" DigestAlgorithm="http://www.w3.org/ns/ws-policy/Sha1Exc" URI="oracle/wss_username_token_client_policy" orawsp:status="enabled" orawsp:id="1">
<orawsp:OverrideProperty xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy" orawsp:name="csf-key" orawsp:value="New-CSFKEY-value"/>
</wsp:PolicyReference>
</policySet>
very informative blog and useful article thank you for sharing with us , Oracle SOA Online Training
ReplyDeleteI tried to use configuration plan for replacing policy property values in my 12c project but while compiling it gives error as below
ReplyDeleteElement 'policySet' not expected.
I removed that then it gave below error
Element 'PolicyReference' not expected.
Its not working at all even if I try to do anything .
Please help
Below is the snippet from the configuration plan file.
You can't do it in configuration plan
Deletearefod-tsu1984 Tiffany West https://wakelet.com/wake/V9p2ritW0AQEemw-2whyD
ReplyDeleteerexatom
YquaelatKim_da-1985 Leslie Holloway MorphVOX Pro
ReplyDeleteVysor
EaseUS Data Recovery Wizard
afininhar
Ometemtinc_ya Jamie Smith click here
ReplyDeletehotlisere