Knowledge base
How-to guides for Bastionary
250 practical articles on authentication, SSO, tokens, authorization, security, compliance and running Bastionary yourself. New here? Start with the quick start.
AI agents Authorization Compliance and audit Enterprise SSO and provisioning Getting started Licensing and feature flags MFA and passkeys Migration Operations and self-hosting Security and abuse Sessions and login Tokens and APIs Identity fundamentals
AI agents (6)
- AI agent authentication: how autonomous agents authenticate safely
- Audit trails for AI agents: attributing actions to autonomous systems
- Authenticating AI agents: OAuth delegation and scopes
- Authentication for AI SaaS: API keys, usage limits, and agent access
- OAuth for MCP servers: authenticating AI tools the right way
- Scoped tokens for LLM tool calling: least privilege for agents
Authorization (22)
- Audit log retention: how long to keep auth events and why
- Authentication vs authorization: the difference that matters
- B2B auth patterns: org-scoped logins, team management, and SSO enforcement
- B2B SaaS auth architecture: teams, orgs, and roles
- Cross-tenant authentication: linking users across organizations
- Database schema design for multi-tenant SaaS auth
- Delegated authorization: building a permissions API your enterprise customers can manage
- Designing admin roles that don't over-grant
- Idle, absolute, and renewal: session timeout policy that fits your risk
- Multi-tenant onboarding: the first-login flow that converts trials to paying customers
- Multi-tenant SaaS: silo, pool, and bridge patterns for user isolation
- Privileged access management: protecting superadmin accounts
- RBAC vs ABAC: when roles aren't enough and you need attributes
- Rich Authorization Requests (RAR): fine-grained consent for OAuth
- Role-based access control: a complete guide
- Row-level security in PostgreSQL for true multi-tenant isolation
- Seat-based licensing enforcement: how to count and enforce org members
- Team invitations: secure org invite flows that don't leak user existence
- The Authorization Code flow: why every step exists
- Users in multiple organizations: the data model and token design
- What is multi-tenancy and why does it matter for SaaS?
- White-label auth: custom login pages for every tenant
Compliance and audit (20)
- Admin user impersonation: implementation and audit requirements
- Auth audit logs and SIEM integration: what to log and how
- Authentication logging for compliance: what events to capture
- Consent management: building a compliant audit trail for GDPR and CCPA
- Designing an audit log that survives a security incident
- DORA and identity: operational resilience for EU financial services
- FedRAMP authentication requirements for SaaS selling to government
- GDPR and user authentication data: what you must handle correctly
- Get your identity system audit-ready
- Healthcare SaaS authentication: HIPAA, HITECH, and patient data
- HIPAA authentication compliance: the technical safeguard checklist
- HIPAA-compliant authentication: what you need to know
- Identity compliance changes in 2026: what SaaS teams need to know
- Implementing GDPR right to erasure without corrupting your database
- ISO 27001 identity and access management requirements
- NIS2 access-control requirements: what in-scope companies must implement
- PSD2 and Strong Customer Authentication: what SaaS fintechs must build
- SOC 2 auth controls: what auditors look for and how to prepare
- SOC 2 authentication requirements: what auditors check
- Tamper-evident audit logs: hash chaining and why it matters
Enterprise SSO and provisioning (20)
- Custom domain SSO: vanity endpoints for enterprise customers
- Enterprise authentication requirements: a technical checklist
- Identity federation: trusting another organization's IdP without managing their users
- Implementing JIT provisioning with SAML 2.0
- JIT provisioning: auto-creating users on first SSO login
- LDAP and Active Directory authentication: the enterprise integration that never dies
- OIDC vs SAML: choosing the right SSO protocol
- Provision users with SCIM 2.0
- SAML assertion signing and encryption: what each protects and when to use both
- SAML attribute mapping: getting user data from the IdP into your app
- SAML service provider metadata: what it contains and why it matters
- SAML Single Logout: why it's broken everywhere and what to actually do
- SAML vs OIDC: when to use each and why most apps need both
- SCIM 2.0 user provisioning: a complete implementation guide
- Self-service SSO setup: letting enterprise customers configure their own SAML IdP
- Set up SAML and OIDC SSO for your customers
- Single sign-on for non-technical business leaders
- SSO bypass: the auth vulnerability that enterprise customers never think about
- The enterprise SSO integration checklist: 15 things IT will ask before signing
- What is SAML? SSO explained without the XML nightmares
Getting started (1)
Licensing and feature flags (8)
- A/B testing with feature flags: a practical guide
- Building an entitlements system: feature access beyond simple roles
- Cryptographically signed offline license keys that can't be faked
- Feature flags for SaaS: why LaunchDarkly is overkill for most companies
- Feature flags without a SaaS vendor: building your own
- Managing desktop software licenses at scale
- Software license key formats: from serial numbers to cryptographically signed payloads
- What is a feature flag? A guide for non-developers
MFA and passkeys (21)
- Cyber insurance now requires MFA: meeting the underwriting checklist
- Going passwordless: a complete implementation guide
- Implementing TOTP (Google Authenticator) from scratch: RFC 6238 explained
- Implementing WebAuthn passkeys from scratch
- Magic links: secure one-time login URLs and why you're probably implementing them wrong
- MFA recovery codes: generating, storing, and invalidating them safely
- Multi-factor authentication: which option is actually secure?
- Passkey account recovery: the hard problem nobody warns you about
- Passkeys are not magic: what WebAuthn actually does
- Password hashing in 2025: why bcrypt is still fine and when Argon2 is better
- Password policy design: NIST 800-63B guidance and why complexity rules are wrong
- Password reset security: what makes a secure reset flow in 2024
- Passwordless authentication: a practical implementation guide
- Passwordless email authentication: magic links vs email OTP vs code
- Push-based MFA: implementation, UX, and phishing resistance
- Risk-based (adaptive) MFA: when to step up and when to trust
- Synced vs device-bound passkeys: the tradeoff enterprises must decide
- WebAuthn attestation: packed, TPM, android-key, and why it matters
- WebAuthn conditional UI: passkey autofill that users actually notice
- What multi-factor authentication actually protects you from
- Why SMS OTP is the weakest MFA and what to use instead
Migration (14)
- Auth migration with zero downtime: the parallel-run strategy
- Cognito migration: lessons from real projects
- Export your users and keep your identity data portable
- Keycloak migration guide: what to expect
- Migrating from Auth0 to self-hosted auth: a complete playbook
- Migrating from Auth0: a step-by-step production guide
- Migrating from Azure AD B2C before the Entra deadline
- Migrating from Clerk to a self-hosted platform
- Migrating from Firebase Authentication
- Migrating off Okta: a self-hosted exit plan
- Migrating password hashes without forcing a reset
- Migrating user accounts with zero downtime
- Moving from NextAuth.js to a managed auth platform
- Replacing homegrown auth: migrating off the login you built in 2019
Operations and self-hosting (17)
- Auth in a Kubernetes cluster: service accounts, OIDC federation, and workload identity
- Auth incident response: what to do when you suspect account takeover at scale
- Auth monitoring runbook: what to alert on and what to ignore
- Auth observability: the metrics and alerts that catch incidents before users do
- Auth operation latency benchmarks: what's fast, what's slow, and why
- Auth SLOs and error budgets: setting reliability targets that matter
- Authentication disaster recovery: when your identity server goes down
- Backing up and restoring identity data: the DR drill most teams skip
- Chaos engineering for identity: breaking auth on purpose
- Database-backed session store vs Redis: a pragmatic comparison
- Deploying auth services with Docker: production-ready patterns
- Deploying self-hosted auth: an ops guide from zero to production
- Mining your auth logs: detecting attacks from patterns you're already collecting
- Multi-region auth: session management across geographic deployments
- Self-hosting your auth: a deployment checklist
- Testing your auth system: unit tests, integration tests, and security-focused test cases
- The ops team's guide to identity infrastructure
Security and abuse (23)
- Anomaly detection in authentication logs
- Assessing your identity security posture
- Behavioral signals for fraud detection in auth flows
- Bot detection without CAPTCHA: device fingerprinting, behavioral signals, and risk scores
- Brute force protection that doesn't lock out legitimate users
- Checking passwords against 850 million breached credentials without storing them
- Credential stuffing attacks: detection, mitigation, and the HIBP integration that actually helps
- Credential stuffing attacks: how they work and how to stop them
- Designing rate limits for auth endpoints: the numbers that actually matter
- Encrypting PII in user profiles: column-level vs application-level
- Hardware security keys (YubiKey, Titan): when software MFA isn't enough
- How to penetration test your authentication system
- HTTP security headers for auth-sensitive applications
- Login UX that doesn't sacrifice security: progressive disclosure and smart defaults
- Non-human identity: governing the machine accounts that outnumber your users
- Protecting JWT signing keys with an HSM or cloud KMS
- Rate limiting authentication endpoints without locking out real users
- Rate limiting strategies for auth APIs
- Secure email change flows: double confirmation and takeover defense
- Session management security: a complete checklist
- What pen testers look for in auth systems (and how to fix it before they find it)
- Zero trust implementation: authentication is the first step
- Zero trust is not a product. It's a network architecture decision.
Sessions and login (15)
- Accessible login flows: WCAG compliance for authentication UX
- Account linking: connecting social login to existing email accounts safely
- Account merging: safely deduplicating users who signed up twice
- Concurrent session limits and 'log out everywhere' done right
- Email verification that doesn't frustrate users: time-limited tokens and magic links
- IoT device authentication: provisioning trust at scale
- Mobile app session management: refresh tokens, certificate pinning, and biometric re-auth
- Preventing email enumeration: consistent responses and timing attacks
- Secure cookie configuration in 2024: HttpOnly, Secure, SameSite, and __Host prefix
- Session fixation attacks: why regenerating session IDs matters
- Session hijacking: modern attacks and defenses
- Session management done right: cookies, JWTs, and the hybrid approach
- Social login with Google, GitHub, and Apple: what the docs don't tell you
- Trusted devices and 'remember me' without weakening security
- Username or email as the login identifier? The tradeoffs
Tokens and APIs (46)
- Access tokens expire. Refresh tokens are the hard part.
- Adding custom claims to JWTs without breaking everything downstream
- API authentication best practices: keys, tokens, and OAuth 2.0
- API authentication schemes compared: Bearer, Basic, API keys, mTLS, and HMAC
- API gateway authentication: putting auth at the edge vs in the app
- API key design: format, storage, and rotation without breaking clients
- Authorization in GraphQL APIs: field-level permissions that scale
- Building reliable webhook delivery: retries, signatures, and fan-out
- CIBA: OpenID Connect backchannel authentication for decoupled flows
- Claims transformation: enriching tokens with roles, permissions, and metadata
- CSRF protection in OAuth: the state parameter and PKCE
- Designing OAuth scopes that don't come back to haunt you
- DPoP token binding: sender-constrained tokens explained
- DPoP: the token binding spec that kills bearer token theft
- Encrypted JWTs (JWE): when signing isn't enough
- ID tokens vs access tokens: they're not interchangeable and here's why
- Implementing PKCE in Next.js from scratch
- JWT clock skew: why your tokens expire before they should
- JWT payload bloat: why your tokens are 2KB and how to fix it
- JWT signing algorithms compared: HS256, RS256, ES256, PS256
- mTLS client authentication for OAuth (RFC 8705)
- mTLS: service-to-service auth without shared secrets
- OAuth 2.0 PKCE explained: why every public client needs it
- OAuth 2.1: what changes and what it means for your integration
- OAuth client credentials flow: machine-to-machine auth without users
- OAuth device flow: authenticating TVs, CLIs, and IoT without a browser
- OIDC discovery: what /.well-known/openid-configuration actually does
- OIDC logout: RP-initiated, front-channel, and back-channel — and why they all behave differently
- OpenID Connect explained: authentication on top of OAuth
- PAR (Pushed Authorization Requests): keeping your OAuth parameters off the URL
- PKCE deep dive: why every SPA needs it and why the implicit flow must die
- PKCE for mobile apps: the right way to do OAuth on iOS and Android
- Private Key JWT: stronger OAuth client authentication than secrets
- Refresh token rotation: preventing session hijacking at scale
- Refresh token rotation: why single-use tokens are the minimum and sliding windows are better
- Resource indicators (RFC 8707): scoping tokens to the right API
- Revoking tokens across distributed systems: reference vs self-contained
- RS256 vs HS256: why your JWT algorithm choice matters more than you think
- The most dangerous JWT security mistakes in production
- Token binding: the spec that died, and DPoP: the spec that lived
- Token exchange (RFC 8693): delegation and impersonation done right
- Token introspection (RFC 7662): when JWTs aren't enough
- Token introspection performance: caching, edge validation, and hybrid approaches
- Token revocation: the missing piece in most auth implementations
- Webhook fan-out at scale: delivering millions of events without falling over
- Webhook security: validating signatures and preventing replay attacks
Identity fundamentals (37)
- Auth for developer CLIs: device flow, PAT tokens, and OAuth in the terminal
- Auth for developer tools: CLI, APIs, and SDK experiences
- Auth for Electron and native desktop apps: loopback, deep links, and storage
- Auth for headless CMS APIs: audience-scoped tokens and content permissions
- Auth hook patterns for customizing login flows
- Auth in microservices: the three patterns and which one to use
- Authenticating background jobs and workers without user sessions
- Authenticating gRPC services: metadata, mTLS, and interceptors
- Authentication for e-commerce: guest checkout, accounts, and fraud
- Authentication for government and public-sector SaaS
- Authentication for internal tools and admin panels
- Biometric authentication on mobile: what the OS guarantees and what it doesn't
- Code signing and release integrity: GPG, Sigstore, and why it matters for auth software
- Continuous authentication in the real world
- Continuous authentication: re-verifying identity after login without annoying users
- CORS and authentication: why your API calls fail and how to fix them
- Decentralized identity: DIDs, verifiable credentials, explained
- Designing a JWKS endpoint: caching, rotation, and kid selection
- EdTech authentication: students, parents, and institutions
- Fintech authentication requirements: what regulators expect
- Frontend auth patterns: where to store tokens and why every option has a tradeoff
- Game authentication: managing millions of concurrent players
- GDPR right to erasure edge cases: audit logs, references, and shadow accounts
- Invitation flow design: the edge cases that break team onboarding
- Machine-to-machine auth in 2026: new patterns and pitfalls
- Machine-to-machine authentication: client credentials and beyond
- Mobile app authentication: iOS and Android patterns
- Multi-product auth: sharing identity across multiple applications without breaking isolation
- React authentication patterns: context, hooks, and protected routes
- Rotating JWT signing keys without invalidating sessions
- SPIFFE and SPIRE: workload identity for zero-trust service meshes
- Step-up authentication with OIDC acr and amr claims
- User impersonation for support: safe implementation without security theatre
- WebSocket authentication: the handshake patterns that actually work
- What does owning your auth actually mean?
- What is an identity provider? A plain-English guide
- Zero-knowledge proofs in authentication: SRP and beyond
No articles match.