The dgp.filter.http.auth.saml filter allows Pixiu to act as a SAML Service Provider (SP).
With this filter enabled, Pixiu can:
Typical IdPs include Keycloak, Okta, and Microsoft Entra ID.
/app.SAMLResponse to Pixiu’s ACS endpoint.http_filters:
- name: "dgp.filter.http.auth.saml"
config:
entity_id: "pixiu-saml-sp"
acs_url: "https://pixiu.example.com/saml/acs"
metadata_url: "https://pixiu.example.com/saml/metadata"
idp_metadata_url: "https://idp.example.com/app/metadata"
cert_file: "/etc/pixiu/saml/sp.crt"
key_file: "/etc/pixiu/saml/sp.key"
rules:
- match:
prefix: "/app"
forward_attributes:
- saml_attribute: "email"
header: "X-User-Email"
- saml_attribute: "displayName"
header: "X-User-Name"
Instead of idp_metadata_url, you can load IdP metadata from a local file:
idp_metadata_file: "/etc/pixiu/saml/idp-metadata.xml"
entity_id: SP entity ID advertised by Pixiuacs_url: Assertion Consumer Service endpoint that receives the SAMLResponsemetadata_url: Pixiu SP metadata endpoint shared with the IdP administratoridp_metadata_url: URL used by Pixiu to fetch IdP metadataidp_metadata_file: local metadata file, used instead of idp_metadata_urlcert_file: SP certificate filekey_file: SP private key filerules: protected path prefixes that require SAML loginforward_attributes: mapping from SAML assertion attributes to upstream HTTP headersallow_idp_initiated: development-focused escape hatch for local HTTP testing when browsers drop the request-tracking cookie on the cross-site ACS POSTerr_msg: custom local reply message for SAML auth failuresacs_url and metadata_url must use the same scheme and host.metadata_url is the SP metadata endpoint that the IdP imports.idp_metadata_url or idp_metadata_file is used by Pixiu to learn the IdP signing key and SSO endpoint.forward_attributes before writing SAML-derived values.SAML SP-initiated login usually depends on a request-tracking cookie surviving the cross-site POST back from the IdP to the ACS endpoint.
SameSite=None, which allows the cookie to be sent on the cross-site ACS POST.allow_idp_initiated: true so the ACS flow can continue without relying on strict InResponseTo validation.In some local HTTP browser environments, the first login may not return cleanly to the original route because the request-tracking cookie is dropped on the ACS POST. In that case, the session may already have been created successfully. Revisit /app to verify the login result when testing the local sample.
A runnable sample is maintained in dubbo-go-pixiu-samples under auth/saml.