2014-08-30 89 views
0

我使用WSO2(版本5)完成第一步,但我不理解声明映射。 目前travelocity.com应用程序正常工作。我可以登录,之后我会重定向到travelocity应用程序的主页 - 一切都很好。WSO2声明配置

不,我希望发送不同的SAML断言作为对travelocity-appl的响应。 因此,我已将“身份提供商声明URI”添加到声明配置(电子邮件和角色)。 我不清楚的是,只有一个选择字段“主题声明URI”。 当我选择了电子邮件地址,比SAML-响应是以下行:

<saml2:Subject> 
     <saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:name">[email protected]</saml2:NameID> 
     <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> 
      <saml2:SubjectConfirmationData InResponseTo="0" 
              NotOnOrAfter="2014-08-30T09:18:56.447Z" 
              Recipient="http://localhost:8080/travelocity.com/samlsso-home.jsp" 
              /> 
     </saml2:SubjectConfirmation> 
    </saml2:Subject> 

当我选择角色的网址为主体声明URI,比我得到的角色:

<saml2:Subject> 
     <saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:name">admin,xccx,asqs,Internal/identity,Internal/travelocity.com,Internal/everyone</saml2:NameID> 
     <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> 
      <saml2:SubjectConfirmationData InResponseTo="0" 
              NotOnOrAfter="2014-08-30T09:18:56.447Z" 
              Recipient="http://localhost:8080/travelocity.com/samlsso-home.jsp" 
              /> 
     </saml2:SubjectConfirmation> 
    </saml2:Subject> 

但是我会在SAML响应中获得这两个。

我在做什么错。 非常感谢任何帮助和最好的!

回答

0

您必须使用请求声明来获取SAMLAssertion中的声明。主题声明是您的应用程序预期的用户名。

enter image description here