0
votes

For a WCF web service client, is it possible to configure a web service with both a Username Token and an x509 certificate using SVCConfigEditor?

Is the following wsdl helpful in this interop scenario with an IBM Websphere web service? Thank you, Greg

    <wsp:Policy wsu:Id="policy0" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsp:ExactlyOne>
  <wsp:All>
    <sp:AsymmetricBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
      <wsp:Policy>
        <wsp:ExactlyOne>
          <wsp:All>
            <sp:InitiatorToken>
              <wsp:Policy>
                <wsp:ExactlyOne>
                  <wsp:All>
                    <sp:X509Token>
                      <wsp:Policy>
                        <wsp:ExactlyOne>
                          <wsp:All>
                            <sp:WssX509V3Token11 />
                          </wsp:All>
                        </wsp:ExactlyOne>
                      </wsp:Policy>
                    </sp:X509Token>
                  </wsp:All>
                </wsp:ExactlyOne>
              </wsp:Policy>
            </sp:InitiatorToken>
            <sp:RecipientToken>
              <wsp:Policy>
                <wsp:ExactlyOne>
                  <wsp:All>
                    <sp:X509Token>
                      <wsp:Policy>
                        <wsp:ExactlyOne>
                          <wsp:All>
                            <sp:WssX509V3Token11 />
                          </wsp:All>
                        </wsp:ExactlyOne>
                      </wsp:Policy>
                    </sp:X509Token>
                  </wsp:All>
                </wsp:ExactlyOne>
              </wsp:Policy>
            </sp:RecipientToken>
            <sp:AlgorithmSuite>
              <wsp:Policy>
                <wsp:ExactlyOne>
                  <wsp:All>
                    <sp:TripleDesRsa15 />
                  </wsp:All>
                </wsp:ExactlyOne>
              </wsp:Policy>
            </sp:AlgorithmSuite>
          </wsp:All>
        </wsp:ExactlyOne>
      </wsp:Policy>
    </sp:AsymmetricBinding>
    <sp:SignedParts xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
      <sp:Body />
    </sp:SignedParts>
    <sp:EncryptedParts xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
      <sp:Body />
    </sp:EncryptedParts>
  </wsp:All>
</wsp:ExactlyOne>

http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702 Implements WS Security Policy 1.2 - UsernameToken 1.0 support

2

2 Answers

0
votes

Not possibnle with plain svcutil, you need custom code. However you could create a binding (via code) with username supporting token and then use svcutil to define this binding.

0
votes

I think its pretty obvious by now that SVCConfigEditor is not the tool. This was a suggestion that does not take into consideration custom binding, which it doesn't seem to be able to accommodate. Thank you to @Yaron for ideas even though I have not successfully implemented a solution yet.

although I would appreciate clarification @Yaron or a link to how to achieve the following, "instead of xml you could use svcutil, the key would be file-->Open-->Executable... where you choose the dll of your binding. Then it will be available normally like any other binding (you may need to dismiss or approve some message boxes)"**