Get your identity system audit-ready
Identity infrastructure failures cause breaches, compliance violations, and customer churn. Auditors and acquirers will ask the same core questions: who has access, how is that access granted and revoked, and how do you prove it? This guide walks through preparing your self-hosted Bastionary deployment for those reviews.
Define the scope of the audit
Before collecting evidence, decide what the auditor needs to see. Identity audits usually cover authentication, authorization, lifecycle management, and the controls around each.
- Map every system that performs authentication, including web applications, APIs, mobile apps, and machine-to-machine services.
- List every identity provider and directory integration, such as SAML, OIDC, LDAP, and SCIM.
- Identify the data stores that hold user accounts, credentials, sessions, audit logs, and entitlement records.
- Document the boundaries between production, staging, and development environments.
Having a clear scope prevents the audit from expanding into unsupported systems and lets you focus evidence collection on the parts that matter.
Inventory identity assets and ownership
An acquirer or auditor will want to know what identity assets exist and who owns them. Prepare an inventory that covers objects, lifecycle owners, and dependencies.
- Users, organizations, memberships, roles, and service accounts.
- Secrets and keys used for signing tokens, encrypting credentials, and connecting to identity providers.
- Custom claims, entitlements, seat counts, and license records.
- Third-party integrations and the data they exchange.
For each asset, note the owner in your organization and the team responsible for its lifecycle. Gaps in ownership are findings waiting to happen.
Prove user data portability
User data portability is one of the most critical audit topics. It shows that the business can survive a provider change or an acquisition without disrupting customers.
- Maintain a documented export procedure for users, memberships, and audit history.
- Run the export procedure quarterly and verify that the output is complete and readable.
- Store an encrypted copy of the latest export in a location separate from the production database.
- Document the schema, password hash formats, and claim mappings so a third party can interpret the data.
If your deployment avoids proprietary identity providers, the portability story becomes much simpler. A self-hosted control plane with an open schema lets you produce evidence instead of excuses.
Demonstrate access controls and revocation
Auditors will test whether access is granted appropriately and revoked completely. Build your controls so those tests pass.
- Enforce role-based access control for human users and service accounts.
- Require multi-factor authentication for privileged accounts and admin access.
- Revoke sessions immediately when a user is deactivated, either through SCIM or through an admin action.
- Terminate long-lived API keys on a schedule and alert owners before expiration.
- Review standing access periodically and remove unused accounts and stale permissions.
Keep a record of every grant, change, and revocation. The absence of logs is treated as the absence of control.
Prepare audit logs and evidence packs
Reliable logs turn an audit from a scavenger hunt into a quick review. Organize evidence into standard packs that answer the most common questions.
- Authentication events: successful and failed logins, password resets, MFA challenges, and session creations.
- Authorization events: role changes, membership grants, entitlement updates, and policy modifications.
- Lifecycle events: provisioning, deactivation, reactivation, and account deletion.
- Administrative events: support actions, configuration changes, and key rotations.
- Export and backup events: when data was exported, where it was stored, and who initiated it.
Each event should include a timestamp, actor, target, action, source IP, and resulting state. Store logs in a tamper-evident format and keep them for the duration your compliance framework requires.
Run a pre-audit dry run
Do not wait for the auditor to find gaps. Run your own review using the same questions an external party will ask.
- Can you produce a complete user export within one hour?
- Can you show every access change for a randomly selected user over the past year?
- Can you prove that a deactivated user has no active sessions or valid tokens?
- Can you demonstrate that production secrets are not present in development environments?
- Can you explain how custom claims and entitlements are mapped and enforced?
Fix any failures you find before the audit starts. The dry run is also a good opportunity to update runbooks and confirm that on-call staff know how to generate evidence.
Next steps
- Publish an identity asset inventory with clear owners.
- Automate a quarterly user export and verify its integrity.
- Review access controls, session revocation, and secret rotation procedures.
- Schedule a pre-audit dry run and document the results.
Run it yourself
Bastionary is free, open-source software. Follow the quick start to have it running on your own server, or browse the releases on Git.