Skip to content

Remove Profile.getSamlResponseXml() #424

Open

Description

@cjbarth

Profile.getSamlResponseXml() hands the caller the response XML as received, without indicating which parts were
authenticated:

profile.getSamlResponseXml = () => samlResponseXml;

AGENTS.md's first invariant is "trust only the bytes that were signed", and this is a public
accessor that returns bytes that may not have been. When only the assertion is signed, nothing
around it is, and the accessor returns the same thing either way. Anything a caller decides on
the strength of what it returns may be a decision made on attacker-controlled input — the signature-wrapping
shape the rest of the library is built to prevent.

AGENTS.md names it as a known debt, alongside processValidlySignedAssertionAsync taking the
same XML as a parameter to back it.

Remove it in the next major. Callers should use getAssertionXml() or getAssertion(), which
are built from the verified content.

5.2.0 marks it @deprecated so it surfaces in the consumer's editor first.

🤖 Generated with Claude Code

Activity

  1. added this to the v6 milestone on Sep 17, 2026
  2. changed the title [-]v6: remove `Profile.getSamlResponseXml()`[/-] [+]Remove `Profile.getSamlResponseXml()`[/+] on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions