Register Partner
Register an external SSO partner and generate consumer credentials for HMAC-SHA256 signature validation.
When to use: When onboarding a new external identity provider that needs to push authenticated user sessions into your application via IdP-Initiated SSO.
Prerequisites
Completed Quickstart
A running PostgreSQL instance with GL IAM configured
An encryption key for consumer secret storage — generate with:
python -c "import secrets, base64; print(base64.urlsafe_b64encode(secrets.token_bytes(32)).decode())"
Before You Register
Registering a partner means your application trusts that partner to assert user identities. A compromised partner secret allows the attacker to create sessions for any user within the allowed email domains.
Trust assessment checklist:
5-Line Core
Step-by-Step
Setup Provider
Check Health
Build Partner Registration
Security fields are opt-in. All four fields default to None, meaning no restriction. Set them to enforce security policies per partner. GL-IAM stores the configuration; your application enforces allowed_source_ips, max_users, and allowed_roles at the HTTP/provisioning layer. Only allowed_email_domains is enforced by GL-IAM during signature validation (when the email parameter is provided).
Register the Partner
Expected Output
You can register SSO partners!
Complete Example
Create register_partner.py:
Run it:
Expected output:
Using with IAMGateway
If your PostgreSQLProvider has enable_partner_registry=True, the gateway auto-detects the partner registry:
Common Pitfalls
Not storing consumer secret
Store immediately — only shown once
Missing secret_key
Required — set a secure random key (min 32 characters)
Missing encryption config
Set crypto_config.encryption_keys (or legacy encryption_key) for HMAC validation
Duplicate partner name
Check PARTNER_ALREADY_EXISTS error code
Confusing None vs []
None = no restriction (skip check); don't use []
Found an issue on this page? Report it on our feedback form.
Last updated
Was this helpful?