Skip to content

Instantly share code, notes, and snippets.

@ejdyksen
Last active December 14, 2015 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ejdyksen/5111256 to your computer and use it in GitHub Desktop.
Save ejdyksen/5111256 to your computer and use it in GitHub Desktop.
SAML sample
<samlp:AuthnRequest AssertionConsumerServiceURL="http://ruby-saml-example.herokuapp.com/saml/consume"
Destination="https://ec2-54-235-224-165.compute-1.amazonaws.com:9443/samlsso"
ID="_2D729750-3EB6-43A4-8416-938C7114D8C6"
IssueInstant="2013-03-12T16:25:08"
Version="2.0"
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
ruby-saml-example.herokuapp.com
</saml:Issuer>
</samlp:AuthnRequest>
<?xml version="1.0" encoding="UTF-8"?>
<samlp:AuthnRequest AssertionConsumerServiceURL='http://ruby-saml-example.herokuapp.com/saml/consume'
Destination='https://ec2-54-235-224-165.compute-1.amazonaws.com:9443/samlsso'
ID='_8a10dea0-6cb3-0130-2337-12313d0301ca'
IssueInstant='2013-03-11T19:55:25Z'
Version='2.0'
xmlns:samlp='urn:oasis:names:tc:SAML:2.0:protocol'>
<saml:Issuer xmlns:saml='urn:oasis:names:tc:SAML:2.0:assertion'>
ruby-saml-example.herokuapp.com
</saml:Issuer>
</samlp:AuthnRequest>
<?xml version="1.0" encoding="UTF-8"?>
<saml2p:Response
ID="mbipeddjngocmpkjccgpbnppanbppdbmkdnopjjb"
IssueInstant="2013-03-07T19:53:13.747Z"
Version="2.0"
xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol">
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#mbipeddjngocmpkjccgpbnppanbppdbmkdnopjjb">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>C/fnp9ofbl0LI9WyKAm2HOGXH08=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
KiFWyR66mf1NhYKIVbvz6Qb1hjgmYjd/gJlg0OE2nf4zq1+zQeNO67IBQ7vcHP6bkugrk2Yc6L8W
f/JgT0+egYfWFF4HWjZpreX/UHRvuE26ypOVq8pqZ7IhTkGrUm+C0zWhZQUW8PpSvMKlRTJesck1
+LZO8ceNMBOYTWSgVZs=
</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>
MIICNTCCAZ6gAwIBAgIES343gjANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJVUzELMAkGA1UE
CAwCQ0ExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcxDTALBgNVBAoMBFdTTzIxEjAQBgNVBAMMCWxv
Y2FsaG9zdDAeFw0xMDAyMTkwNzAyMjZaFw0zNTAyMTMwNzAyMjZaMFUxCzAJBgNVBAYTAlVTMQsw
CQYDVQQIDAJDQTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzENMAsGA1UECgwEV1NPMjESMBAGA1UE
AwwJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCUp/oV1vWc8/TkQSiAvTou
sMzOM4asB2iltr2QKozni5aVFu818MpOLZIr8LMnTzWllJvvaA5RAAdpbECb+48FjbBe0hseUdN5
HpwvnH/DW8ZccGvk53I6Orq7hLCv1ZHtuOCokghz/ATrhyPq+QktMfXnRS4HrKGJTzxaCcU7OQID
AQABoxIwEDAOBgNVHQ8BAf8EBAMCBPAwDQYJKoZIhvcNAQEFBQADgYEAW5wPR7cr1LAdq+IrR44i
QlRG5ITCZXY9hI0PygLP2rHANh+PYfTmxbuOnykNGyhM6FjFLbW2uZHQTY1jMrPprjOrmyK5sjJR
O4d1DeGHT/YnIjs9JogRKv4XHECwLtIVdAbIdWHEtVZJyMSktcyysFcvuhPQK8Qc/E/Wq8uHSCo=
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
<saml2p:Status>
<saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</saml2p:Status>
<saml2:Assertion
ID="momdainaoefeefpbdpfomlbabhbnnojbmapdgepo"
IssueInstant="2013-03-07T19:53:13.747Z"
Version="2.0"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">
https://localhost:9443/samlsso
</saml2:Issuer>
<saml2:Subject>
<saml2:NameID>admin</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml2:SubjectConfirmationData
InResponseTo="_8ee6d190-698e-0130-05f9-64ce8f0595b8"
NotOnOrAfter="2013-03-07T19:58:13.747Z"
Recipient="https://saml-mutuallyhuman.fwd.wf/saml/consume"/>
</saml2:SubjectConfirmation>
</saml2:Subject>
<saml2:Conditions
NotBefore="2013-03-07T19:53:13.747Z"
NotOnOrAfter="2013-03-07T19:58:13.747Z">
<saml2:AudienceRestriction>
<saml2:Audience>saml-mutuallyhuman.fwd.wf</saml2:Audience>
</saml2:AudienceRestriction>
</saml2:Conditions>
<saml2:AuthnStatement AuthnInstant="2013-03-07T19:53:13.747Z">
<saml2:AuthnContext>
<saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml2:AuthnContextClassRef>
</saml2:AuthnContext>
</saml2:AuthnStatement>
</saml2:Assertion>
</saml2p:Response>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment