{"id":2741,"date":"2011-07-28T13:54:12","date_gmt":"2011-07-28T18:54:12","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=2741"},"modified":"2015-04-17T13:17:47","modified_gmt":"2015-04-17T18:17:47","slug":"soa-11g-tutorial-secure-composite-applications","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=2741","title":{"rendered":"SOA 11g Tutorial: Secure Composite Applications"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Overview\">Overview<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Secure_a_Composite\">Secure a Composite<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Secure_Composite_with_OWSM\">Secure Composite with OWSM<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Overview_1\">Overview<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#View_Built-in_Policies\">View Built-in Policies<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Secure_Credit_Card_Validation_Service\">Secure Credit Card Validation Service<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Define_a_New_User\">Define a New User<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Attach_Policies_with_EM_Console\">Attach Policies with EM Console<\/a>\n\t\t\t\t<ol class='toc-odd level-3'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Attach_Policy_to_receivePO\">Attach Policy to receivePO<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Attach_Policy_to_getCreditCardStatus\">Attach Policy to getCreditCardStatus<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Attach_Policy_to_getStatusByCC\">Attach Policy to getStatusByCC<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Attach_Policies_with_JDeveloper\">Attach Policies with JDeveloper<\/a>\n\t\t\t\t<ol class='toc-odd level-3'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Secure_POProcessing_Composite\">Secure POProcessing Composite<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Secure_validationForCC_Composite\">Secure validationForCC Composite<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Test_Security_Policy\">Test Security Policy<\/a>\n\t\t\t\t<ol class='toc-even level-2'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Test_with_Wrong_Password\">Test with Wrong Password<\/a>\n\t\t\t\t\t<\/li>\n<\/ol>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<p>This is part of the <a href=\"?p=1924\">Oracle SOA11g hands on tutorials<\/a>.<\/p>\n<span id=\"Overview\"><h2>Overview<\/h2><\/span>\n<p>* Composite security should be configured by system administrators, NOT coded by developers.<\/p>\n<span id=\"Secure_a_Composite\"><h3>Secure a Composite<\/h3><\/span>\n<p>* Authenticate client invoking the composite.<br \/>\n* Authorize client accessing service.<br \/>\n* Sign messages.<br \/>\n* Encrypt messages.<br \/>\n* Propagate client identity to downstream services.<\/p>\n<span id=\"Secure_Composite_with_OWSM\"><h2>Secure Composite with OWSM<\/h2><\/span>\n<p>* OWSM: Oracle Web Services Manager<\/p>\n<span id=\"Overview_1\"><h3>Overview<\/h3><\/span>\n<p>* OWSM supports standard-based policy management, attachment, and enforcement.<br \/>\n* Policies can be created and attached to<br \/>\n&#8211; composite services,<br \/>\n&#8211; references,<br \/>\n&#8211; components.<br \/>\n* Policy management and attachment can be done in<br \/>\n&#8211; EM console<br \/>\n&#8211; JDev via deployment plan<br \/>\n* Examples of Policies<br \/>\n&#8211; Authorization policies<br \/>\n&#8211; WS-Security<br \/>\n&#8211; WS- Addressing<br \/>\n&#8211; MTOM<br \/>\n&#8211; WS-ReliableMessaging<br \/>\n&#8211; Management policies, e.g. logging<\/p>\n<span id=\"View_Built-in_Policies\"><h3>View Built-in Policies<\/h3><\/span>\n<p>* Go to EM console<br \/>\n* Farm_soa_domain -> Expand WebLogic Domain<br \/>\n* Right click soa_domain<br \/>\n* Select Web Services -> Policies<\/p>\n<span id=\"Secure_Credit_Card_Validation_Service\"><h2>Secure Credit Card Validation Service<\/h2><\/span>\n<span id=\"Define_a_New_User\"><h3>Define a New User<\/h3><\/span>\n<p>* Login WebLogic Admin Console.<br \/>\n* Click Security Realms link in Domain Structure panel.<br \/>\n* Click myrealm link in the Summary of Security Realms panel.<br \/>\n* Click Users and Groups tab.<br \/>\n* Click New button to bring up the Create a New User page. Enter:<br \/>\n&#8211; Name: weblogic1<br \/>\n&#8211; Password: welcome1<br \/>\n&#8211; Click OK button.<br \/>\n* Click weblogic1 user to bring up the Settings for weblogic1 page.<br \/>\n&#8211; Click Groups tab.<br \/>\n&#8211; Select Administrators group on Available list and click the single right arrow to move it to Chosen list.<br \/>\n&#8211; Click Save button.<\/p>\n<span id=\"Attach_Policies_with_EM_Console\"><h3>Attach Policies with EM Console<\/h3><\/span>\n<p>* Login EM console.<\/p>\n<span id=\"Attach_Policy_to_receivePO\"><h4>Attach Policy to receivePO<\/h4><\/span>\n<p>* Click on POProcessing composite link.<br \/>\n* Click on Policies tab.<br \/>\n* Click Attach To\/Detach From drop down list and select receivePO. It will bring up a new window.<br \/>\n* In the Available Policies panel, select oracle\/wss_username_token_service_policy and click the Attach button.<br \/>\n* Click the OK button.<\/p>\n<span id=\"Attach_Policy_to_getCreditCardStatus\"><h4>Attach Policy to getCreditCardStatus<\/h4><\/span>\n<p>* Attach: oracle\/wss11_saml_token_with_message_protection_client_policy<\/p>\n<span id=\"Attach_Policy_to_getStatusByCC\"><h4>Attach Policy to getStatusByCC<\/h4><\/span>\n<p>* Click validationForCC composite application<br \/>\n* Click on Policies tab.<br \/>\n* Attach: oracle\/ wss11_saml_token_with_message_protection_service_policy<\/p>\n<span id=\"Attach_Policies_with_JDeveloper\"><h3>Attach Policies with JDeveloper<\/h3><\/span>\n<span id=\"Secure_POProcessing_Composite\"><h4>Secure POProcessing Composite<\/h4><\/span>\n<p>* Open POProcessing composite.xml file.<br \/>\n* Right click receivePO and select Configure WS Policies&#8230;<br \/>\n* Click the green plus sign to the right of Security field.<br \/>\n* Select: oracle\/wss_username_token_service_policy and click OK<br \/>\n* Notice receivePO has a new lock icon on the upper right corner.<br \/>\n* Do the same and select oracle\/wss11_saml_token_with_message_protection_client_policy.<\/p>\n<span id=\"Secure_validationForCC_Composite\"><h4>Secure validationForCC Composite<\/h4><\/span>\n<p>* Open validationForCC composite.xml file.<br \/>\n* Right click getStatusByCC and select Configure WS Policies&#8230;<br \/>\n* select  oracle\/ wss11_saml_token_with_message_protection_service_policy<\/p>\n<span id=\"Test_Security_Policy\"><h2>Test Security Policy<\/h2><\/span>\n<p>* Click the Test tab.<br \/>\n* Click Request -> Security accordion.<br \/>\n* Select WSS username Token and enter<br \/>\n&#8211; Username: weblogic1<br \/>\n&#8211; Password: welcome1<br \/>\n* Input message<\/p>\n<pre lang=\"xml\">\r\n<soap:Envelope xmlns:soap=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\">\r\n    <soap:Body xmlns:ns1=\"http:\/\/xmlns.oracle.com\/ns\/order\">\r\n        <ns1:PurchaseOrder>\r\n            <ns1:CustID>1111<\/ns1:CustID>\r\n            <ns1:ID>2121<\/ns1:ID>\r\n            <ns1:productName>Bluetooth Headset<\/ns1:productName>\r\n            <ns1:itemType>Electronics<\/ns1:itemType>\r\n            <ns1:price>49.99<\/ns1:price>\r\n            <ns1:quantity>1<\/ns1:quantity>\r\n            <ns1:status>Initial<\/ns1:status>\r\n            <ns1:ccType>Mastercard<\/ns1:ccType>\r\n            <ns1:ccNumber>8765-8765-8765-8765<\/ns1:ccNumber>\r\n        <\/ns1:PurchaseOrder>\r\n    <\/soap:Body>\r\n<\/soap:Envelope>\r\n<\/pre>\n<span id=\"Test_with_Wrong_Password\"><h3>Test with Wrong Password<\/h3><\/span>\n<p>* Repeat the same test but purposely use the wrong password welcome2<br \/>\n* Check that web service invocation fails.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is part of the Oracle SOA11g hands on tutorials. Overview * Composite security should be configured by system administrators, NOT coded by developers. Secure a Composite * Authenticate client invoking the composite. * Authorize client accessing service. * Sign &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=2741\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[100],"tags":[],"class_list":["post-2741","post","type-post","status-publish","format-standard","hentry","category-soa11g"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-Id","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2741"}],"version-history":[{"count":11,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2741\/revisions"}],"predecessor-version":[{"id":10635,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2741\/revisions\/10635"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}