Skip to content

ATS-PFM-SEC-014Derive member access from appointments and eligibility: Capability Test Specification

Markdown

ATS-PFM-SEC-014

Derive member access from appointments and eligibility: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleSecurity, Customers and WorkspacesRevision2

Read atservices-platform ad3f6a65

Coverage

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

Test Scenarios

13 scenarios proving CAP-PFM-SEC-014; 10 bound to an existing test.

01 Check derived access uses the contact claiminvariantapinegativetest
Proves
BR-CAP-PFM-SEC-014-01 INV-DOM-PFM-SEC-003-06
Preconditions
Prepare a derived contact assignment and a linked portal member.
Steps
Evaluate the member, remove the link and evaluate a fresh member context.
Expected
The linked claim receives scoped access; the newly unlinked claim does not. The test does not establish immediate replacement of a cached contact claim.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/e2e/derived-assignments.e2e.spec.js#is allowed by the authorizer inside its validity, for the tenant of the grant
services-platform:modules/security/tests/e2e/derived-assignments.e2e.spec.js#is refused once the member is no longer linked to the contact, so the link is what carries the grant
services-platform:modules/security/tests/e2e/derived-assignments.e2e.spec.js#refuses another unit, which the grant does not name
Source
services-platform:modules/security/tests/e2e/derived-assignments.e2e.spec.js#is allowed by the authorizer inside its validity, for the tenant of the grant
02 Check desired-set validation is atomicvalidationapinegativetest
Proves
BR-CAP-PFM-SEC-014-02 INV-DOM-PFM-SEC-003-07
Preconditions
Prepare a desired set containing one invalid entry.
Steps
Try unsupported source, customer/platform scope, another workspace, archived role and foreign-customer role.
Expected
Each request fails without inserting any desired entry.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/persistence/assignments.derived.integration.spec.js#refuses a whole desired set when one entry is refused, inserting none of the others
Source
services-platform:modules/security/tests/integration/services/persistence/assignments.derived.integration.spec.js#refuses a source that is not on its allow-list
03 Check exact and repeatable synchronizationtransitionapinegativetest
Proves
BR-CAP-PFM-SEC-014-03 INV-DOM-PFM-SEC-003-09
Preconditions
Prepare an existing derived grant.
Steps
Synchronize the same set, extend its validity and synchronize an empty set.
Expected
Identical synchronization changes nothing; extension retains identity and records widening, while removal records revocation.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/persistence/assignments.derived.integration.spec.js#changes nothing and writes nothing when called again with the same desired set
services-platform:modules/security/tests/integration/services/persistence/assignments.derived.integration.spec.js#revokes every row of the key when the desired set is empty, and answers each
Source
services-platform:modules/security/tests/integration/services/persistence/assignments.derived.integration.spec.js#changes nothing and writes nothing when called again with the same desired set
04 Check manual administration cannot alter derivationpermissionapinegativetest
Proves
BR-CAP-PFM-SEC-014-04 INV-DOM-PFM-SEC-003-10
Preconditions
Prepare a derived assignment.
Steps
Attempt ordinary amendment and revocation.
Expected
Both return 409 with source guidance and leave the assignment intact.
Data
Use the records described in the setup.
Bound to
Source
services-platform:modules/security/tests/integration/services/persistence/assignments.derived.integration.spec.js#refuses an amendment 409 derived_assignment, naming where to change it
05 Check expiry against an earlier signed contextboundaryapinegativetest
Proves
BR-CAP-PFM-SEC-014-05
Preconditions
Prepare a derived assignment reaching its end time.
Steps
Call the dispatcher after expiry with a still-valid context signed before it.
Expected
Request-time evaluation refuses the expired assignment.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/e2e/derived-assignments.e2e.spec.js#refuses the same still-unexpired context once valid_until has passed, because validity is read per request
services-platform:modules/security/tests/e2e/derived-assignments.e2e.spec.js#is refused by the authorizer itself after valid_until, for want of a grant in force
Source
services-platform:modules/security/tests/e2e/derived-assignments.e2e.spec.js#refuses the same still-unexpired context once valid_until has passed, because validity is read per request
06 Check eligibility role-binding restrictionsruleapinegativetest
Proves
BR-CAP-PFM-SEC-014-07
Preconditions
Prepare custom/built-in roles and bindings of different kinds.
Steps
Bind them, try four-minute, five-minute and thirty-one-day intervals and reuse a binding.
Expected
The valid custom binding succeeds; built-ins, wrong kinds, out-of-range intervals and duplicate bindings fail.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/e2e/role-eligibility.e2e.spec.js#refuses a built-in role as a conflict, because no tenant’s rule may assign Rhythm’s role
services-platform:modules/security/tests/e2e/role-eligibility.e2e.spec.js#refuses a binding of another consumer kind as a conflict, naming the kind
Source
services-platform:modules/security/tests/e2e/role-eligibility.e2e.spec.js#refuses a built-in role as a conflict, because no tenant’s rule may assign Rhythm’s role
07 Check eligibility outcomes preserve manual workinteractionapinegativetest
Proves
BR-CAP-PFM-SEC-014-08
Preconditions
Prepare eligible, ineligible and indeterminate contacts, a manual assignment and an organization.
Steps
Reconcile repeatedly under each outcome.
Expected
Derived grants are created, confirmed or revoked as appropriate; indeterminate and manual rows remain intact and organizations receive no derived grants.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/derived-assignments/reconcile.integration.spec.js#creates one active, tenant-scoped, contact-keyed row of the role through the function, keyed by binding and contact
services-platform:modules/security/tests/integration/services/derived-assignments/reconcile.integration.spec.js#revokes it through the function when the subject is no longer eligible, keeping the row as history
services-platform:modules/security/tests/integration/services/derived-assignments/reconcile.integration.spec.js#never touches the manual assignment: no derivation, no window, its first version
services-platform:modules/security/tests/integration/services/derived-assignments/reconcile.integration.spec.js#evaluates nothing and creates nothing, because eligibility derives roles for contacts only
Source
services-platform:modules/security/tests/integration/services/derived-assignments/reconcile.integration.spec.js#creates one active, tenant-scoped, contact-keyed row of the role through the function, keyed by binding and contact
08 Check reconciliation before portal password tokensinteractionapinegativetest
Proves
BR-CAP-PFM-SEC-014-09
Preconditions
Prepare a linked eligible portal member and a failing evaluator.
Steps
Sign in successfully under each evaluator outcome.
Expected
Successful evaluation produces its assignment before tokens return; evaluator failure still returns tokens without invented grants.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/derived-assignments/sign-in-reconcile.integration.spec.js#has created the derived assignment of the rule-bound role by the time it answers
Source
services-platform:modules/security/tests/integration/services/derived-assignments/sign-in-reconcile.integration.spec.js#has created the derived assignment of the rule-bound role by the time it answers
09 Check bounded queued reconciliation and redeliveryconcurrencyapinegativetest
Proves
BR-CAP-PFM-SEC-014-11
Preconditions
Prepare an authorized staff caller.
Steps
Request 101 contacts, queue the same contact twice and redeliver its work.
Expected
The excessive request fails, one waiting item is retained and redelivery creates no duplicate assignment.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/dispatch/derived-assignment-reconciles.integration.spec.js#queues one row and answers its work id, and a second request for the waiting subject answers the same id
Source
services-platform:modules/security/tests/integration/services/dispatch/derived-assignment-reconciles.integration.spec.js#refuses more than 100 subjects
10 Check eligibility binding ownership and kindvalidationapinegativetest
Proves
BR-CAP-PFM-SEC-014-12
Preconditions
Prepare bindings from two customers and multiple consumer kinds.
Steps
Save policy conditions using the customer’s assignment-condition binding, a foreign binding and a wrong-kind binding.
Expected
Only the valid owned reference is stored; other references are refused.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/definitions/eligibility-conditions.integration.spec.js#stores a rule naming a security.assignment_condition binding of one of the customer’s tenants
services-platform:modules/security/tests/integration/services/definitions/eligibility-conditions.integration.spec.js#refuses a binding of another customer’s tenant, naming it, and stores no policy
services-platform:modules/security/tests/e2e/eligibility-conditions.e2e.spec.js#refuses the customer’s administrator a binding of another kind as eligibility_binding_unknown, naming it
Source
services-platform:modules/security/tests/integration/services/definitions/eligibility-conditions.integration.spec.js#stores a rule naming a security.assignment_condition binding of one of the customer’s tenants
11 Derive member access from appointments and eligibility with assign roles within a controlled scopeinteractionapinegativeproposed
Proves
BR-CAP-PFM-SEC-010-08 BR-CAP-PFM-SEC-014-04
Preconditions
One member has a manual grant and a linked contact has source-owned access.
Steps
Change the manual role scope, try editing the derived assignment, then synchronize its source.
Expected
Manual scope changes preserve the derived row; direct derived editing is refused and source synchronization alone changes it.
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/set-role-scope.integration.spec.js#turns the customer grant into one active grant per tenant asked for, revoking the customer grant,services-platform:modules/security/tests/integration/services/persistence/assignments.derived.integration.spec.js#refuses an amendment 409 derived_assignment, naming where to change it
12 Derive member access from appointments and eligibility with register and authenticate portal membersinteractionapinegativeproposed
Proves
BR-CAP-PFM-SEC-014-09 BR-CAP-PFM-SEC-019-05
Preconditions
A confirmed portal member links to a contact with an eligibility-derived role.
Steps
Sign in by password, change eligibility, and sign in again; repeat with an evaluator failure.
Expected
Reconciliation updates derived access before tokens return; evaluator failure is logged without blocking valid sign-in.
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/derived-assignments/sign-in-reconcile.integration.spec.js#signs a member in even when the evaluator fails, which it was asked,services-platform:modules/security/tests/integration/services/provisioning/post-confirmation.integration.spec.js#grants the Portal Member role, active, at the tenant’s scope
13 Derive member access from appointments and eligibility with match portal memberships to crm contactsinteractionapiproposed
Proves
BR-CAP-PFM-SEC-014-01 BR-CAP-PFM-SEC-020-08
Preconditions
An unlinked portal member has a contact carrying derived authority.
Steps
Complete contact possession proof and request a fresh authorization context.
Expected
The linked contact claim enables its applicable derived assignments; a console context carries no contact claim.
Data
An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
Source
services-platform:modules/security/tests/e2e/derived-assignments.e2e.spec.js#is refused once the member is no longer linked to the contact, so the link is what carries the grant,services-platform:docs/security/portal-contact-claim.md#When a change is seen

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.