Penetration testing a self-hosted Zitadel: what to scope before you hire
A penetration test of a self-hosted Zitadel checks whether an attacker can get into accounts, tenants or administrative functions through the deployment you run. It is worth commissioning before go-live for workforce, customer or partner identity, and again before a customer security review asks for evidence of independent testing. The test targets the deployment and configuration you control: the instance and organization setup, login and registration flows, the reverse proxy, the database connection, and the secrets around them. It does not test Zitadel's vendor code, so report any suspected product defect through the vendor's channels and keep your scope on what your team configured. Every finding should map to a hardening task in this group, so the fix has an owner and a retest.
Before you hire, write down the trust boundaries the tester must try to cross. For most deployments these are the instance administrators versus customer organizations, the Console versus end-user pages, service accounts and personal access tokens versus human sessions, and the OIDC and SAML clients that receive tokens. Ask the tester to attempt MFA and passkey downgrade paths, such as whether a password-only fallback can be reached without the second factor your policy requires, and whether recovery or email verification flows can be abused to reset a second factor. List every identity provider you federate with, since each adds a trust relationship the test should cover. Confirm the exact Zitadel version in use, because the test report must name it and the findings depend on it.
Define the rules of engagement in writing. Specify which environments are in scope (production, a staging copy built from the same Helm chart or Compose file, or both), whether automated scanning is allowed against login endpoints that may trigger rate limits, who receives alerts during testing, and which accounts the tester may create. Decide whether the test is grey box, with a standard user and an organization admin account provided, or black box. Ask for a retest of critical and high findings as part of the fixed scope, and confirm how evidence will be packaged for auditors. DeployOpen plans and runs this kind of engagement as a fixed-scope piece of work, so the written scope, deliverables and timeline are agreed before testing starts, and any figures for effort or duration should come from that written scope rather than from this page.
Test types and scoping options compared
This table compares black-box external testing, grey-box testing with standard user and org admin accounts, and configuration review of the instance, organizations, clients and identity providers. Read each row to see what a test finds, what access it needs and when it fits your Zitadel deployment. Most programs combine two or more of these types, with configuration review adding depth that outside-in testing cannot reach.
| Test type | What it finds | Access it needs | When it fits |
|---|---|---|---|
| Black-box external | Exposed console paths, login and registration abuse, rate limit gaps, weak TLS or proxy rules, user enumeration through error messages and timing | Public hostnames only, with no accounts or configuration. Test accounts may be added for login flows | First assessment of an internet-facing instance, or checking that WAF and proxy rules hold against an outside attacker |
| Grey-box with standard user | MFA and passkey enrollment flaws, step-up bypass attempts, account recovery abuse, IDOR on user-owned resources, token scope issues in the user's own session | One ordinary user account in each organization in scope, plus any self-service registration path | Testing whether a customer or workforce user can reach data or settings belonging to others |
| Grey-box with org admin | Privilege escalation inside an organization, ability to change MFA or lockout policy, project and role grant misuse, service account sprawl | An organization administrator account, ideally one that mirrors what a customer admin can do | Multi-tenant products where customer admins manage their own users and applications |
| Configuration review | Instance-level settings, login client placement, OIDC redirect URIs and token lifetimes, SAML signing and assertion checks, identity provider trust settings, admin inventory | Read access to instance and organization settings, exported configuration, and the list of clients and identity providers | Before go-live, after an upgrade, or when admin roles or federation change. Confirm the exact read permissions with your team before testing |
| Proxy and database layer review | Forwarded header trust, HTTP/2 handling, exposed management ports, database network reach and credential storage | Infrastructure diagrams, proxy configuration, and network access to the test environment | When the proxy, load balancer or PostgreSQL placement is part of the threat model |
Where Zitadel deployments usually need attention
These six areas are where a self-hosted Zitadel tends to expose the most risk, and each one is a claim the test should verify rather than a confirmed defect. They connect because a weakness in one, such as a console reachable through the proxy, can widen the impact of another, such as an administrator account in a customer organization.
Administrator isolation across organizations
Instance administrators and service accounts should sit apart from customer organizations. The test should confirm whether an organization administrator can change MFA policy, lockout settings or login client placement, and whether any admin accounts exist outside the intended organization. Map every role grant and record who holds IAM_OWNER or equivalent rights.
Zitadel organizationsConsole reachability through the proxy
The Management Console and administrative APIs should not be reachable by end users through the public entry point. Test the reverse proxy and any WAF rules from an unauthenticated and an ordinary user session, including direct requests to console paths and API prefixes, and confirm that blocked routes fail closed.
MFA and passkey fallback behavior
Passkeys are documented with fallback to password login, so a strong second factor can be bypassed by choosing the weaker path. Attempt to sign in with a password where MFA is required, check whether enrollment or recovery flows skip the second factor, and confirm that policy applies consistently across login, registration and reset pages.
Zitadel passkeysRedirect URI and client configuration
OIDC redirect URIs and SAML assertion consumer settings control where authorization codes and assertions are delivered. The test should try open redirects, wildcard or loosely matched URIs, mismatched logout URLs and clients that permit implicit or unnecessary grant types, then confirm each application client has only the flows it needs.
Service account and token scope
Machine users and personal access tokens can outlive the work they were created for. Verify which scopes and roles each token carries, whether tokens are long-lived or revocable, and whether a token from one project or organization can call APIs in another. Record the owner and rotation process for every service account.
Database network exposure
PostgreSQL should accept connections only from the Zitadel components that need them, and it should not be reachable from the proxy tier or other networks. Confirm the listening addresses, firewall or network policy rules, credential scope and TLS settings from outside the cluster, using the supported PostgreSQL versions as the baseline for your environment.
Zitadel database docsHow the ZAP proxy fits a Zitadel test
Penetration testers use ZAP as an intercepting proxy to sit between their browser and a self-hosted Zitadel. This is where most of the judgment in a Zitadel test happens: stepping through registration, login, MFA enrollment and passkey fallback, then replaying requests with altered parameters to see whether the server enforces what the interface hides. ZAP is free and licensed under Apache-2.0, according to its repository, which makes it a common choice for this kind of hands-on work alongside other tools.
- Browser proxying: Point the browser at ZAP, trust its certificate for the test environment, and record the login and console flows.
- Request replay: Resend authentication, MFA and session requests with changed values to test server-side checks.
- Scope limits: Define the Zitadel hostnames in scope so that third-party identity providers and analytics calls are not tested by accident.
- Evidence capture: Save the requests and responses that support each finding so the reviewer can reproduce it.
- Tool mix: Expect to use other tools, such as a browser developer console or a custom script, for flows ZAP handles poorly.
Confirm with the test lead which accounts, tenants and organizations each tester may use, and that the test environment is isolated from production users.
The ZAP Automation Framework runs a plan written in one YAML file, made of jobs such as spider, activeScan and report. It runs from the command line with the -cmd and -autorun options and is included in the stable Docker image, so the same plan can run on a laptop or in a pipeline. Scripted runs suit repeatable checks, such as scanning the same login and console paths after each Zitadel upgrade or configuration change.
- Plan structure: Each job has a defined purpose, so a plan can start with a spider, then run an active scan limited to agreed paths.
- Exit codes: The run exits with 0 on success, 1 on error and 2 with warnings, so a pipeline can react to each outcome.
- Exit status job: An exitStatus job can set the exit code from scan results, which lets a build fail on a chosen severity.
- Authentication handling: Active scans against login flows need a session or context that the plan can reproduce, so confirm how the plan logs in before it scans.
- Target discipline: Active scanning sends attack traffic, so keep the target to a test instance that the owner has approved.
Check the exit behavior against a known-good run before you rely on it as a gate, and confirm that the scanner account cannot change instance settings.
Scanner output becomes useful only after it is triaged. DefectDojo imports ZAP XML reports, with or without requests and responses, which gives the test team one place to track findings across runs. The ZAP API can also drive scans, but its defaults matter for safety: it is enabled by default in daemon and desktop modes and is reachable only from the machine running ZAP, and it requires an API key on all API actions and some other operations.
- XML import: Import ZAP XML into DefectDojo, deciding whether to keep requests and responses based on data handling rules.
- API exposure: Keep the API bound to the local machine and do not expose it on a shared network segment.
- API key handling: Store the API key as a secret, rotate it after the test, and never place it in a shared plan file.
- Client libraries: Official API client libraries exist for .NET, Java, Node.js and Python if the team automates ZAP from code.
- Triage: Mark each finding as confirmed, false positive or out of scope, with the reason.
Scanner output needs human validation against Zitadel's behavior before it goes into a report. Ask the test lead which findings were reproduced by hand and which were only flagged by the scanner.
How a Zitadel test moves from scope to retest
The test starts with a written scope that names the trust boundaries, including the line between the internet-facing proxy and the internal PostgreSQL database. The tester then receives test accounts for a standard user, an organization admin and a service account, and works through login, OIDC and SAML, console and API paths in black-box and grey-box modes. Every candidate finding is validated and rated before the report lists fixes. The retest confirms each fix against the same accounts and paths, so check that the retest covers the exact accounts and endpoints named in the original scope.
The phases of a Zitadel test, with the proxy-to-database trust boundary marked.
Steps to prepare a Zitadel penetration test
This sequence turns a vague request for a security test into a scoped, authorized engagement against a known Zitadel configuration, with the test accounts, logging and expected settings in place before any attack traffic is sent.
Confirm the deployment and version
Your infrastructure team records how Zitadel runs (Linux binaries, Docker Compose or Kubernetes with the official Helm chart), the exact Zitadel version, and the PostgreSQL version. Check that PostgreSQL is within the range Zitadel supports, which the database documentation lists as versions 14 through 18. Confirm the version against the releases page so the tester knows which behavior to expect. Done when the deployment record names every component, its version, and where TLS terminates, and the tester has signed off on that record.
Write the scope and rules of engagement
The security lead and the testing firm agree in writing which hostnames, instances, organizations and APIs are in scope, which are out, and which tests are allowed, such as login brute force, MFA and passkey bypass attempts, and console access checks. The document also sets testing windows, the emergency contact for a stop request, how findings are reported, and how credentials used in testing are handled and destroyed. Done when both parties have signed the scope, and every hostname in it resolves to a system you own.
Create dedicated test identities in a separate organization
Your identity administrators create test users, a test machine user and a test client in a dedicated organization inside a non-production instance, not in a live customer organization. Keep instance administrators and service accounts out of the test organization so the test does not touch administrative settings. Record each identity's purpose, role grants and expiry date. Done when a test user can sign in, the test organization shows no link to production customer data, and the list of identities matches the scope document.
Provide a staging or pre-production instance
Where possible, the tester works against a staging instance that mirrors production configuration, including the same proxy, TLS settings, PostgreSQL version and identity providers. Testing production directly is a decision for the security lead, made with a documented rollback and a monitoring plan. Ask the tester to confirm which differences from production remain, because a gap in the proxy or WAF layer can hide or create findings. Done when the target environment and its known differences from production are written in the scope document.
Capture the expected configuration
Export or document the intended configuration: identity providers and their protocols (OIDC, SAML or LDAP), registered clients and redirect URIs, MFA and passkey policy, password policy, session and token lifetimes, and which roles can reach the Console. The tester compares observed behavior against this baseline, so every deviation becomes a clear finding rather than a debate. Done when the baseline is versioned, reviewed by the owner of each setting, and attached to the test plan.
Set up ZAP or the chosen tooling with logging
The tester installs OWASP ZAP (the Zed Attack Proxy, Apache-2.0 licensed) from the official download or a stable Docker image, and plans any repeatable scans with the Automation Framework YAML plan. Keep the ZAP API bound to the testing machine and protected by an API key. Route test traffic through a proxy or log collector that records source address, timestamps and request paths, so your own monitoring can separate test activity from attacks. Done when a baseline scan runs against the staging target, the logs show the test source, and the team can see the test traffic in its alerts.
Verify the test can start and stop safely
Before the active phase, run a short, low-volume check to confirm that rate limits, lockout behavior and alerting respond as expected, and that the stop procedure works. Confirm that the test accounts can be disabled and that the emergency contact receives alerts. Done when the security lead records a go decision in the scope document, names who can stop the test, and the tester confirms the stop procedure in a dry run.
Security and operational rules for running the test
A Zitadel penetration test touches live login, admin and token paths, so the rules for where, when and how testers operate matter as much as the test cases. The cards below cover the decisions to settle in writing before testing starts, since each one can lock out real administrators, expose customer data or create a contractual problem if left open.
Choose production or staging deliberately
Testing a staging instance that mirrors production configuration, identity providers and proxy rules gives the most realistic signal without touching customer logins. If any test must run against production, agree on a window, a named contact on each side and the exact hostnames in scope. Ask the team to confirm that staging uses the same masterkey handling, proxy layer and organization structure as production, because a staging copy with relaxed settings will hide the findings that matter.
Protect real administrators from lockout
Brute-force and lockout tests against login can lock out instance administrators, and the lockout policy applies to any account the tester targets. Keep test accounts separate from administrator identities, and confirm that a break-glass machine user exists and works before any credential or MFA test begins. Review the isolation of administrators in a dedicated organization so testers cannot reach or change those accounts by accident.
Coordinate rate limits with test traffic
Rate limits in front of Zitadel will throttle a tester, and a test run can also trip alerts or trigger blocks that affect other users behind the same IP addresses. Agree on source addresses the tester will use, ask the operations team which limits apply to login and API paths, and decide whether limits are tested or temporarily relaxed for the run. Record any block so the team can tell a legitimate defense from a fault during analysis.
Handle credentials and tokens found during testing
Testers may find exposed tokens, service account keys, client secrets or personal access tokens in logs, browser storage or configuration. Define in advance that any such secret is reported immediately through a private channel, is not copied into reports or tickets in full, and is revoked by the owner after the finding is confirmed. Ask the test team to state how they will store evidence and when they will delete it.
Protect data in test accounts
Registration and self-service flows create real user records, emails and SMS messages that may reach real people or third-party providers. Use test domains and test phone numbers you control, limit the number of accounts created, and confirm that test users cannot be mistaken for customer or workforce identities. Ask who can see captured personal data in the evidence and how long it is kept.
Notify the hosting provider when terms require it
Cloud and data center providers set their own rules on penetration testing, including whether notice is required, which services are in scope and which traffic patterns are prohibited. Read those terms before scheduling the test, record the notice you gave or the approval you received, and confirm that the tester's scope does not extend to shared infrastructure you do not own. Your legal or procurement team should own this check.
Questions buyers ask about penetration testing Zitadel
What does a Zitadel penetration test cost, and what drives the price?
The price is set by the written scope, not by a list rate. The main cost drivers are how many login, registration and recovery paths are in scope, whether MFA and passkey flows are tested, how many OIDC and SAML clients and organizations exist, whether the test covers the proxy and database layers, and how many roles (anonymous, customer user, organization admin, instance admin) the tester must work through. Ask for a quote that lists each component, states which items are one-time work (planning, testing, reporting) and which recur (retests, continuous testing under a retainer), and names what is excluded. Tools such as the free ZAP scanner lower licence cost but not the expert time needed to validate findings and chain them. DeployOpen does not publish a price list; a quote follows from the written scope.
How long does a Zitadel penetration test take?
Duration depends on the same scope variables as cost: the number of user journeys, roles, identity providers, client applications and environments, and whether the test is black box, grey box or white box. Time also depends on how quickly the client can provision test accounts, a staging copy that mirrors production, and access to logs. Authenticated testing across several Zitadel organizations takes longer than testing a single anonymous login page. Agree on a start date, a test window, and a reporting date in the written scope before work begins, and ask for the timeline broken into planning, testing, validation and reporting phases.
What does our team need to provide before a Zitadel penetration test?
The tester needs an environment that matches production as closely as possible, including the same Zitadel version, PostgreSQL version, reverse proxy and WAF configuration, and TLS settings. Provide test accounts for each role in scope, such as a standard user, an organization administrator and a customer user in a second organization, along with their MFA or passkey enrolment method. Share the list of OIDC and SAML clients, redirect URIs, identity provider connections, and the domains and hostnames in scope. Confirm rules of engagement: permitted hours, rate limits the tester may exceed, whether email and SMS providers may receive test traffic, and a named contact for stopping the test. Also agree how credentials and findings are transferred.
Can our internal team run a Zitadel penetration test without a partner?
Your team can test its own system, and many teams run routine checks in-house, such as scanning, configuration review and regression testing after upgrades. A formal penetration test, however, benefits from testers who are independent of the people who built and operate the system, who know how to chain weaknesses across identity flows, and who can document results in a form your auditors and risk committee accept. Internal teams can still prepare the environment, own remediation and verify fixes. Decide which parts you want to keep in-house and which you want an outside party to perform, and write that split into the scope.
How do we choose a consultant for a Zitadel penetration test?
Look for evidence of hands-on identity testing, not only general web testing. Ask whether the consultant has tested OIDC and OAuth flows, SAML assertions, passkey and MFA enrolment and recovery, multi-tenant authorization between organizations, and API token handling. Ask how they will test the proxy and database layers and what access they need to each. Request a sample report structure, a description of how findings are rated and validated, and how retests are billed. Confirm the methodology is written down, the tester's scope boundaries are documented in the engagement letter, and the firm can work inside your infrastructure if your data cannot leave it. Be cautious of any firm that promises a guaranteed outcome or a pass.
Is the free ZAP scanner enough to test a self-hosted Zitadel?
ZAP is a free, Apache-2.0 licensed web app scanner that is useful for finding common issues during development and for automated regression checks. Its Automation Framework can run spider and active scan jobs from one YAML plan, and its exit codes can fail a pipeline when a scan finds problems. On its own, though, ZAP does not understand Zitadel's business logic: it will not decide whether an organization administrator can change MFA settings for the instance, whether a passkey fallback can be abused, or whether a token issued for one organization is accepted by another. Those checks need manual testing. Use ZAP for coverage and repeatable scanning, and expect a skilled tester to run the manual authorization and identity tests on top of it. Its API should be protected with an API key and kept on a restricted interface.
How does a retest of Zitadel findings work?
A retest checks whether the fixes for reported findings work and does not introduce new exposure. The usual sequence is: your team applies fixes, records what changed (configuration, proxy rule, Zitadel version or code), and asks the tester to verify each finding against the same test accounts and environment. The report should mark each item as fixed, partly fixed or still open, with evidence. Ask in advance whether retests are included in the fixed scope or quoted separately, how many retest rounds are covered, and how long after the final report the window stays open. Ongoing retests can also be arranged under a retainer if you upgrade Zitadel or change your proxy configuration.
How DeployOpen scopes and tests self-hosted Zitadel
DeployOpen approaches a Zitadel penetration test as a fixed-scope engagement agreed in writing before work starts. The scope names the login, console, API, federation and infrastructure surfaces to be tested, and the findings are returned with fixes and a retest.
How we scope
- Agree in writing which instances, organizations, login flows and admin surfaces are in scope.
- Confirm whether MFA, passkey fallback and password reset paths are tested as separate targets.
- Define test accounts, roles, and whether service accounts and personal access tokens are included.
How we build
- Set up a test copy of the Zitadel deployment that mirrors production proxy, database and TLS settings.
- Run authenticated and unauthenticated testing of OIDC and SAML configuration and redirect handling.
- Test API tokens, service accounts and console exposure, with ZAP scans configured as repeatable automation plans.
How we hand over
- Deliver a findings report with reproduction steps, affected components and severity for each issue.
- Provide recommended fixes for the proxy, database and Zitadel configuration, mapped to each finding.
- Retest agreed fixes and document the results so your team can rerun the same checks later.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after the initial engagement.
- Retainers can repeat the scoped test after Zitadel upgrades or changes to login and federation settings.
- Ask us to confirm evidence formats and retest windows in the written scope before the engagement starts.

