8000 Default to SHA-256 for XML reference digests in SAML2Signature · Issue #55541 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Default to SHA-256 for XML reference digests in SAML2Signature #55541

Backlog

Description

@abstractj

SAML2Signature defaults to SHA-1 when a caller signs an XML document without explicitly setting the reference digest. Change that default to SHA-256. Keycloak’s binding builder and metadata signer already supply a digest from the selected signature algorithm, so this change applies to callers that rely on the helper’s fallback. Signing helper · Binding builder · Metadata signer

Value Proposition

An extension can select RSA-SHA256 as its signature method and still get SHA-1 for the digest of the referenced XML element if it omits setDigestMethod. A SHA-256 fallback removes that implicit use of SHA-1. XML reference construction

Goals

  • Use SHA-256 for the XML reference digest when the caller omits setDigestMethod.
  • Honor the caller’s choice when it supplies a reference digest explicitly.

Non-Goals

  • Change the default XML signature method, the SAML signature algorithms available to administrators, or the validation rules for incoming signatures.

Acceptance criteria

  • Sign a document with RSA-SHA256 while leaving the reference digest unset. Verify that the emitted ds:Reference/ds:DigestMethod identifies SHA-256 and that the signature validates.
  • Sign a document with an explicitly selected SHA-512 reference digest. Verify that the emitted DigestMethod identifies SHA-512 and that the signature validates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    No fields configured for task.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0