pygamlastan

pygamlastan is a Python binding for gamlastan 0.5.0, a pure-Rust SAML 2.0 library. It exposes gamlastan’s types, XML parsing, cryptography (including PKCS#11/HSM signing), metadata handling, protocol bindings, security validation, and the Web Browser SSO profiles to Python.

The binding mirrors gamlastan’s modules as Python submodules:

Submodule

Purpose

pygamlastan.core

Owned SAML 2.0 types (Assertion, Response, NameId, …) and constants.

pygamlastan.xml

Parse SAML XML into owned core objects.

pygamlastan.crypto

Sign, verify, encrypt, decrypt, canonicalize; file keys and PKCS#11.

pygamlastan.bindings

HTTP-Redirect / HTTP-POST / Artifact encode and decode.

pygamlastan.metadata

Parse and inspect SAML metadata; serialize it back.

pygamlastan.security

The validation suite, its configuration, and the replay cache.

pygamlastan.profiles

Web Browser SSO: build requests/responses, process them.

pygamlastan.attribute_map

Wire to local attribute-name conversion.

pygamlastan.idp

IdP infrastructure: targeted IDs, authn broker, assertion store.

Design in one sentence: parsing converts gamlastan’s zero-copy *Ref views to owned values at the boundary, so the Python objects you hold never borrow from a Rust document and are safe to keep, pass around, and store.

Reference

Indices