Hi Gina

I'm confused about one fact. The wresult should contain the response of the STS.
>>>
t:RequestSecurityTokenResponse 
xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust">&
>>>

The namespace is very, very old - I guess WS-Trust 1.0. This should be the 
case. I've worked once with Visual Studio and WIF. Visual Studio provides also 
some sort of Mock IDP/STS to do local testing before integrating with ADFS. 
This Mock was using a more recent version. I can't imagine that ADFS only 
supports that. Do you have an option to configure a different format?

Maybe because of that, an old SAML assertion is used which is not compatible 
with OpenSAML. I've to look into this further...


------

Oliver Wulff

Blog: http://owulff.blogspot.com
Solution Architect
http://coders.talend.com

Talend Application Integration Division http://www.talend.com

________________________________________
From: Gina Choi [ginacho...@gmail.com]
Sent: 16 May 2012 18:05
To: users@cxf.apache.org
Cc: Oliver Wulff
Subject: Re: CXF supporting scope

Hi Oliver,

I am going to work on creating keystore and importing ADFS signing cert
later today. So, after I input my user name and password, ADFS2.0 send me
back saml1.0 token, but it is failed in RP. I mornitored browser trough
fiddler. Exception is occured before check signaure of response, that's why
I am going to deal with signature later.
Following is Exception that I received.


java.lang.NullPointerException
        
org.apache.ws.security.saml.ext.OpenSAMLUtil.fromDom(OpenSAMLUtil.java:84)
        
org.apache.ws.security.saml.ext.AssertionWrapper.parseElement(AssertionWrapper.java:678)
        
org.apache.ws.security.saml.ext.AssertionWrapper.<init>(AssertionWrapper.java:152)
        
org.apache.cxf.fediz.core.saml.SAMLTokenValidator.validateAndProcessToken(SAMLTokenValidator.java:98)
        
org.apache.cxf.fediz.core.FederationProcessorImpl.processSignInRequest(FederationProcessorImpl.java:161)
        
org.apache.cxf.fediz.core.FederationProcessorImpl.processRequest(FederationProcessorImpl.java:79)
        
org.apache.cxf.fediz.tomcat.FederationAuthenticator.authenticate(FederationAuthenticator.java:291)
        
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544)
        
org.apache.cxf.fediz.tomcat.FederationAuthenticator.invoke(FederationAuthenticator.java:116)
        
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
        
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
        
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
        
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
        
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        java.lang.Thread.run(Thread.java:662)



Following is SAML1.0 token that ADFS generated. I don't see log file
is generated.



