Language: English Español
Golden fixtures are JSON files in src/libs/sdk/contracts/fixtures/ that capture representative AuthorizationGraph payloads covering the full spectrum of behaviors. They are the executable contract: every SDK and the UMS server must agree on how to interpret them.
Each fixture is round-tripped through every artifact that touches the schema:
auth-graph.schema.json.AuthorizationGraphBuilderService can produce this exact shape given the equivalent input.Ums.Sdk.Contracts, @ums/sdk-contracts parse it without loss.RequiresScope('STOCK_VIEW.VIEW')”), every runtime returns the same AuthorizationDecision.CI runs all five steps on every PR. A failure in any step blocks the PR.
| File | Scenario | Used to verify |
|---|---|---|
local-auth-success.json |
Happy path Local (BCrypt) auth, OrgWide profile, mix of Allow / NotGranted / Deny | Baseline shape, scope generation |
idp-auth-success.json |
Happy path IDP (Azure AD) auth, BranchScoped profile, MFA required | IDP authentication block, branch not null |
deny-wins.json |
Same action has Allow in one place and Deny in another | Deny-precedence rule (Axiom A3) |
override-allow.json |
Profile override flips a Template Deny to Allow | Override-takes-precedence rule |
empty-permissions.json |
User has Profile but no permissions granted | Empty scopes[], domainPermissions[] |
expired-graph.json |
validUntil < generatedAt + 1ms (deliberately expired) |
AUTH_201 rejection by SDKs |
feature-flag-matched.json |
Flag matches via BranchId criteria |
isEnabled = true, matchedCriteriaType set |
feature-flag-missed-context.json |
Flag exists, but context doesn’t provide required field | isEnabled = false, matchedCriteriaType = null |
multi-tenant-rejection.json |
Graph is for tenant A, used to probe a tenant-B-expected client | AUTH_109 tenant mismatch |
schema-unsupported-major.json |
schemaVersion: "2.0.0" (future MAJOR) |
SDK with <2.0.0 compat rejects with AUTH_205 |
schema-minor-ahead.json |
schemaVersion: "1.99.0", contains unknown optional field |
Accept-with-warning, preserve in extensions |
schema-missing.json |
Payload without schemaVersion |
AUTH_204 rejection |
auth-graph.md §8 (11111111-1111-... for tenants, 22222222-... for system suites, etc.). Predictable IDs make diffs readable.LOGISTICS_CORE, ACME_RETAIL, EXAMPLE_BANK. Never real customer names.firstname.lastname@<fictional-domain>.example. Use .example per RFC 2606."PLACEHOLDER".src/libs/sdk/contracts/fixtures/<scenario-name>.json.A fixture can only be removed if the scenario it represents is no longer reachable in any supported schema version. Removal requires:
If a fixture becomes outdated due to a MAJOR schema change, prefer to migrate it (update to match the new schema) rather than delete. Historic fixtures are useful for regression analysis.
src/libs/sdk/contracts/fixtures/