.NET based OES XACML Samples ---------------------------- Overview -------- This test suite provides C#.NET based samples, which can be run against the OES XACML gateway. The following cases are tested in the suite: 1)Authorization with user-role. 2)Authorization using resource attribute. 3)Authorization using environment attribute. 4)Authorization using predicates and obligations. Software Pre-requisites ----------------------- 1)Oracle IDM suite. 2)Oracle Weblogic Server. 3)OES Client. 4)Running Oracle DB. 5)Oracle Repository Creation Utility (rcu). 6)Microsoft Visual Studio 2008 or later. Environment Setup ----------------- 1) Install and configure the "Oracle Entitlements Server" and "OES client" using the guide at http://download.oracle.com/docs/cd/E21764_01/install.1111/e12002/oes.htm a) Install OES with an SSL port. b) Configure a Webservice Security Module (WS SM) when installing "OES Client". c) Configure the WS SM in "uncontrolled" or "controlled-push" mode. 2)Start the WS SM client. Go to \oes_sm_instances\. Run startWSServer.cmd Test Setup and run ------------------ 1)Extract the test to a convenient location. Go to the extracted examples folder. 2)Seed policies in store. Run "\common\bin\wlst.cmd seed_policy.py t3://:". 3)If the WS SM is configured in "controlled-push" mode, perform the following: a)Open a browser window and go to "http://:/apm". b)Login with your weblogic username or password. c)Click on "System Configuration" tab. d)In the left pane, click on "Security Modules" and click "Open". e)Click "New" in the top-right pane. Enter the name of the configured WS SM under "Name" and click "Save". f)Click "Add" in the bottom-right pane. Search for "xacml" and add the application. g)Click on "Authorization Management" tab. In the left pane, expand "Applications". h)Click on "xacml" and click "Open". i)Click on "Policy Distribution" tab. j)Click on the configured WS SM and click "Distribute". k)Check distribution station by clicking "Refresh". Wait for distribution to complete. l)Logout from the apm tool. 4)Open wsxacml_client_sample.NET.sln using Microsoft Visual Studio. 5)Expand "Service References". Right click "AuthorizationServiceReference" and click "Configure Service Reference...". 6)Update "Address" to the appropriate WSDL URL for Authorization service. The WSDL URL would be of form "http://:/Authorization?WSDL". 7)Re-configure "XACMLServiceReference" using procedure similar to Step 5-6. The WSDL URL would be of form "http://:/XACMLAuthorization?WSDL". 8)Update generated stubs by right clicking on "AuthorizationService" and clicking "Update Service Reference". 9)Repeat Step 8 for "XACMLServiceReference". 10)Run the project by Clicking "Debug>Start Debugging" from the menu. See Note 1 in case of compile errors. 11)The test is menu driven. Select appropriate option to run the required test. 12)Remove test policies from store. Run "\common\bin\wlst.cmd delete_policy.py t3://:". Note 1: Workaround on Visual Studio 2008 Bug ------------------------------------ If you get a compile error "wsxacml_client_sample.NET\Service References\XACMLServiceReference\Reference.cs(4281,72): error CS0102: The type 'wsxacml_client_sample.NET.XACMLServiceReference.FaultInfoType' already contains a definition for 'PropertyChanged'", 1)Double click on the error. This will open Reference.cs. 2)Go to the top of the file and delete the whole first definition of "public partial class FaultInfoType". To do this, click the '-' sign in the margin next to FaultTypeInfo and select the whole line till the elipsis ("...") at the end. and press delete. 3)Also delete the lines after "using System;" and before the line of "public partial class FaultInfoType".