1

I want to sent an AuthnRequest from my python-based SP (I;m using python 2.7) that I'm developing to my simpleSAMLphp installation (it's an IDP).

I'm using the "requests" module to do a get like this:

response = requests.get(url, verify='/home/barrie/my.crt')

where the URL is:

https://bingo.bas.com/simplesaml/module.php/core/authenticate.php?as=example-sql/?SAMLRequest=' + saml_request_base64

and the saml_request is (but converted to base64):

    <samlp:AuthnRequest\
      xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"\
      AssertionConsumerServiceURL="http://localhost:8081/"\
      Destination="https://bingo.bas.com"\
      ID="asdfasdfasdfasdf"\
      IssueInstant="2020-08-05T16:37:18.517845+00:00"\
      ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\
      Version="2.0"\
      <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">https://localhost:8081/</saml:Issuer>\
    </samlp:AuthnRequest>'

Is this the right way to go about it or is there a better (or correct) way?

Barrie
  • 124
  • 2
  • 10
  • that's how that SAML profile works. The IdP will need your SAML metadata where it states your AssertionConsumerServiceURL is http://localhost:8081/ or it won't respond with attributes – codebrane Sep 14 '20 at 09:14

0 Answers0