php - Calling an ADFS service with a .pfx certificate -
i trying connect adfs soap service receive sts token. have been given .pfx , not have username or password. first service take .pfx , give me token. use token in subsequent service calls.
i given link: somecompany.com/adfs/services/trust/13/usernamemixed , wsdl. php's built in soap functionality doesn't seem support ws-* functionality don't believe can use wsdl normal soap call. simplesamlphp seems geared towards sps , idps rather consumers. have seen several other libraries looks call adfs service use usernames , passwords rather certificate.
the way have found looks work writing envelope , posting that, seems tedious when doing several different soap calls.
are there ways / libraries call adfs service consumer?
edit:
part of wsdl:
<wsp:policy wsu:id="certificatewstrustbinding_iwstrustfeb2005async_policy"> <wsp:exactlyone> <wsp:all> <sp:transportbinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:policy> <sp:transporttoken> <wsp:policy> <sp:httpstoken requireclientcertificate="false"/> </wsp:policy> </sp:transporttoken> <sp:algorithmsuite> <wsp:policy> <sp:basic256/> </wsp:policy> </sp:algorithmsuite> <sp:layout> <wsp:policy> <sp:strict/> </wsp:policy> </sp:layout> <sp:includetimestamp/> </wsp:policy> </sp:transportbinding> <sp:endorsingsupportingtokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:policy> <sp:x509token sp:includetoken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/includetoken/alwaystorecipient"> <wsp:policy> <sp:requirethumbprintreference/> <sp:wssx509v3token10/> </wsp:policy> </sp:x509token> <mssp:rsatoken sp:includetoken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/includetoken/never" wsp:optional="true" xmlns:mssp="http://schemas.microsoft.com/ws/2005/07/securitypolicy"/> <sp:signedparts> <sp:header name="to" namespace="http://www.w3.org/2005/08/addressing"/> </sp:signedparts> </wsp:policy> </sp:endorsingsupportingtokens> <sp:wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:policy> <sp:mustsupportrefkeyidentifier/> <sp:mustsupportrefissuerserial/> <sp:mustsupportrefthumbprint/> <sp:mustsupportrefencryptedkey/> </wsp:policy> </sp:wss11> <sp:trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:policy> <sp:mustsupportissuedtokens/> <sp:requirecliententropy/> <sp:requireserverentropy/> </wsp:policy> </sp:trust10> <wsaw:usingaddressing/> </wsp:all> </wsp:exactlyone> </wsp:policy>
another portion:
<wsp:policy wsu:id="issuedtokenwstrustbinding_iwstrustfeb2005async_policy"> <wsp:exactlyone> <wsp:all> <sp:transportbinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:policy> <sp:transporttoken> <wsp:policy> <sp:httpstoken requireclientcertificate="false"/> </wsp:policy> </sp:transporttoken> <sp:algorithmsuite> <wsp:policy> <sp:basic256/> </wsp:policy> </sp:algorithmsuite> <sp:layout> <wsp:policy> <sp:strict/> </wsp:policy> </sp:layout> <sp:includetimestamp/> </wsp:policy> </sp:transportbinding> <sp:endorsingsupportingtokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:policy> <sp:issuedtoken sp:includetoken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/includetoken/alwaystorecipient"> <sp:requestsecuritytokentemplate> <t:keytype>http://schemas.xmlsoap.org/ws/2005/02/trust/publickey</t:keytype> <t:encryptwith>http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p</t:encryptwith> <t:signaturealgorithm>http://www.w3.org/2000/09/xmldsig#rsa-sha1</t:signaturealgorithm> <t:canonicalizationalgorithm>http://www.w3.org/2001/10/xml-exc-c14n#</t:canonicalizationalgorithm> <t:encryptionalgorithm>http://www.w3.org/2001/04/xmlenc#aes256-cbc</t:encryptionalgorithm> </sp:requestsecuritytokentemplate> <wsp:policy> <sp:requireinternalreference/> </wsp:policy> </sp:issuedtoken> <mssp:rsatoken sp:includetoken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/includetoken/never" wsp:optional="true" xmlns:mssp="http://schemas.microsoft.com/ws/2005/07/securitypolicy"/> <sp:signedparts> <sp:header name="to" namespace="http://www.w3.org/2005/08/addressing"/> </sp:signedparts> </wsp:policy> </sp:endorsingsupportingtokens> <sp:wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:policy> <sp:mustsupportrefkeyidentifier/> <sp:mustsupportrefissuerserial/> <sp:mustsupportrefthumbprint/> <sp:mustsupportrefencryptedkey/> </wsp:policy> </sp:wss11> <sp:trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:policy> <sp:mustsupportissuedtokens/> <sp:requirecliententropy/> <sp:requireserverentropy/> </wsp:policy> </sp:trust10> <wsaw:usingaddressing/> </wsp:all> </wsp:exactlyone> </wsp:policy>
Comments
Post a Comment