<html><head><title>Working...</title></head><body><form method="POST"
name="hiddenform"
action="https://wkengchoi.global.sdl.corp:8443/fedizhelloworld/secureservlet/fed/";><input
type="hidden" name="wa" value="wsignin1.0" /><input type="hidden"
name="wresult" value="&lt;t:RequestSecurityTokenResponse
xmlns:t=&quot;http://schemas.xmlsoap.org/ws/2005/02/trust&quot;>&lt;t:Lifetime>&lt;wsu:Created
xmlns:wsu=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot;>2012-05-16T15:46:55.163Z&lt;/wsu:Created>&lt;wsu:Expires
xmlns:wsu=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot;>2012-05-16T16:46:55.163Z&lt;/wsu:Expires>&lt;/t:Lifetime>&lt;wsp:AppliesTo
xmlns:wsp=&quot;http://schemas.xmlsoap.org/ws/2004/09/policy&quot;>&lt;wsa:EndpointReference
xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;>&lt;wsa:Address>https://wkengchoi.global.sdl.corp:8443/fedizhelloworld/&lt;/wsa:Address>&lt;/wsa:EndpointReference>&lt;/wsp:AppliesTo>&lt;t:RequestedSecurityToken>&lt;saml:Assertion
MajorVersion=&quot;1&quot; MinorVersion=&quot;1&quot;
AssertionID=&quot;_a42aef09-be83-4a04-a498-e8318ccc5d87&quot;
Issuer=&quot;http://strts01.ams.dev/adfs/services/trust&quot;
IssueInstant=&quot;2012-05-16T15:46:55.288Z&quot;
xmlns:saml=&quot;urn:oasis:names:tc:SAML:1.0:assertion&quot;>&lt;saml:Conditions
NotBefore=&quot;2012-05-16T15:46:55.163Z&quot;
NotOnOrAfter=&quot;2012-05-16T16:46:55.163Z&quot;>&lt;saml:AudienceRestrictionCondition>&lt;saml:Audience>https://wkengchoi.global.sdl.corp:8443/fedizhelloworld/&lt;/saml:Audience>&lt;/saml:AudienceRestrictionCondition>&lt;/saml:Conditions>&lt;saml:AttributeStatement>&lt;saml:Subject>&lt;saml:NameIdentifier>gc...@global.sdl.corp&lt;/saml:NameIdentifier>&lt;saml:SubjectConfirmation>&lt;saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer&lt;/saml:ConfirmationMethod>&lt;/saml:SubjectConfirmation>&lt;/saml:Subject>&lt;saml:Attribute
AttributeName=&quot;givenname&quot;
AttributeNamespace=&quot;http://schemas.xmlsoap.org/ws/2005/05/identity/claims&quot;>&lt;saml:AttributeValue>Gina&lt;/saml:AttributeValue>&lt;/saml:Attribute>&lt;saml:Attribute
AttributeName=&quot;surname&quot;
AttributeNamespace=&quot;http://schemas.xmlsoap.org/ws/2005/05/identity/claims&quot;>&lt;saml:AttributeValue>Choi&lt;/saml:AttributeValue>&lt;/saml:Attribute>&lt;saml:Attribute
AttributeName=&quot;emailaddress&quot;
AttributeNamespace=&quot;http://schemas.xmlsoap.org/ws/2005/05/identity/claims&quot;>&lt;saml:AttributeValue>gc...@sdl.com&lt;/saml:AttributeValue>&lt;/saml:Attribute>&lt;saml:Attribute
AttributeName=&quot;role&quot;
AttributeNamespace=&quot;http://schemas.microsoft.com/ws/2008/06/identity/claims&quot;>&lt;saml:AttributeValue>Developer&lt;/saml:AttributeValue>&lt;/saml:Attribute>&lt;/saml:AttributeStatement>&lt;saml:AuthenticationStatement
AuthenticationMethod=&quot;urn:federation:authentication:windows&quot;
AuthenticationInstant=&quot;2012-05-16T15:46:55.054Z&quot;>&lt;saml:Subject>&lt;saml:NameIdentifier>gc...@global.sdl.corp&lt;/saml:NameIdentifier>&lt;saml:SubjectConfirmation>&lt;saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer&lt;/saml:ConfirmationMethod>&lt;/saml:SubjectConfirmation>&lt;/saml:Subject>&lt;/saml:AuthenticationStatement>&lt;ds:Signature
xmlns:ds=&quot;http://www.w3.org/2000/09/xmldsig#&quot;>&lt;ds:SignedInfo>&lt;ds:CanonicalizationMethod
Algorithm=&quot;http://www.w3.org/2001/10/xml-exc-c14n#&quot;>&lt;/ds:CanonicalizationMethod>&lt;ds:SignatureMethod
Algorithm=&quot;http://www.w3.org/2001/04/xmldsig-more#rsa-sha256&quot;>&lt;/ds:SignatureMethod>&lt;ds:Reference
URI=&quot;#_a42aef09-be83-4a04-a498-e8318ccc5d87&quot;>&lt;ds:Transforms>&lt;ds:Transform
Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#enveloped-signature&quot;>&lt;/ds:Transform>&lt;ds:Transform
Algorithm=&quot;http://www.w3.org/2001/10/xml-exc-c14n#&quot;>&lt;/ds:Transform>&lt;/ds:Transforms>&lt;ds:DigestMethod
Algorithm=&quot;http://www.w3.org/2001/04/xmlenc#sha256&quot;>&lt;/ds:DigestMethod>&lt;ds:DigestValue>kWfVtgd1oOGYiPzn9GADAJMXTp8IX6yoD7TVu4rYQJo=&lt;/ds:DigestValue>&lt;/ds:Reference>&lt;/ds:SignedInfo>&lt;ds:SignatureValue>e+cwpQuqQdlZzLDS6nwJ4VVPxjB7aI/fnzjVLO/m3vXyYVaR1OrBHup27L1AgH2fZsMKsoXKr7AuTjmeokM8oeCQfd1e1pvyupCoA1GajSa3FrGSkB9nlY4biacCPmwSxa2yUPJSUZSoA1nluJI3G/tCYEDtRpjfzDAFMWeHH1/MCfdIVk9380F3UkVPDoIuGUgJ40LJzXDwFQAhMqaYb5e9cmhCBp8Bxvnx/oYtMsgjHFiZwZczqPD/XT21xD0E8gCaYM+rqtGwq0xcPNq2ZgMxV/Cf+oSAI6OtxEFst/S/LTIfKjH/2au25E12FNmlF0sIRz6/R8xMoyqK6M1psA==&lt;/ds:SignatureValue>&lt;KeyInfo
xmlns=&quot;http://www.w3.org/2000/09/xmldsig#&quot;>&lt;X509Data>&lt;X509Certificate>MIIC2jCCAcKgAwIBAgIQQDXC1xq8aalK9okcdwq1HjANBgkqhkiG9w0BAQsFADApMScwJQYDVQQDEx5BREZTIFNpZ25pbmcgLSBzdHJ0czAxLmFtcy5kZXYwHhcNMTIwMjA1MTExMTMxWhcNMTMwMjA0MTExMTMxWjApMScwJQYDVQQDEx5BREZTIFNpZ25pbmcgLSBzdHJ0czAxLmFtcy5kZXYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCZlXJeY3JIa58gnIfohWvMZ+BMk06KnfLASR9KdtN2xaVI/rstdwZ3LgEzC4a8myPSNOZkJMemqn5amm2HlLFf/947ixspNH/l+qlECSaqxNFZ4cWFtLgA6Re3E3j21btUHE+K0kIXVpljC8ZCEKU334zXn4jfP9wsb22ohA3PguG5q3wxu933CTiuX5rtjq3gGi7ZsTs89OYx13mVka9mC1qXE/NdZzcElXKQCSa32cdbJgbzeEAqtOkhinKcqeS2TfPEvgVWkkRYFq+X7cqqpSqIuM6RwhaG72vxa/Zu0MIfNsIamG2htRkALQr2z00ItGsbuAXosIJYQYt+8v+/AgMBAAEwDQYJKoZIhvcNAQELBQADggEBAIJJM5A6J4il0b5Sl8+k1Tu1LL0sU73mbI1iESTmqsmQH83wq0JkrjeDruAKo5DnZKloLutDBfon3fE87nKjsndCMUYj50UuFuday3IlAbyiZYRbhXvejz6ByUF7gH0d/1Lh27mQkmeG/5OnW5YuatdcXMhTCP+FSigesPKLGS4fSMw7k3OZmRRxT0e9akly1aMBnGpWiUsXDQmO5xSdDkgWZJDO0Hy4M+Qv61jb0/zreCvfyiwU2Ok+S67H9pF4MNbenkPlSMaF+y96E+DOa0xMqI8ygvhm7wxTnPkcaSbrRCD6ozErgUXEn9XpLzCZtJQ2oc4RlJeYVpvxur2L074=&lt;/X509Certificate>&lt;/X509Data>&lt;/KeyInfo>&lt;/ds:Signature>&lt;/saml:Assertion>&lt;/t:RequestedSecurityToken>&lt;t:TokenType>urn:oasis:names:tc:SAML:1.0:assertion&lt;/t:TokenType>&lt;t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue&lt;/t:RequestType>&lt;t:KeyType>http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey&lt;/t:KeyType>&lt;/t:RequestSecurityTokenResponse>"
/><noscript><p>Script is disabled. Click Submit to continue.</p><input
type="submit" value="Submit" /></noscript></form><script
language="javascript">window.setTimeout('document.forms[0].submit()',
0);</script></body></html>



Thanks.



Gina

Reply via email to