GithubHelp home page GithubHelp logo

konnexionsgmbh / esaml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arekinath/esaml

0.0 0.0 0.0 420 KB

Erlang SAML library, SSO and SLO, with Cowboy integration

License: GNU Lesser General Public License v3.0

Erlang 100.00%

esaml's People

Contributors

acautin avatar arekinath avatar c-bik avatar igorkarymov avatar jlarky avatar petrohi avatar shamis avatar walter-weinmann avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

esaml's Issues

Encrypted xml has to be parsed with namespace_conformant option

Following is an decrypted assertion

<?xml version="1.0" encoding="UTF-8"?>
<Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" ID="_74c5d290-97d9-45e1-aa0e-24098bbe6f4a" IssueInstant="2019-06-27T13:47:00.537Z" Version="2.0">
   <Issuer>http://adfsurl/trust</Issuer>
   <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/2001/04/xmldsig-more#rsa-sha256" />
         <ds:Reference URI="aa0e-24098bbe6f4a">
            <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/2001/04/xmlenc#sha256" />
            <ds:DigestValue>*********</ds:DigestValue>
         </ds:Reference>
      </ds:SignedInfo>
      <ds:SignatureValue>****************</ds:SignatureValue>
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
         <ds:X509Data>
            <ds:X509Certificate>****************</ds:X509Certificate>
         </ds:X509Data>
      </KeyInfo>
   </ds:Signature>
   <Subject>
      <NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">test@test.com</NameID>
      <SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
         <SubjectConfirmationData InResponseTo="id25826" NotOnOrAfter="2019-06-27T13:52:00.537Z" Recipient="https://test.com/saml" />
      </SubjectConfirmation>
   </Subject>
   <Conditions NotBefore="2019-06-27T13:47:00.521Z" NotOnOrAfter="2019-06-27T14:47:00.521Z">
      <AudienceRestriction>
         <Audience>https://test.com/</Audience>
      </AudienceRestriction>
   </Conditions>
   <AttributeStatement>
      <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn">
         <AttributeValue>test@test.com</AttributeValue>
      </Attribute>
      <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name">
         <AttributeValue>Test</AttributeValue>
      </Attribute>
      <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname">
         <AttributeValue>Test</AttributeValue>
      </Attribute>
      <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname">
         <AttributeValue>Test</AttributeValue>
      </Attribute>
      <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress">
         <AttributeValue>test@test.com</AttributeValue>
      </Attribute>
      <Attribute Name="http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname">
         <AttributeValue>test</AttributeValue>
      </Attribute>
      <Attribute xmlns:a="http://schemas.xmlsoap.org/ws/2009/09/identity/claims" Name="http://schemas.microsoft.com/2015/12/devicecontext/claims/tokenbindingid1.0" a:OriginalIssuer="CLIENT CONTEXT">
         <AttributeValue>mPZ3yyXgNFfeltv6BqIRaiYnNJhZLUJ9f7QZFZXOWR0</AttributeValue>
      </Attribute>
   </AttributeStatement>
   <AuthnStatement AuthnInstant="2019-06-27T13:47:00.381Z" SessionIndex="_74c5d290-97d9-45e1-aa0e-24098bbe6f4a">
      <AuthnContext>
         <AuthnContextClassRef>urn:federation:authentication:windows</AuthnContextClassRef>
      </AuthnContext>
   </AuthnStatement>
</Assertion>

Following element fails the canonical validation.

<Attribute xmlns:a="http://schemas.xmlsoap.org/ws/2009/09/identity/claims" Name="http://schemas.microsoft.com/2015/12/devicecontext/claims/tokenbindingid1.0" a:OriginalIssuer="CLIENT CONTEXT">
         <AttributeValue>mPZ3yyXgNFfeltv6BqIRaiYnNJhZLUJ9f7QZFZXOWR0</AttributeValue>
</Attribute>

008662 - Error registering process to hold esaml ets_table

Following error is repeated several times until erlimem is stopped.

2017-08-10 10:43:09.195 [info] <0.11.0> Application xmerl started on node 'sbsgui@xxxxxxxx'
2017-08-10 10:43:09.211 [error] emulator Error in process <0.1336.0> on node 'sbsgui@xxxxxxxx' with exit value:
{badarg,[{erlang,register,[esaml_ets_table_owner,<0.1336.0>],[]},{esaml_util,'-start_ets/0-fun-0-',0,[{file,"src/esaml_util.erl"},{line,120}]}]}
2017-08-10 10:43:09.211 [error] <0.1335.0>@esaml_util:-start_ets/0-fun-0-:120 Supervisor esaml had child esaml_ets_table_owner started with esaml_util:start_ets() at <0.1336.0> exit with reason bad argument in call to erlang:register(esaml_ets_table_owner, <0.1336.0>) in esaml_util:'-start_ets/0-fun-0-'/0 line 120 in context child_terminated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.