eclipse-ee4j / metro-wsit

metro-wsit
https://eclipse-ee4j.github.io/metro-wsit/
BSD 3-Clause "New" or "Revised" License
6 stars 21 forks source link

SslContextToken is not implemented? #122

Open GitAntoinee opened 3 years ago

GitAntoinee commented 3 years ago

Logs:

juin 05, 2021 8:28:58 PM com.sun.xml.ws.security.impl.policy.Constants log_invalid_assertion
AVERTISSEMENT: SP0100 : l'assertion de stratégie Assertion[com.sun.xml.ws.policy.sourcemodel.DefaultPolicyAssertionCreator$DefaultPolicyAssertion] {
    assertion data {
        namespace = 'http://schemas.microsoft.com/ws/2005/07/securitypolicy'
        prefix = 'mssp'
        local name = 'SslContextToken'
        value = 'null'
        optional = 'false'
        ignorable = 'false'
        attributes {
            name = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy:IncludeToken', value = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient'
        }
    }
    no parameters
    nested policy {
        namespace version = 'v1_5'
        id = 'null'
        name = 'null'
        vocabulary {
            1. entry = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy:RequireDerivedKeys'
        }
        assertion set {
            Assertion[com.sun.xml.ws.policy.sourcemodel.DefaultPolicyAssertionCreator$DefaultPolicyAssertion] {
                assertion data {
                    namespace = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy'
                    prefix = 'sp'
                    local name = 'RequireDerivedKeys'
                    value = 'null'
                    optional = 'false'
                    ignorable = 'false'
                    no attributes
                }
                no parameters
                no nested policy
            }
        }
    }
} n'est pas prise en charge sous l'assertion Token.
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "com.sun.xml.wss.impl.policy.mls.SignaturePolicy.getFeatureBinding()" because "this.signaturePolicy" is null
    at com.sun.xml.ws.security.impl.policyconv.SignedSupportingTokensProcessor.addToPrimarySignature(SignedSupportingTokensProcessor.java:60)
    at com.sun.xml.ws.security.impl.policyconv.SupportingTokensProcessor.process(SupportingTokensProcessor.java:121)
    at com.sun.xml.ws.security.impl.policyconv.BindingProcessor.processSupportingTokens(BindingProcessor.java:311)
    at com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.processNonBindingAssertions(XWSSPolicyGenerator.java:246)
    at com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:174)
    at com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:130)
    at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.constructPolicyHolder(SecurityTubeBase.java:1372)
    at com.sun.xml.wss.jaxws.impl.SecurityClientTube.addOutgoingProtocolPolicy(SecurityClientTube.java:688)
    at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.buildProtocolPolicy(SecurityTubeBase.java:1317)
    at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.collectPolicies(SecurityTubeBase.java:764)
    at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.<init>(SecurityTubeBase.java:247)
    at com.sun.xml.wss.jaxws.impl.SecurityClientTube.<init>(SecurityClientTube.java:124)
    at com.sun.xml.wss.provider.wsit.SecurityTubeFactory.createTube(SecurityTubeFactory.java:251)
    at com.sun.xml.ws.assembler.TubeCreator.createTube(TubeCreator.java:62)
    at com.sun.xml.ws.assembler.MetroTubelineAssembler.createClient(MetroTubelineAssembler.java:111)
    at com.sun.xml.ws.client.Stub.createPipeline(Stub.java:313)
    at com.sun.xml.ws.client.Stub.<init>(Stub.java:280)
    at com.sun.xml.ws.client.Stub.<init>(Stub.java:213)
    at com.sun.xml.ws.client.Stub.<init>(Stub.java:228)
    at com.sun.xml.ws.client.sei.SEIStub.<init>(SEIStub.java:68)
    at com.sun.xml.ws.client.WSServiceDelegate.getStubHandler(WSServiceDelegate.java:791)
    at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:780)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:422)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:390)
    at jakarta.xml.ws.Service.getPort(Service.java:181)

Process finished with exit code 1

GitAntoinee commented 3 years ago

I think this is this who cause problem :

<sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <wsp:Policy>
      <sp:ProtectionToken>
         <wsp:Policy>
            <mssp:SslContextToken xmlns:mssp="http://schemas.microsoft.com/ws/2005/07/securitypolicy" sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
               <wsp:Policy>
                  <sp:RequireDerivedKeys />
               </wsp:Policy>
            </mssp:SslContextToken>
         </wsp:Policy>
      </sp:ProtectionToken>
      <sp:AlgorithmSuite>
         <wsp:Policy>
            <sp:Basic256 />
         </wsp:Policy>
      </sp:AlgorithmSuite>
      <sp:Layout>
         <wsp:Policy>
            <sp:Strict />
         </wsp:Policy>
      </sp:Layout>
      <sp:IncludeTimestamp />
      <sp:EncryptSignature />
      <sp:OnlySignEntireHeadersAndBody />
   </wsp:Policy>
</sp:SymmetricBinding>
lukasj commented 3 years ago

attaching a reproducer and/or pointer to a reproducer on GH would help