Skip to content

ATS-PFM-SEC-015Enforce access at request boundaries: Capability Test Specification

Markdown

ATS-PFM-SEC-015

Enforce access at request boundaries: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleSecurity, Customers and WorkspacesRevision2

Read atservices-platform ad3f6a65

Coverage

  • Rule gap: FND-PFM-SEC-072
  • Transition gap: FND-PFM-SEC-072
  • Validation covered
  • Permission covered
  • Edge covered
  • Failure gap: FND-PFM-SEC-072
  • Boundary covered
  • Concurrency gap: FND-PFM-SEC-072
  • Invariant covered
  • Interaction covered

Test Scenarios

15 scenarios proving CAP-PFM-SEC-015; 11 bound to an existing test.

01 Reject unregistered sign-in originsvalidationunitnegativetest
Proves
BR-CAP-PFM-SEC-015-01
Preconditions
Prepare tokens from unknown issuers, inactive pools and unregistered clients, plus a request without a token.
Steps
Authorize each request.
Expected
Return 401 before identity or grant reads.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses an unknown issuer: 401, and no pool, identity or grant is read
Source
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses a request with no token at all
02 Require an existing active identityvalidationunitnegativetest
Proves
BR-CAP-PFM-SEC-015-02 INV-DOM-PFM-SEC-003-02 INV-DOM-PFM-SEC-003-05
Preconditions
Prepare an unknown identity, revoked identity and suspended user.
Steps
Attempt authorization and inspect writes.
Expected
Reject the requests without creating or updating identities.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses an unknown identity with 401 and writes nothing: the authorizer never creates one
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses a suspended user with 401, and an invited or revoked one as inactive
services-platform:modules/security/tests/unit/authorizer/authorizer-source.spec.ts#never inserts or updates anything in Postgres: every port it has is a read
Source
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses an unknown identity with 401 and writes nothing: the authorizer never creates one
03 Separate portal, console and customer reachboundaryunitnegativetest
Proves
BR-CAP-PFM-SEC-015-03
Preconditions
Prepare portal and ordinary console callers.
Steps
Use portal credentials on console, system and another workspace’s routes; use console credentials across customers.
Expected
Reject every boundary crossing.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses a portal token on a console route before any identity is read
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses a portal token on a system route the same way
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses a portal user of another tenant than the pool’s
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#never lists a tenant of another customer for a console user, and does not lock the route for its own tenants
Source
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses a portal token on a console route before any identity is read
04 Limit staff grants to HQboundaryapinegativetest
Proves
BR-CAP-PFM-SEC-015-04
Preconditions
Load the declared operations and callers for customer Administrator and the three staff roles.
Steps
Exercise console and portal routes with staff authority, then HQ routes with each caller.
Expected
Staff grants do not open console or portal routes. HQ admits authorized staff, rejects customer authority as non-staff, and enforces each staff role’s keys.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/e2e/staff-separation.e2e.spec.js#refuses the widest grant Rhythm holds, every one of them
services-platform:modules/security/tests/e2e/staff-separation.e2e.spec.js#admits the Rhythm Administrator, who is answered by the operation rather than refused
services-platform:modules/security/tests/e2e/staff-separation.e2e.spec.js#tells that Administrator they are not staff, rather than that a permission is missing
services-platform:modules/security/tests/e2e/staff-separation.e2e.spec.js#refuses a Support Representative every staff route their policy does not carry
Source
services-platform:modules/security/tests/e2e/staff-separation.e2e.spec.js#refuses the widest grant Rhythm holds, every one of them
05 Reject inconsistent route declarationsvalidationunitnegativetest
Proves
BR-CAP-PFM-SEC-015-05
Preconditions
Construct manifests with incorrect staff keys and empty protected permissions.
Steps
Validate the manifests together.
Expected
Report all declaration problems, including ordinary keys on system routes and staff keys elsewhere.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/authorizer/registry-manifest.spec.ts#refuses a system route required by an ordinary key, which a customer administrator could hold
services-platform:modules/security/tests/unit/authorizer/registry-manifest.spec.ts#refuses a protected route that requires nothing, and a public route that requires something
services-platform:modules/security/tests/unit/authorizer/registry-manifest.spec.ts#collects every problem at once, so a deploy is told all of them
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses a route the registry does not declare: a Deny the gateway may cache
Source
services-platform:modules/security/tests/unit/authorizer/registry-manifest.spec.ts#refuses a staffOnly key below a system route
06 Restrict authorization to grant reachpermissionunitnegativetest
Proves
BR-CAP-PFM-SEC-015-06
Preconditions
Give a caller grants for selected workspaces.
Steps
Authorize reached and unreached paths and an operation no grant covers.
Expected
The grant slice lists only reachable workspaces; inaccessible paths and uncovered operations are denied.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#lists only the tenants a grant could reach, not every tenant of the customer
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#returns a Deny for the whole route when no grant could apply anywhere
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses a system route without a platform-scope assignment
Source
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#lists only the tenants a grant could reach, not every tenant of the customer
07 Sign bounded authority and fail closedinvariantunitnegativetest
Proves
BR-CAP-PFM-SEC-015-07
Preconditions
Prepare a valid request, an oversized slice and registry, grant-store and signing failures.
Steps
Authorize each case and inspect the signed context.
Expected
The context contains no address or raw token and expires at cache lifetime plus thirty seconds. Oversize and unavailable inputs prevent an Allow.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#the context expires at iat + the gateway TTL + 30 s and carries no IP address
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses a grant slice over 6 KB rather than truncating it
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#fails closed when the registry cannot be read at all
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#a KMS failure is context_unavailable: there is no Allow without a context
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#the context it signs is the only thing that carries authority: the raw token never reaches the backend
Source
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#the context expires at iat + the gateway TTL + 30 s and carries no IP address
08 Describe refusals without identity dataedgeunitnegativetest
Proves
BR-CAP-PFM-SEC-015-08
Preconditions
Arrange missing-permission, workspace-boundary and system-access refusals.
Steps
Inspect their metadata.
Expected
Return the relevant cause and required keys without caller identity data.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#names the keys the route requires and the cause permission on a route Deny for a missing grant
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#names the cause access, never permission, when holding the key would not help (a system route without staff authority)
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#names the refusal reason and the missing key, both strings, and nothing that identifies the caller
Source
services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#names the keys the route requires and the cause permission on a route Deny for a missing grant
09 Apply application access and licensing checkspermissionapinegativetest
Proves
BR-CAP-PFM-SEC-015-09
Preconditions
Prepare an application-access denial and a withheld workspace licence.
Steps
Request the affected application and Platform in each case.
Expected
The application returns the appropriate access or licensing code; Platform still serves its route.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/e2e/application-access-enforced.e2e.spec.js#evaluates the application access step in enforce, which is what every case below is about
services-platform:modules/security/tests/e2e/application-access-enforced.e2e.spec.js#is refused it once a deny names the access key, though the allow beside it is untouched
services-platform:modules/security/tests/e2e/application-access-enforced.e2e.spec.js#is still served a Platform route, so the person can read their own context and be told why
services-platform:modules/security/tests/e2e/application-access-enforced.e2e.spec.js#refuses the same route in the withheld tenant, under the licence step’s own code
Source
services-platform:modules/security/tests/e2e/application-access-enforced.e2e.spec.js#evaluates the application access step in enforce, which is what every case below is about
10 Measure the gateway cache limitboundaryapinegativetest
Proves
BR-CAP-PFM-SEC-015-11
Preconditions
Establish a cached Allow, then revoke its grant.
Steps
Submit a flush and request the route before and after cache expiry.
Expected
A cached Allow may persist within the window; a fresh decision after expiry refuses. Workflow success alone does not prove eviction.
Data
A deployed gateway is needed to measure persistence of cached decisions; local bindings establish only flush-workflow execution.
Bound to
Source
services-platform:modules/security/tests/integration/lifecycle/authorizer-flush/authorizer-flush-workflow.integration.spec.js#succeeds, having flushed every stage
11 Validate service-function route ownershippermissionunitnegativetest
Proves
BR-CAP-PFM-SEC-015-13
Preconditions
Prepare service operations and function declarations.
Steps
Validate an unserved route, sensitive route behind an ordinary function and function naming an unknown route.
Expected
Reject each declaration and identify the offending route or permission.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/authorizer/service-function-rules.spec.ts#refuses a service route no service function lists, naming it
services-platform:modules/security/tests/unit/authorizer/service-function-rules.spec.ts#refuses a route whose catalog permission is sensitive behind a function that is not, naming the key
services-platform:modules/security/tests/unit/authorizer/service-function-rules.spec.ts#refuses a function that lists a route absent from the route list
Source
services-platform:modules/security/tests/unit/authorizer/service-function-rules.spec.ts#refuses a service route no service function lists, naming it
12 Enforce access at request boundaries with maintain workspace information and operating statusinteractionapinegativeproposed
Proves
BR-CAP-PFM-SEC-002-09 BR-CAP-PFM-SEC-015-06
Preconditions
An ordinary caller has valid authority over an active workspace.
Steps
Disable the workspace and issue a new protected request after the availability cache expires.
Expected
The new request is refused even though the role assignment remains present.
Data
An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
Source
services-platform:modules/tenants/services/access/tenant-availability.ts:tenantAvailabilityOf,services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#returns a Deny for the whole route when no grant could apply anywhere
13 Enforce access at request boundaries with understand available workspace accessinteractionapinegativeproposed
Proves
BR-CAP-PFM-SEC-007-03 BR-CAP-PFM-SEC-015-07
Preconditions
A member has an allow and a matching deny.
Steps
Read effective access and issue the denied operation through fresh gateway evaluation.
Expected
The access explanation and gateway agree that the denied permission is absent.
Data
An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
Source
services-platform:modules/security/tests/integration/services/security-context/get-security-context.integration.spec.js#takes the denied key out of the allowed keys, though another grant allows it,services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#refuses a grant slice over 6 KB rather than truncating it
14 Enforce access at request boundaries with assign roles within a controlled scopeinteractionapiproposed
Proves
BR-CAP-PFM-SEC-010-03 BR-CAP-PFM-SEC-015-12
Preconditions
A member holds a record-type grant for one customer record type.
Steps
Request the permitted type and another type through the public operation.
Expected
The gateway permits applicable passage while the resource service hides the unrelated record type.
Data
An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
Source
services-platform:modules/security/tests/integration/services/membership/resource-scopes.integration.spec.js#refuses an archived custom object, naming the object key, and writes nothing,services-platform:modules/security/tests/unit/authorizer/authorize.spec.ts#the gateway lets the holder through to an object the scope does not name, so the service answers it as not found
15 Enforce access at request boundaries with suspend and resume service principalsinteractionapinegativeproposed
Proves
BR-CAP-PFM-SEC-015-13 BR-CAP-PFM-SEC-018-04
Preconditions
An active registered service principal can call its declared operation.
Steps
Suspend it, wait for registry refresh, call again, resume it, and repeat after refresh.
Expected
The suspended caller is refused; the resumed eligible caller succeeds without deployment.
Data
An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
Source
services-platform:modules/security/tests/unit/authorizer/service-function-rules.spec.ts#refuses a route whose catalog permission is sensitive behind a function that is not, naming the key,services-platform:modules/security/tests/integration/services/service-principals/registered-principals.integration.spec.js#is refused 403

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.