2017-04-26 3 views
0

ここではPicketlink Federation 2.5.4の抜粋です。Jboss 6.4に同梱されているSP4クラスorg.picketlink.identity.federation.web.handlers.saml2.SAML2AuthenticationHandler(picketlink.org githubのタグなし2.5 .4 SP4?)。私の問題は、トップラインのrequest.getRequestDocument()がnullを返すことです。オブジェクト自体、要求(SAML2HandlerRequestは)(nullでない)正常に見える:FYIPicketlink gets null Document from

public void handleStatusResponseType(SAML2HandlerRequest request, SAML2HandlerResponse response) 
      throws ProcessingException { 
     HTTPContext httpContext = (HTTPContext) request.getContext(); 
     ResponseType responseType = (ResponseType) request.getSAML2Object(); 

    (...) 

    Document responseDocument = request.getRequestDocument(); 
      Element assertionElement = 
        DocumentUtil.getChildElement(responseDocument.getDocumentElement(), 
          new QName(JBossSAMLConstants.ASSERTION.get())); 

      if (assertionElement != null) { 
       try { 
        Document assertionDocument = DocumentUtil.createDocument(); 
        Node clonedAssertion = assertionElement.cloneNode(true); 

        assertionDocument.adoptNode(clonedAssertion); 
        assertionDocument.appendChild(clonedAssertion); 

        String assertionAttributeName = (String) handlerConfig 
          .getParameter(GeneralConstants.ASSERTION_SESSION_ATTRIBUTE_NAME); 

        if (assertionAttributeName != null) { 
         session.setAttribute(assertionAttributeName, assertionDocument); 
        } 

        session.setAttribute(GeneralConstants.ASSERTION_SESSION_ATTRIBUTE_NAME, assertionDocument); 
       } catch (ConfigurationException e) { 
        throw new ProcessingException("Could not store assertion document into session.", e); 
       } 
      } 

、responseDocumentがnullの場合、私は、この文書が必要な理由は、あなたがコードに見るようにということで、その後、asserionElementがありますヌル。 assertionElementがnullの場合、SAMLトークンは指定されたキーの下にHTTPSessionになくなり、それが必要です。

アイデンティティプロバイダはPingIdentityです。 PicketLinkコードベース全体を学ばなければならないうちに、ここで何が起こっているのかについてのヒントや秘訣はありますか?

ありがとうございます!

FYI myセットアップはjboss 6.4で、ピケットリンクは(2.5.4 SP4)、SAMLトークン(IdP)のPingIdentityとともに出荷されます。参考までに、WebApp 1からWebApp 2までのすべてのSSOシナリオで作業していますが、唯一のことはWebApp 2のSSOセッションからSAMLトークンを取得する必要があることです。

答えて

0

))))、 PingIdentity IdP SP接続、ブラウザSSO、プロトコル設定、私は「Encert the Assertion」を持っていました。それを "None"に設定して、それを修正して、HTTPセッションで自分のトークンを取得します。 PKIでは、公開鍵(cert)で暗号化し、秘密鍵(key)で復号化します。だから、ピケットリンクは正しい秘密鍵を持っていなかったが(私はそう思った)、あるいは2つのシステムはこのPKI暗号化/復号化をどのように行うのか理解していない。

関連する問題