Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Changes based on integrating with ADFS, Azure, and PingOne #7

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

Commits on Nov 19, 2015

  1. AuthnRequest: don't create 'signature' tag in request if disabled

    Due to the way these elements were declared, building a request with no
    signature still sends the empty tags:
    
       ...
    
    To keep the request small and for better compatibility, suppress them
    altogether with unsigned requests.
    samv committed Nov 19, 2015
    Configuration menu
    Copy the full SHA
    6d5e7e4 View commit details
    Browse the repository at this point in the history
  2. Suppress redundant XMLNS tags

    They were defining a prefix which was already defined in the scope of their
    definition, and it seems encoding/xml isn't clever enough to know that it
    doesn't need to emit them in that case.  Remove them.
    samv committed Nov 19, 2015
    Configuration menu
    Copy the full SHA
    5b91e34 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6e5fbf2 View commit details
    Browse the repository at this point in the history
  4. Use persistent, not transient Name IDs

    This may or may not be required for our use case.  Slack sets this to
    persistent in their implementation and I was changing things I could see.
    samv committed Nov 19, 2015
    Configuration menu
    Copy the full SHA
    8eb3a7d View commit details
    Browse the repository at this point in the history
  5. Don't send hi-resolution issue instants

    Azure thinks dateTime values with nanosecond precision are not protocol
    compliant.
    
    http://www.w3.org/TR/xmlschema-2/#dateTime - Azure is wrong.
    
    It's OK, there's an ID in there anyway to resolve ambiguity.
    samv committed Nov 19, 2015
    Configuration menu
    Copy the full SHA
    263a125 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2015

  1. SAML Response: parse out the SessionIndex

    This value is required in order to implement logout; parse it.
    samv committed Dec 2, 2015
    Configuration menu
    Copy the full SHA
    1257662 View commit details
    Browse the repository at this point in the history
  2. Permit setting of 'ForceAuthn' in AuthnRequest

    Setting this field to the string "true" will force the identity provider
    (with the power of MUST) to authenticate the presenter directly rather than
    rely on a previous security context.
    samv committed Dec 2, 2015
    Configuration menu
    Copy the full SHA
    c249968 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2015

  1. Fix a broken test

    The type changed in order to support unsigned requests, but the
    test did not update.
    samv committed Dec 6, 2015
    Configuration menu
    Copy the full SHA
    5f34f36 View commit details
    Browse the repository at this point in the history
  2. Add a 'ParseDecodedString' Response constructor

    Callers may want to store the decoded XML, so allow them to do the
    base64 decoding and pass in the XML string.  This is needed in order
    to set the 'originalString' method for validation.
    samv committed Dec 6, 2015
    Configuration menu
    Copy the full SHA
    07a7a6a View commit details
    Browse the repository at this point in the history
  3. Allow XML Signatures in one more location on responses

    The XML Signature standard is designed to be re-usable standard by
    other standards, and it's up to those other standards how they bind it
    into their own messages.  In SAML, the binding allows signatures to
    appear in a number of different places.  XML Signatures can't assume
    anything about the document structure for the standard it is used
    with, so instead it uses references to specify which part of the
    document the signature applies to.  A given directory may be
    consistent about which node it signs, and the previous implementation
    was coded to assume the signature appears on the root element.
    However, with Azure the "Assertion" block is the signed part.
    
    Update the implementation to delegate responsibility of which node to
    pass to "xmlsec" for signature verification to a response method, and
    add a basic implementation which supports ID referencing.
    samv committed Dec 6, 2015
    Configuration menu
    Copy the full SHA
    25b974a View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2015

  1. Don't indent AuthnRequests

    Especially not with spaces.  Eww.  What a waste of space.
    samv committed Dec 7, 2015
    Configuration menu
    Copy the full SHA
    22fc0a7 View commit details
    Browse the repository at this point in the history
  2. Fix an indent

    samv committed Dec 7, 2015
    Configuration menu
    Copy the full SHA
    032c321 View commit details
    Browse the repository at this point in the history
  3. AuthnRequest protocol compliance fix

    Some implementations might accept xml elements at a particular level
    in any order, but due to the design of XMLSchema, typically only one
    ordering is valid.  Azure rejects requests with the signature in the
    wrong place.  Fix this and another minor compliance issue
    (capitalization of an attribute not matching the spec)
    samv committed Dec 7, 2015
    Configuration menu
    Copy the full SHA
    a9e951e View commit details
    Browse the repository at this point in the history
  4. Reverse an earlier protocol change

    Looks like I was mistaken; it's ID on the SAML specs, but Id on the
    XML Signature spec.
    samv committed Dec 7, 2015
    Configuration menu
    Copy the full SHA
    4437955 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2015

  1. Compliance fix in XML Signature boilerplate, use SHA-256

    ADFS fails with 'ID6027: Enveloped Signature Transform cannot be the
    last transform in the chain.  The last transform must compute the
    digest which Enveloped Signature transform is not capable of.'
    
    The signature block in requests is now essentially identical to the
    one returned by Azure and ADFS.
    samv committed Dec 8, 2015
    Configuration menu
    Copy the full SHA
    4482c55 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2015

  1. AuthnRequest: set Destination for signed requests

    From [SAMLCore], §3.2.1:
    
        Destination [Optional]
    
        A URI reference indicating the address to which this request has
        been sent. This is useful to prevent malicious forwarding of
        requests to unintended recipients, a protection that is required
        by some protocol bindings. If it is present, the actual recipient
        MUST check that the URI reference identifies the location at which
        the message was received. If it does not, the request MUST be
        discarded. Some protocol bindings may require the use of this
        attribute (see [SAMLBind]).
    
    In the SAML Bindings spec, §3.4.5.2 we find:
    
        Security Considerations
    
        The presence of the user agent intermediary means that the
        requester and responder cannot rely on the transport layer for
        end-end authentication, integrity and confidentiality. URL-encoded
        messages MAY be signed to provide origin authentication and
        integrity if the encoding method specifies a means for signing.
        If the message is signed, the Destination XML attribute in the
        root SAML element of the protocol message MUST contain the URL to
        which the sender has instructed the user agent to deliver the
        message. The recipient MUST then verify that the value matches the
        location at which the message has been received.
    
    ie, this URL is here to prevent someone from taking a login request
    for one IdP and using it for a different IdP.
    samv committed Dec 9, 2015
    Configuration menu
    Copy the full SHA
    a561308 View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2015

  1. Allow AuthnRequests without name ID policy, auth context

    These elements are not required by the standard, and some directory servers will
    refuse requests with them set.  Change their types to be pointers so that they
    can be omitted.
    samv committed Dec 10, 2015
    Configuration menu
    Copy the full SHA
    8ab58f4 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2015

  1. Add (limited) support for encrypted response assertions

    It's possible to encrypt SAML response assertions; this was primarily
    useful in the era where it ran over non-encrypted endpoints, and is
    still useful if there is some information in the assertions which you
    don't want the user to be able to access using tools such as Firefox
    SAML Tracer.  Being an OASIS standard, there are of course several
    ways this can be arranged with relation to signatures: the assertions
    can be signed and then encrypted, or the assertions can be encrypted
    and the whole message signed.
    
    This implementation allows for Assertion nodes to appear under
    EncryptedAssertion, which is the form that 'xmlsec1' expects and
    returns the plaintext versions, even though it doesn't conform to the
    XML schema.  Callers should take utmost care to keep track of which
    sections have been validated and which haven't when regarding
    assertions as authorative.
    samv committed Dec 12, 2015
    Configuration menu
    Copy the full SHA
    663d4f4 View commit details
    Browse the repository at this point in the history
  2. Comment out the debug output

    These lines are a poor substitute for real exception logging, but carry it
    on for now.
    samv committed Dec 12, 2015
    Configuration menu
    Copy the full SHA
    c097a17 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2015

  1. Fix imports

    The code was still depending on the original library for utils etc; use the ones
    in this fork instead.
    samv committed Dec 16, 2015
    Configuration menu
    Copy the full SHA
    b671544 View commit details
    Browse the repository at this point in the history
  2. go fmt

    samv committed Dec 16, 2015
    Configuration menu
    Copy the full SHA
    7947faf View commit details
    Browse the repository at this point in the history
  3. Implement LogoutRequest

    Some directory servers require an explicit logout (especially if they don't
    honor the 'ForceAuthn' flag on AuthnRequest).  Add support for this, including
    signing.
    samv committed Dec 16, 2015
    Configuration menu
    Copy the full SHA
    0ae90e1 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2016

  1. Put back the imports

    Switching these URLs was necessary for using our branch, but now the branch
    is being submitted for upstream inclusion, they should be returned to their
    original fork.
    samv committed Jan 13, 2016
    Configuration menu
    Copy the full SHA
    661c9fa View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2016

  1. Add some XML bindings for Metadata

    SAML configuration information is exchanged in this format; add
    support for reading and writing it.
    Sam Vilain committed Mar 29, 2016
    Configuration menu
    Copy the full SHA
    6ccbdcc View commit details
    Browse the repository at this point in the history
  2. Make the codebase parsable

    samv authored and Sam Vilain committed Mar 29, 2016
    Configuration menu
    Copy the full SHA
    a218cc0 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2020

  1. PA-22319: Created unit tests and add additional validation for signat…

    …ure on response, assertion and encryptedassertion (#3)
    Alex Valenzuela committed Jan 16, 2020
    Configuration menu
    Copy the full SHA
    b86f185 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2021

  1. Configuration menu
    Copy the full SHA
    9b443e1 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #6 from parsable/ADMIN-2247-gitleaks-allowed-list

    ADMIN-2247 - gitleaks allowed list
    mlovrovich committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    bddad8f View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2023

  1. INFRA-2677: GHA pipeline

    pbrobles committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    fd8310a View commit details
    Browse the repository at this point in the history
  2. INFRA-2677: Add dependabot

    pbrobles committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    93bb449 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2023

  1. Configuration menu
    Copy the full SHA
    06bf1c9 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2023

  1. Configuration menu
    Copy the full SHA
    be602a8 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #7 from parsable/infra-2677-buid-gha-pipeline

    INFRA-2677: GHA pipeline
    pbrobles committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    c137aa2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5001401 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #8 from parsable/infra-2677-build-gha-pipeline

    INFRA-2677: fix build publish workflow
    pbrobles committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    715e1ba View commit details
    Browse the repository at this point in the history