Jeton de nom d'utilisateur avec protection des messages asymétrique du jeton X509 (authentification mutuelle)

Un jeton X509 associé à une représentation émetteur/série du certificat public de l'expéditeur est inclus dans le message. Le jeton de nom d'utilisateur dans la demande et le corps SOAP dans la demande et dans la réponse sont signés et chiffrés avec la protection des messages asymétrique du jeton X509. Il existe également un horodatage du message et une confirmation de signature. Un jeton de nom d'utilisateur associé à un mot de passe en texte en clair est utilisé pour l'authentification.

Ce modèle de règle est le plus adapté si le client doit s'authentifier auprès du service avec un certificat client X509 et un jeton de nom d'utilisateur.

La règle suivante illustre un jeton de nom d'utilisateur associé à la protection des messages asymétrique du jeton X509 :
<wsp:Policy wsu:Id="AsymmetricX509MutualAuthenticationWithUnt">
  <wsp:ExactlyOne>
    <wsp:All>
      <sp:SignedEncryptedSupportingTokens
        xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
        <wsp:Policy>
          <sp:UsernameToken
            sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
            <wsp:Policy>S
              <sp:WssUsernameToken10 />
            </wsp:Policy>
          </sp:UsernameToken>
        </wsp:Policy>
      </sp:SignedEncryptedSupportingTokens>
      <sp:AsymmetricBinding>
        <wsp:Policy>
          <sp:InitiatorToken>
            <wsp:Policy>
              <sp:X509Token
                sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
                <wsp:Policy>
                  <sp:WssX509V3Token10 />
                  <sp:RequireIssuerSerialReference />
                </wsp:Policy>
              </sp:X509Token>
            </wsp:Policy>
          </sp:InitiatorToken>
          <sp:RecipientToken>
            <wsp:Policy>
              <sp:X509Token
                sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
                <wsp:Policy>
                  <sp:WssX509V3Token10 />
                  <sp:RequireIssuerSerialReference />
                </wsp:Policy>
              </sp:X509Token>
            </wsp:Policy>
          </sp:RecipientToken>
          <sp:Layout>
            <wsp:Policy>
              <sp:Strict />
            </wsp:Policy>
          </sp:Layout>
          <sp:IncludeTimestamp />
          <sp:OnlySignEntireHeadersAndBody />
          <sp:EncryptSignature />
          <sp:AlgorithmSuite>
            <wsp:Policy>
              <sp:Basic128 />
            </wsp:Policy>
          </sp:AlgorithmSuite>
        </wsp:Policy>
      </sp:AsymmetricBinding>
      <sp:Wss11>
        <wsp:Policy>
          <sp:MustSupportRefKeyIdentifier />
          <sp:MustSupportRefIssuerSerial />
          <sp:MustSupportRefThumbprint />
          <sp:MustSupportRefEncryptedKey />
          <sp:RequireSignatureConfirmation />
        </wsp:Policy>
      </sp:Wss11>
      <sp:SignedParts>
        <sp:Body />
      </sp:SignedParts>
      <sp:EncryptedParts>
        <sp:Body />
      </sp:EncryptedParts>
    </wsp:All>
  </wsp:ExactlyOne>
</wsp:Policy>
Les espaces de nom utilisés dans cet exemple sont :
  • xmlns:wsp="http://www.w3.org/ns/ws-policy"
  • xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
  • xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"

Cette règle est similaire à la règle par défaut Username WSSecurity définie dans WebSphere Application Server Traditional.


Icône indiquant le type de rubrique Rubrique de concept

Nom du fichier : cwlp_wssec_templates_scenario4.html