0

다른 요청에서 사용하기 위해 보안 토큰을 얻기 위해 SoapUI를 사용하여 RequestSecurityToken 요청에 인증서 서명과 타임 스탬프를 지정해야하지만 올바르게 구현하는 데 문제가 있습니다. 여기SoapUI에서 인증서 인증을 사용하는 STS 요청

다른 응용 프로그램과 올바른 요청,하지만 같은 인증서 : SoapUI에서

<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> 
    <u:Timestamp u:Id="_0"> 
     <u:Created>2016-10-24T14:35:54.851Z</u:Created> 
     <u:Expires>2016-10-24T14:40:54.851Z</u:Expires> 
    </u:Timestamp> 
    <o:BinarySecurityToken u:Id="uuid-e5fff67c-e3ce-4c63-86da-9661adfd6e0c-2" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">...MIIFgTCCBGmgAwIBAgIKOePZb(shortened)...</o:BinarySecurityToken> 
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> 
     <SignedInfo> 
      <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
      <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> 
      <Reference URI="#_0"> 
       <Transforms> 
        <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
       </Transforms> 
       <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> 
       <DigestValue>tsLKDNU0lJ5SB1p75WGVjd7LMHc=</DigestValue> 
      </Reference> 
      <Reference URI="#_1"> 
       <Transforms> 
        <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
       </Transforms> 
       <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> 
       <DigestValue>4QwJS9rCbZb1B3DcR37qnuJgSl4=</DigestValue> 
      </Reference> 
     </SignedInfo> 
     <SignatureValue>...gmAXzaf8hhj44/M0Q(shortened)...</SignatureValue> 
     <KeyInfo> 
      <o:SecurityTokenReference> 
       <o:Reference URI="#uuid-e5fff67c-e3ce-4c63-86da-9661adfd6e0c-2"/> 
      </o:SecurityTokenReference> 
     </KeyInfo> 
    </Signature> 
</o:Security> 

, WSS의 설정에서 나는 timestmap 및 서명을 할 수 있습니다 키 스토어 내 인증서와 만들어 나가는 구성으로 추가 할 수 있습니다. Signature에서 바이너리 보안 토큰으로 구성하고 키 저장소, 별칭 및 암호를 선택합니다. 나는 방법과 실험,하지만 하나를 해결하는 가장 가까운 결과는이 :이 요청에

<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> 
    <u:Timestamp u:Id="TS-6EB3E416E924850AA51477473502423447"> 
     <u:Created>2016-10-26T09:18:22.423Z</u:Created> 
     <u:Expires>2016-10-26T09:23:22.423Z</u:Expires> 
    </u:Timestamp> 
    <wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" u:Id="X509-6EB3E416E924850AA51477473502407442">...CCBGmgAwIBAgIKOeP(shortened)..." xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> 
     <ds:SignedInfo> 
      <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
      <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> 
      <ds:Reference URI="#id-6EB3E416E924850AA51477473502408445"> 
       <ds:Transforms> 
        <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
       </ds:Transforms> 
       <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> 
       <ds:DigestValue>ylZ7mgRanKsz3pYpbSXtE3FoVcc=</ds:DigestValue> 
      </ds:Reference> 
     </ds:SignedInfo> 
     <ds:SignatureValue>...PwHLpHxINEYUGoCM+Tsz9ucg(shortened)...</ds:SignatureValue> 
     <ds:KeyInfo Id="KI-6EB3E416E924850AA51477473502407443"> 
      <wsse:SecurityTokenReference u:Id="STR-6EB3E416E924850AA51477473502407444"> 
       <wsse:Reference URI="#X509-6EB3E416E924850AA51477473502407442" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/> 
      </wsse:SecurityTokenReference> 
     </ds:KeyInfo> 
    </ds:Signature> 
</wsse:Security> 

, 나는 오류 메시지

메시지에 대한 보안을 검증 할 때 오류가 발생했습니다와 응답이있다.

내가보기에, 올바른 요청에는 SoapUI 요청보다 다른 URI가있는 두 개의 참조가 있지만 SoapUI에서 올바른 요청을 시뮬레이트하는 방법을 알아 내지 못합니다. 나는 약간의 추천을 얻게되어 기쁠 것입니다, 어쩌면 누군가 비슷한 문제를 겪었을 것입니다.

답변

0

기본값 인 soapui는 soap-body 요소에만 서명합니다. "Parts :"구성에서 서로 다른 요소를 추가 할 수 있습니다.

파트 테이블에 다음 (ID, 이름, 네임 스페이스, 인코딩)을 추가 :

첫 번째 항목 타임 스탬프의 내용을 빈

두 번째 항목은 본문 내용을

  • 바디
  • http://schemas.xmlsoap.org/soap/envelope/
  • 요소
    • 휴가 ID에 서명하고 soapui 타임 스탬프 본문 요소에 서명합니다.

      주석 : WSS-Entries 목록에서 "Signature"앞에 Timestamp를 추가해야합니다.

    관련 문제