Skip to content

ATS-PFM-SEC-017Control staff access to customer workspaces: Capability Test Specification

Markdown

ATS-PFM-SEC-017

Control staff access to customer workspaces: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleSecurity, Customers and WorkspacesRevision3ExaminercodexExamined on2026-10-23

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

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

Test Scenarios

21 scenarios proving CAP-PFM-SEC-017; 13 bound to an existing test.

01 Require the grant behind cross-customer assignmentsinvariantapinegativetest
Proves
BR-CAP-PFM-SEC-017-01 INV-DOM-PFM-SEC-003-17
Preconditions
Prepare a staff member, a non-staff member and active and revoked staff grants.
Steps
Insert cross-customer assignments with no grant, with an active grant, with a revoked grant and for the non-staff member.
Expected
The database permits only the staff assignment named by an active grant.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/staff-access/open-emergency-access.integration.spec.js#refuses a staff member’s tenant-scoped assignment into another customer that no grant names
services-platform:modules/security/tests/integration/services/staff-access/open-emergency-access.integration.spec.js#refuses the assignment of somebody who is not Rhythm staff into another customer, though an active grant names it
services-platform:modules/security/tests/e2e/approved-access.e2e.spec.js#refuses every console route to Rhythm’s own staff, whatever they hold at platform scope (rule S1)
Source
services-platform:modules/security/tests/integration/services/staff-access/open-emergency-access.integration.spec.js#refuses a staff member’s tenant-scoped assignment into another customer that no grant names
02 Create a request without accesstransitionapinegativetest
Proves
BR-CAP-PFM-SEC-017-02
Preconditions
Prepare a staff requester and workspace administrators.
Steps
Request thirty-one days, submit a valid request, repeat it and request while already holding access.
Expected
Reject excessive duration and duplicates; store the valid request without an assignment and notify administrators.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/e2e/approved-access.e2e.spec.js#refuses a request for more days than the maximum, 400
Source
services-platform:modules/security/tests/e2e/approved-access.e2e.spec.js#refuses a request for more days than the maximum, 400
03 Reserve access decisions for authorized administratorspermissionapinegativetest
Proves
BR-CAP-PFM-SEC-017-03
Preconditions
Prepare Power User, Read Only and Administrator callers.
Steps
List and decide a waiting request with each caller.
Expected
Reject callers lacking the staff-access key without deciding the request; serve the Administrator.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/e2e/power-user-staff-access.e2e.spec.js#refuses the Power User every staff-access route, 403, for the missing key
services-platform:modules/security/tests/e2e/power-user-staff-access.e2e.spec.js#leaves the request waiting after the Power User’s refused decisions
services-platform:modules/security/tests/e2e/built-in-administrator-staff-access.e2e.spec.js#refuses the built-in Read Only the list, 403, for the missing key
Source
services-platform:modules/security/tests/e2e/power-user-staff-access.e2e.spec.js#refuses the Power User every staff-access route, 403, for the missing key
04 Cap approval at the requested durationboundaryapitest
Proves
BR-CAP-PFM-SEC-017-04 INV-DOM-PFM-SEC-003-18
Preconditions
Prepare requests for two days.
Steps
Approve one for thirty days, decline another with a reason and withdraw a third as requester.
Expected
Grant only two days, retain the decline reason and withdrawal actor, and notify the requester.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/staff-access/approved-tenant-access.integration.spec.js#refuses a duration outside the one-to-thirty-day range before it decides anything
services-platform:modules/security/tests/integration/services/staff-access/approved-tenant-access.integration.spec.js#stores a declined request with the reason the administrator gave and no assignment
services-platform:modules/security/tests/integration/services/staff-access/approved-tenant-access.integration.spec.js#records a withdrawal as the requester’s own decision, so it is not read as the customer refusing
Source
services-platform:modules/security/tests/integration/services/staff-access/approved-tenant-access.integration.spec.js#gives the two days that were asked for, not the thirty the approver named
05 Grant access to an identified staff membertransitionapitest
Proves
BR-CAP-PFM-SEC-017-05
Preconditions
Prepare an authorized customer administrator, staff address and unknown address.
Steps
Grant workspace access to each address.
Expected
Activate and list the staff grant and send notices; reject the unknown address without a grant write.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/staff-access/approved-tenant-access.integration.spec.js#writes an approved grant that is active and decided at once, by the administrator who gave it
Source
services-platform:modules/security/tests/integration/services/staff-access/approved-tenant-access.integration.spec.js#writes an approved grant that is active and decided at once, by the administrator who gave it
06 Revoke access without restoring standing grantstransitionapinegativetest
Proves
BR-CAP-PFM-SEC-017-06 INV-DOM-PFM-SEC-003-19
Preconditions
Prepare approved, emergency and standing grants.
Steps
Revoke each, then reconcile standing access.
Expected
Revoke each assignment and preserve the standing grant’s revoked state. Fresh evaluation loses the access.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/e2e/approved-access.e2e.spec.js#takes the access away again when the administrator revokes it
Source
services-platform:modules/security/tests/integration/services/staff-access/approved-tenant-access.integration.spec.js#revokes the assignment the grant materialized, so the access is gone at once
07 Validate emergency authority and request detailsvalidationapinegativetest
Proves
BR-CAP-PFM-SEC-017-07 INV-DOM-PFM-SEC-003-18
Preconditions
Prepare staff roles and a customer Administrator.
Steps
Try short reasons, missing tickets, invalid durations and staff-role choices; then open a valid request with Rhythm Administrator authority.
Expected
Reject invalid and unauthorized requests; activate valid emergency access and send its notices.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/staff-access/open-emergency-access.integration.spec.js#refuses a Software Engineer, whose HQ reader keys and custom query table keys do not carry hq.emergency-access.use
services-platform:modules/security/tests/integration/services/staff-access/open-emergency-access.integration.spec.js#e-mails the staff security list beside the tenant’s administrators, in the staff’s words
Source
services-platform:modules/security/tests/integration/services/staff-access/open-emergency-access.integration.spec.js#refuses a reason shorter than twenty characters
08 Maintain role-derived standing grantstransitionapinegativetest
Proves
BR-CAP-PFM-SEC-017-08 INV-DOM-PFM-SEC-001-07 INV-DOM-PFM-SEC-003-19
Preconditions
Prepare administrators, Support and multiple customers.
Steps
Add and remove the administrator role, suspend a holder, create a customer through the tested service and request emergency access where standing access exists.
Expected
Create the expected grants outside Rhythm’s customer, revoke them on lifecycle changes and submit flush requests. Reject redundant emergency access. The binding does not establish HQ customer-create reconciliation.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/staff-access/rhythm-administrator-standing-access.integration.spec.js#gives each Rhythm Administrator one active customer-level standing grant in every customer but Rhythm’s own
services-platform:modules/security/tests/integration/services/staff-access/rhythm-administrator-standing-access.integration.spec.js#ends every customer-level standing grant: revoked, by the system, for the role’s removal
services-platform:modules/security/tests/integration/services/staff-access/rhythm-administrator-standing-access.integration.spec.js#gives every Rhythm Administrator its grant, the integration database’s own among them
services-platform:modules/security/tests/integration/services/staff-access/approved-tenant-access.integration.spec.js#refuses a request into a tenant of that customer 409 staff_access_grant_active, naming the customer-level grant
Source
services-platform:modules/security/tests/integration/services/staff-access/rhythm-administrator-standing-access.integration.spec.js#gives each Rhythm Administrator one active customer-level standing grant in every customer but Rhythm’s own
09 End only permitted grants from HQpermissionapinegativetest
Proves
BR-CAP-PFM-SEC-017-09
Preconditions
Prepare the caller’s emergency and standing grants and another member’s grant.
Steps
Attempt to end each.
Expected
End the caller’s emergency grant and submit a flush request; preserve standing access and hide the other member’s grant as 404.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/staff-access/open-emergency-access.integration.spec.js#submits an authorizer-cache flush naming the grant, so a cached answer does not outlive the access
services-platform:modules/security/tests/e2e/staff-access.e2e.spec.js#answers another staff member ending the grant 404
services-platform:modules/security/tests/e2e/hq-staff-detail.e2e.spec.js#refuses ending another member’s standing grant 409 staff_access_grant_standing, naming the grant
Source
services-platform:modules/security/tests/integration/services/staff-access/open-emergency-access.integration.spec.js#revokes the assignment, so the access ends with it
10 Deny and record expired accessboundaryapinegativetest
Proves
BR-CAP-PFM-SEC-017-10
Preconditions
Prepare an emergency grant past its validity limit.
Steps
Evaluate it, list grants and try to end it.
Expected
Evaluation denies access, the read stores expiry, and a further end request is rejected.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/staff-access/open-emergency-access.integration.spec.js#gives no access: the evaluator refuses the role’s keys in that tenant over the assignment
Source
services-platform:modules/security/tests/integration/services/staff-access/open-emergency-access.integration.spec.js#gives no access: the evaluator refuses the role’s keys in that tenant over the assignment
11 Isolate customer history and monthly reportinginvariantapinegativetest
Proves
BR-CAP-PFM-SEC-017-11
Preconditions
Prepare emergency grants across customers and adjacent months.
Steps
Read customer histories and the report for one month.
Expected
Histories contain only their own customer’s events; the report includes grants opened in the selected month with the referenced names.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/staff-access/approved-tenant-access.integration.spec.js#leaves out the one opened in the next month, which that month’s report holds instead
services-platform:modules/security/tests/e2e/approved-access.e2e.spec.js#answers the monthly emergency report to staff, for the month asked
Source
services-platform:modules/security/tests/integration/services/staff-access/open-emergency-access.integration.spec.js#shows the grant on the trail of the customer whose tenant it reaches
12 Apply customer security safeguards to staffpermissionapinegativetest
Proves
BR-CAP-PFM-SEC-017-14
Preconditions
Give staff a customer-level grant into a customer with one administrator.
Steps
Attempt to withdraw that administrator’s assignment or security policy, then operate in an ungranted customer.
Expected
Reject administrator lockout and refuse the ungranted customer operation.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/staff-access/staff-customer-administration.integration.spec.js#refuses staff taking the Security Administrator policy off the role that makes them administrator, as a lockout
Source
services-platform:modules/security/tests/integration/services/staff-access/staff-customer-administration.integration.spec.js#refuses staff withdrawing that administrator’s grant, as a lockout
13 Follow approved access through revocationinteractionbrowsertest
Proves
AS-JNY-PFM-SEC-005-01 AS-JNY-PFM-SEC-005-02 AS-JNY-PFM-SEC-005-03
Preconditions
Prepare a staff requester and customer security administrator.
Steps
Request access, approve, enter the workspace and revoke.
Expected
Fresh evaluation has no access before approval, permits it afterward and loses it after revocation; the mock console binding supplies banner evidence.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/e2e/approved-access.e2e.spec.js#grants the staff member nothing while the request is waiting
services-platform:modules/security/tests/e2e/approved-access.e2e.spec.js#is what lets the staff member into the tenant, and only then
services-platform:modules/security/tests/e2e/approved-access.e2e.spec.js#takes the access away again when the administrator revokes it
react-console:e2e/mock/hq-lists.mock.spec.ts#without a grant asks for emergency access, validates it, then switches in with only the tenant's navigation
Source
services-platform:modules/security/tests/e2e/approved-access.e2e.spec.js#grants the staff member nothing while the request is waiting
14 Staff access grant: requested to activetransitionapiproposed
Proves
BR-CAP-PFM-SEC-017-04
Preconditions
Prepare a run-owned staff access grant in requested state with the authority and inputs required by the cited transition.
Steps
[ { "do": "Approve the request within its requested duration and inspect the matching assignment.", "expect": "After the stated action, observe the staff access grant in active state. This case does not require an additional history event unless the transition explicitly defines one.", "provenance": "proposed", "source": [ "services-platform:modules/security/services/staff-access/decide-tenant-access.ts", "services-platform at ad3f6a65: modules/security/db/staff-access-grants.table.ts; services/staff-access/*; docs/hq/rhythm-hq-plan.md §D2." ] } ]
Expected
After the stated action, observe the staff access grant in active state. This case does not require an additional history event unless the transition explicitly defines one.
Data
A disposable customer, workspace and named actor; a controllable clock where the transition depends on time.
Source
services-platform:modules/security/services/staff-access/decide-tenant-access.ts,services-platform at ad3f6a65: modules/security/db/staff-access-grants.table.ts; services/staff-access/*; docs/hq/rhythm-hq-plan.md §D2.
15 Staff access grant: requested to declinedtransitionapiproposed
Proves
BR-CAP-PFM-SEC-017-04
Preconditions
Prepare a run-owned staff access grant in requested state with the authority and inputs required by the cited transition.
Steps
[ { "do": "Decline one request as a customer administrator and withdraw another as its staff requester.", "expect": "After the stated action, observe the staff access grant in declined state. This case does not require an additional history event unless the transition explicitly defines one.", "provenance": "proposed", "source": [ "services-platform:modules/security/services/staff-access/request-tenant-access.ts:withdrawAccessRequest", "services-platform at ad3f6a65: modules/security/db/staff-access-grants.table.ts; services/staff-access/*; docs/hq/rhythm-hq-plan.md §D2." ] } ]
Expected
After the stated action, observe the staff access grant in declined state. This case does not require an additional history event unless the transition explicitly defines one.
Data
A disposable customer, workspace and named actor; a controllable clock where the transition depends on time.
Source
services-platform:modules/security/services/staff-access/request-tenant-access.ts:withdrawAccessRequest,services-platform at ad3f6a65: modules/security/db/staff-access-grants.table.ts; services/staff-access/*; docs/hq/rhythm-hq-plan.md §D2.
16 Staff access grant: active to expiredtransitionapiproposed
Proves
BR-CAP-PFM-SEC-017-10
Preconditions
Prepare a run-owned staff access grant in active state with the authority and inputs required by the cited transition.
Steps
[ { "do": "Advance to expiry and inspect both fresh access and the lazily settled grant.", "expect": "After the stated action, observe the staff access grant in expired state. This case does not require an additional history event unless the transition explicitly defines one.", "provenance": "proposed", "source": [ "services-platform:modules/security/services/persistence/staff-access-grants.ts:settleExpiredStaffAccessGrants", "services-platform at ad3f6a65: modules/security/db/staff-access-grants.table.ts; services/staff-access/*; docs/hq/rhythm-hq-plan.md §D2." ] } ]
Expected
After the stated action, observe the staff access grant in expired state. This case does not require an additional history event unless the transition explicitly defines one.
Data
A disposable customer, workspace and named actor; a controllable clock where the transition depends on time.
Source
services-platform:modules/security/services/persistence/staff-access-grants.ts:settleExpiredStaffAccessGrants,services-platform at ad3f6a65: modules/security/db/staff-access-grants.table.ts; services/staff-access/*; docs/hq/rhythm-hq-plan.md §D2.
17 Staff access grant: active to revokedtransitionapiproposed
Proves
BR-CAP-PFM-SEC-017-06
Preconditions
Prepare a run-owned staff access grant in active state with the authority and inputs required by the cited transition.
Steps
[ { "do": "Revoke the active grant and inspect its assignment, history and flush submission.", "expect": "After the stated action, observe the staff access grant in revoked state. This case does not require an additional history event unless the transition explicitly defines one.", "provenance": "proposed", "source": [ "services-platform:modules/security/services/staff-access/end-access-grant.ts", "services-platform at ad3f6a65: modules/security/db/staff-access-grants.table.ts; services/staff-access/*; docs/hq/rhythm-hq-plan.md §D2." ] } ]
Expected
After the stated action, observe the staff access grant in revoked state. This case does not require an additional history event unless the transition explicitly defines one.
Data
A disposable customer, workspace and named actor; a controllable clock where the transition depends on time.
Source
services-platform:modules/security/services/staff-access/end-access-grant.ts,services-platform at ad3f6a65: modules/security/db/staff-access-grants.table.ts; services/staff-access/*; docs/hq/rhythm-hq-plan.md §D2.
18 Control staff access to customer workspaces with understand available workspace accessinteractionapinegativeproposed
Proves
BR-CAP-PFM-SEC-007-04 BR-CAP-PFM-SEC-017-06
Preconditions
A staff member has approved entry to one customer workspace.
Steps
Read HQ and workspace contexts, revoke the entry, and read again after cached authority expires.
Expected
HQ authority remains separate; the customer workspace is unavailable after revocation.
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#expands the wildcard to every concrete key of the catalog in Rhythm HQ, the staff-only one included,services-platform:modules/security/tests/integration/services/staff-access/approved-tenant-access.integration.spec.js#leaves that standing grant revoked when standing access is ensured again
19 Control staff access to customer workspaces with assign roles within a controlled scopeinteractionapinegativeproposed
Proves
BR-CAP-PFM-SEC-010-02 BR-CAP-PFM-SEC-017-14
Preconditions
A staff member has customer-level standing access but lacks a permission being delegated.
Steps
Attempt to grant that permission through customer security administration.
Expected
Standing entry does not bypass widening checks; the unavailable delegation is refused without an assignment.
Data
An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
Source
services-platform:modules/security/tests/unit/services/invitations/widening.spec.ts#refuses a scope the caller does not manage, and says which scope rather than which role,services-platform:modules/security/tests/integration/services/staff-access/staff-customer-administration.integration.spec.js#refuses staff withdrawing that administrator’s grant, as a lockout
20 Control staff access to customer workspaces with administer rhythm staff membershipsinteractionapiproposed
Proves
BR-CAP-PFM-SEC-016-05 BR-CAP-PFM-SEC-017-08
Preconditions
A Rhythm Administrator has standing access to a customer.
Steps
Suspend the staff membership and inspect customer entry and its standing assignments; reinstate through authorized staff administration.
Expected
Suspension ends usable customer entry; fresh access follows the retained or reconciled assignment state rather than staff status alone.
Data
An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
Source
services-platform:modules/security/aws/api/hq-staff.routes.ts:hqStaffRoutes,services-platform:modules/security/tests/integration/services/staff-access/rhythm-administrator-standing-access.integration.spec.js#gives each Rhythm Administrator one active customer-level standing grant in every customer but Rhythm’s own
21 Control staff access to customer workspaces with establish and administer a customerinteractionapiproposed
Proves
BR-CAP-PFM-SEC-001-12 BR-CAP-PFM-SEC-017-08
Preconditions
A customer without workspaces has a standing staff grant.
Steps
Delete the customer and inspect retained staff-access records.
Expected
The customer and its standing grant are removed together; no usable assignment reaches the removed customer.
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/staff-access/rhythm-administrator-standing-access.integration.spec.js#deletes the customer,services-platform:modules/security/tests/integration/services/staff-access/rhythm-administrator-standing-access.integration.spec.js#gives each Rhythm Administrator one active customer-level standing grant in every customer but Rhythm’s own

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.