Optional technical reference. This material is for developers, integration specialists and platform administrators. For the consultant lesson, read the practical guide.
Preserved from source baseline
d4587c7c0e073e58c2d430342f65ac55dd701bf4; source/static examples retain their stated scope. They are not new runtime verification or required consultant setup steps.
Authentication Test Lab
Practical guide and worked examples
Read the test boundary before running the lab
The local lab is a developer diagnostic fixture, not a production identity system. Its script provisions synthetic users/providers, issues credentials, changes MFA/SCIM state and may restart its API according to its launcher. Those are real mutations in an owned environment. Reading the examples below is not permission to run the script against a shared or production API.
Read start-auth-lab.ps1, the dedicated Compose file and the test script before an admitted run. Use a unique lane/project/ports and the intended local development posture. Keep generated secrets and session material outside public reports. The script prints named assertions; the name identifies the actual boundary, while a passed overall process does not expand any one assertion into a different flow.
| Assertion family | Actual scope | Separate qualification |
|---|---|---|
| Local Basic | Created local user credential reaches Inflow's session endpoint | Ordinary browser sign-in and intended business authorization. |
| OIDC | Metadata/JWKS/token checks plus a separate trusted-header JIT exercise | Native browser start/callback and real IdP security controls. |
| SAML | IdP metadata configuration | Native response signature/audience/session journey. |
| LDAP | Real lab bind and search | Actual end-user authentication path. |
| API keys | Issue/use/revoke behavior in the fixture | Caller-specific scope/least privilege in a deployment. |
| TOTP / SCIM | Named local factor/provisioning cases | Full enrollment/recovery/provisioning operational programme. |
The expected result in a worked example is a reading/diagnostic contract, not a claim this documentation program executed the lab. Do not paste the script's known development password into a real account or print a generated key/token as evidence.
The examples below use synthetic teaching data. They are grounded in the cited source contracts; this documentation change did not execute these operations against a running Inflow deployment. Use normal authenticated sessions and the actual returned identifiers, revisions and versions from an authorized environment.
Example ROOT-LAB-01 — Separate local Basic authentication from a trusted actor header
Scenario and inputs. A developer is inspecting an authorized local lab run and sees both administrative requests with development actor headers and a named Local Basic authentication assertion. The intended evidence is that a newly created local person's credential reached the session endpoint; an administrative seed header alone would not establish that person's successful authentication.
Procedure. Read the script's user-creation block and the following request to /api/admin/identity/session. The Basic request constructs an Authorization header from the new user's username and test password, whereas preparation requests use the local development fixture's administrator header. Inspect the named assertion and its HTTP outcome without copying the Authorization value. If performing an admitted run, retain the exact source/build/configuration/fixture classification and use the generated suffix to distinguish this user from earlier runs.
Expected result. The named Basic assertion passes only for the script's explicitly checked response. It is distinct from API reachability under the development actor and does not prove a user can work a task, read a particular row or open the published Leave requests app. These business checks need their own current scope and normal session.
Failure and recovery. If preparation is green but Basic is refused, inspect local-password posture, account state and the actual credential setup privately. Do not replace the failing Basic request with X-Actor-Id: root and retain the same assertion name. Keep the authentication failure visible and correct the accountable fixture/configuration before another admitted attempt.
Sources. test-auth-lab.ps1:137, test-auth-lab.ps1:145, docker-compose.auth-lab.yml:1.
Example ROOT-LAB-02 — Read OIDC connectivity and header-JIT as separate assertions
Scenario and inputs. The lab contains a local Keycloak realm and an OIDC provider definition with a secret reference. A report contains an OIDC metadata/JWKS/token result and another result for external-header JIT. The developer needs to decide what those results actually establish without claiming that an ordinary user's browser completed an OIDC authorization-code callback.
Procedure. Trace $oidcTest to the provider test endpoint and inspect its named checks. Then trace the separate external-header request and its user-directory readback. Record which assertion succeeded or failed and which identity mechanism carried that request. Compare issuer/client/audience and mapped claims with the local realm fixture. Keep private tokens, headers and full provider responses out of a shared diagnostic note; preserve only safe check names, codes and fixture/build identifiers.
Expected result. Provider connectivity and the trusted-header JIT simulation can each pass or fail independently. Neither becomes a native browser start/callback receipt merely because both are green. The assertion labels describe implemented local preparation paths and should remain unchanged when reporting the result.
Failure and recovery. If a realm hostname is reachable from the API container but not the host browser, resolve that routing distinction with the environment owner rather than rewriting the asserted boundary. A production OIDC issue needs the actual admitted provider flow; a trusted-header simulation is not an alternate proof or permission to enable impersonation in Production.
Sources. test-auth-lab.ps1:172, test-auth-lab.ps1:184, inflow-auth-lab-realm.json:1.
Example ROOT-LAB-03 — Locate a failed LDAP check at its real boundary
Scenario and inputs. The lab's OpenLDAP service is configured with a synthetic directory tree and dedicated bind reference. The API is reachable, but LDAP bind/search fails. The developer should identify the first failed boundary instead of assuming that all authentication methods or all application services are down.
Procedure. Inspect the owned lab service/port mapping and seed LDIF, then the saved provider settings used by the script. Trace $ldapTest and its returned checks: endpoint reachability, bind and the intended search are separate diagnostic steps. Compare host-facing and container-facing addresses before changing anything. For an actual admitted run retain the result of each check and source/fixture identity; do not post the bind secret, a private directory entry or an unrestricted search dump.
Expected result. The failure can be localized to a network, credential or search-scope boundary. A later successful bind/search demonstrates that specific lab configuration; it does not show that an end user's LDAP credentials created an Inflow session, nor that the directory is qualified for production use.
Failure and recovery. Do not grant the bind identity broad directory administration or substitute another owner's credentials. Correct the narrow intended setup with the authorized directory/lab owner. If an end-user login path is the actual goal, evaluate its implemented adapter and native login checks separately instead of extending the lab assertion's meaning.
Sources. test-auth-lab.ps1:235, bootstrap.ldif:1, docker-compose.auth-lab.yml:1.
Example ROOT-LAB-04 — Interpret revoke, MFA and SCIM outcomes without disclosing credentials
Scenario and inputs. A developer has the output of the lab's credential/provisioning section. It includes an API-key use/revoke comparison, TOTP factor confirmation checks and a SCIM create/deactivate case. These are separate synthetic state changes; their sensitive inputs must not be embedded in a documentation screenshot or a copied report.
Procedure. Read the script's API-key issuance/use/delete sequence and compare the before/after statuses using the same key privately. Then inspect the intentional bad TOTP confirmation and the correctly generated confirmation/verification assertion. Finally inspect the SCIM request's schemas, created user and patch-to-inactive assertion. Report each named outcome with its actual boundary rather than reducing the sequence to an unexplained green badge. Preserve the exact failed case if any one of those assertions fails.
Expected result. Revocation is checked against the credential actually issued in the fixture. TOTP distinguishes an expected refusal from factor activation and verification. SCIM proves the specific create/deactivate operations in the admitted local fixture. None of these results qualifies unrelated recovery codes, passkeys, Production sessions or broader application permissions.
Failure and recovery. A real key, SCIM token or TOTP secret remains private even when generated for a test. Do not share it as evidence, retry a private production factor or delete someone else's account to clear a fixture conflict. Use a new admitted fixture only when allowed and retain the original outcome rather than weakening the expected refusal.
Sources. test-auth-lab.ps1:238, test-auth-lab.ps1:247, test-auth-lab.ps1:254.
The authentication test lab gives Inflow a local set of identity systems for repeatable authentication testing without paid Microsoft, Google, Okta, LDAP, SAML, SCIM, RADIUS, Kerberos, or certificate-provider accounts.
What The First Lab Provides
The lab is an opt-in Docker Compose overlay:
docker compose -f docker-compose.yml -f auth-test-lab/docker-compose.auth-lab.yml up -d
It adds:
- Keycloak at
http://localhost:18080- Realm:
inflow-auth-lab - Admin:
admin/admin - OIDC client:
inflow-studio-oidc - SAML client:
inflow-studio-saml - Users:
alice/alicePassword123,bob/bobPassword123
- Realm:
- OpenLDAP at
ldap://localhost:1389- Admin DN:
cn=admin,dc=inflow,dc=test - Admin password:
admin - Test users:
uid=alice,ou=people,dc=inflow,dc=testuid=bob,ou=people,dc=inflow,dc=test
- Admin DN:
- Inflow itself for:
- Local Basic authentication
- API keys
- TOTP MFA
- Inbound SCIM 2.0
- External-auth JIT simulation through trusted gateway headers
Start The Lab
From the repository root:
.\auth-test-lab\scripts\start-auth-lab.ps1 -Build
The script starts the normal Inflow stack plus Keycloak and OpenLDAP, then applies database migrations.
Run The Lab Smoke Test
.\auth-test-lab\scripts\test-auth-lab.ps1
The script currently verifies:
- Inflow API is reachable.
- Local Basic authentication works.
- Keycloak OIDC metadata, JWKS, and token endpoint checks pass through Inflow's auth-provider test action.
- OIDC external-auth JIT simulation creates an Inflow user through trusted gateway headers.
- Keycloak SAML metadata checks pass through Inflow's auth-provider test action.
- OpenLDAP bind and sample search pass through Inflow's LDAP provider test.
- API key issue, authentication, and revocation.
- TOTP MFA enrollment, bad-code rejection, confirmation, and verification.
- SCIM user creation and deactivation.
During the OIDC JIT simulation, provider records become available to the
trusted-header login path without restarting api-dev; external-auth
authenticators read the current provider configuration on every authentication
attempt.
Stop The Lab Providers
.\auth-test-lab\scripts\stop-auth-lab.ps1
This stops only the lab provider containers and leaves the core Inflow stack running.
Current Authentication Coverage
| Method | Lab status | Notes |
|---|---|---|
| Local username/password | Automated | Tested with HTTP Basic against Inflow. |
| API key | Automated | Issue, use, revoke. |
| OIDC | Automated provider test + JIT simulation | The lab script checks metadata/JWKS/token connectivity and trusted-header JIT. Native browser start/callback flows exist separately; this script does not certify them. |
| OAuth2/JWT/Bearer | Partial | Uses the same provider-test foundations as OIDC. Add signed token validation tests after the bearer runtime validates JWTs. |
| SAML | Automated metadata test | Keycloak exposes SAML IdP metadata. The platform has a native SAML start/response path; this metadata test does not certify browser SSO or a production IdP. |
| LDAP | Automated bind/search test | OpenLDAP is real and seeded. Full LDAP username/password login is not yet wired through the HTTP auth filter. |
| Active Directory | Planned | Add Samba AD DC or treat AD as an LDAP preset once the LDAP login runtime lands. |
| MFA TOTP | Automated | Enrollment, confirmation, verification. |
| SCIM | Automated | Inbound SCIM user creation and deactivation. |
| Kerberos | Planned | Add MIT Kerberos KDC service and SPNEGO runtime tests. |
| RADIUS | Planned | Add FreeRADIUS service and RADIUS client runtime tests. |
| mTLS / Certificates / Smart cards | Planned | Add local CA, client certificates, and reverse-proxy/client-cert filter tests. |
| National ID | Planned as OIDC preset | Test with Keycloak claim profiles that mimic Nafath/UAE PASS-style brokers. |
Important Gap
The lab distinguishes configuration tests from real login tests. For example,
OpenLDAP bind/search is real today, but authenticating a user into Inflow via
LDAP username/password requires an additional runtime slice in
PlatformAuthenticationFilter and the LDAP authenticator. Until that exists,
the lab proves LDAP configuration and connectivity, not LDAP login.
Why Local Providers
Online dummy providers are useful for manual experiments, but they can change or disappear. The local lab gives us deterministic test data and makes it possible to run repeatable verification before commits and releases.