Download java-samples

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
WCF Custom Bindings for Axis2
Sample Java Client Implementation Guide
I
1.0 Prerequisites
1.
2.
3.
4.
Eclipse IDE
Subversion Client
JDK 1.6
Patch the JDK with java unlimited key strength files
2.0 Setting up the samples
1. Get an SVN check out of the java client code
C:\> svn co https://svn.wso2.org/repos/wso2/people/prabath security-interop
This will check out all the sample code to c:\security-interop folder
2. Start Eclipse and create a new workspace.
3. Import all the projects from c:\security-interop folder to the Eclipse
workspace.
4. Right click on any eclipse project imported to the workspace 
Properties  Java Build Path  Add Variable  Configure Variables 
New  Set Name to SAMPLES_HOME and Path to c:\ security-interop
5. Build all the projects in the workspace, Project  Build All
3.0 Keys to setup at the WCF service end
Public key and the private key used with all the java clients can be
downloaded from
https://svn.wso2.org/repos/wso2/people/prabath/keys
4.0 Key store details used at the client end
Key store name
Key store password
Private key password
Private key alias
Location
: wso2carbon.jks
: wos2carbon
: wso2carbon
: wso2carbon
: c:\ security-interop\lib
5.0 WSDL location of the sample service
https://svn.wso2.org/repos/wso2/people/prabath/wsdl/service.wsdl
II
6.0 Sample Guide
Sample Project
Description
Security Policy
Notes
org.apache.rampart.security.policy1
Transport binding / UsernameToken as SignedSupportingTokens
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-1.xml
1. In the EchoServiceClient.java you need to change the user
name and password of the user to be appropriate to the
setup.
client.getOptions().setPassword("admin");
client.getOptions().setUserName("admin");
2. Set RELYING_PARTY_SERVICE_EPR in
EchoServiceClient.java to the correct WCF EP.
Sample Project
Description
Security Policy
Notes
Sample Project
Description
Security Policy
Notes
org.apache.rampart.security.policy2
AsymmetricBinding / Sign and Encrypt
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-2.xml
1. Set RELYING_PARTY_SERVICE_EPR in
EchoServiceClient.java to the correct WCF EP.
org.apache.rampart.security.policy3
SymmetricBinding / Sign and Encrypt with UsernameToken
Authentication
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-3.xml
1. In the EchoServiceClient.java you need to change the user
name and password of the user to be appropriate to the
setup.
client.getOptions().setPassword("admin");
client.getOptions().setUserName("admin");
III
2. Set RELYING_PARTY_SERVICE_EPR in
EchoServiceClient.java to the correct WCF EP.
Sample Project
Description
Security Policy
Notes
Sample Project
Description
Security Policy
Notes
Sample Project
Description
Security Policy
STS Policy
Notes
org.apache.rampart.security.policy4
SymmetricBinding / Sign only
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-4.xml
1. Set RELYING_PARTY_SERVICE_EPR in
EchoServiceClient.java to the correct WCF EP.
org.apache.rampart.security.policy5
AsymmetricBinding / Sign only
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-5.xml
1. Set RELYING_PARTY_SERVICE_EPR in
EchoServiceClient.java to the correct WCF EP.
org.apache.rampart.security.policy6
SecureConversation - Sign only - Service as STS - Bootstrap policy
- Sign and Encrypt , X509 Authentication
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-6.xml
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-6.xml
1. Set RELYING_PARTY_SERVICE_EPR in
EchoServiceClient.java to the correct WCF EP.
2. Set STS_EPR in EchoServiceClient.java to the correct WCF
EP.
IV
Sample Project
Description
Security Policy
STS Policy
Notes
Sample Project
Description
Security Policy
STS Policy
Notes
org.apache.rampart.security.policy7
SecureConversation - Sign and Encrypt - Service as STS –
Bootstrap policy - Sign and Encrypt , X509 Authentication
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-7.xml
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-7-1.xml
1. Set RELYING_PARTY_SERVICE_EPR in
EchoServiceClient.java to the correct WCF EP.
2. Set STS_EPR in EchoServiceClient.java to the correct WCF
EP.
org.apache.rampart.security.policy8
SecureConversation - Sign and Encrypt - Service as STS –
Bootstrap policy - Sign and Encrypt , Anonymous clients
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-8.xml
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-8-1.xml
1. Set RELYING_PARTY_SERVICE_EPR in
EchoServiceClient.java to the correct WCF EP.
2. Set STS_EPR in EchoServiceClient.java to the correct WCF
EP.
V
Sample Project
Description
Security Policy
STS Policy
Notes
org.apache.rampart.security.policy9
SecureConversation - Sign and Encrypt - Service as STS –
Bootstrap policy - Sign and Encrypt , Username Token
Authentication
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-9.xml
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-9-1.xml
1. In the EchoServiceClient.java you need to change the user
name and password of the user to be appropriate to the
setup.
client.getOptions().setPassword("admin");
client.getOptions().setUserName("admin");
stsOptions.setPassword("admin");
stsOptions.setUserName("admin");
2. Set RELYING_PARTY_SERVICE_EPR in
EchoServiceClient.java to the correct WCF EP.
3. Set STS_EPR in EchoServiceClient.java to the correct WCF
EP.
Sample Project
Description
Security Policy
Notes
References
org.apache.rampart.security.policy10
SymmetricBinding / WssGssKerberosV5ApReqToken11
https://svn.wso2.org/repos/wso2/people/prabath/servicepolicies/policy-10.xml
1. Set RELYING_PARTY_SERVICE_EPR in
EchoServiceClient.java to the correct WCF EP.
1. Kerberos authentication with WCF Service and WCF Client
, http://blog.facilelogin.com/2010/12/kerberosauthentication-with-wcf.html
2. Kerberos authentication with WCF Service and Java
Client, http://blog.facilelogin.com/2010/12/kerberosauthentication-with-wcf_04.html
3. Kerberos authentication with WSO2 ESB ,
http://blog.facilelogin.com/2010/12/kerberosauthentication-with-wso2-esb.html
4. Invoking a WCF service secured with Kerberos via WSO2
ESB, http://blog.facilelogin.com/2010/12/invoking-wcfVI
service-secured-with.html
VII