Skip to content

ATS-PFM-SEC-013Publish shared access definitions from releases: Capability Test Specification

Markdown

ATS-PFM-SEC-013

Publish shared access definitions from releases: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleSecurity, Customers and WorkspacesRevision2

Read atservices-platform ad3f6a65

Coverage

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

Test Scenarios

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

01 Check reconciliation ownership and repeatabilityinvariantapitest
Proves
BR-CAP-PFM-SEC-013-01
Preconditions
Prepare Platform and CRM release declarations.
Steps
Reconcile CRM and then repeat an unchanged Platform release.
Expected
CRM does not change Platform-owned definitions, and the repeat causes no version increases.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#leaves another service's keys and built-ins alone: CRM going live does not undo Platform
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#run again with the same catalog changes nothing, which is what a redeploy is
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#changes nothing when the catalog is the one already stored, and bumps no version
Source
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#leaves another service's keys and built-ins alone: CRM going live does not undo Platform
02 Check policy tier membershipruleunittest
Proves
BR-CAP-PFM-SEC-013-02
Preconditions
Prepare eligible keys from each tier.
Steps
Generate the application policies.
Expected
Read Only has read keys, User includes read/user keys and Administrator includes all eligible tiers as exact allows.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#gives the read-only policy the app’s read keys and nothing above them
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#writes each tier policy as one allow of exact keys, and no deny
Source
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#gives the read-only policy the app’s read keys and nothing above them
03 Check excluded powers in generated policiesboundaryunitnegativetest
Proves
BR-CAP-PFM-SEC-013-03
Preconditions
Use the Platform catalog.
Steps
Generate its tier policies.
Expected
Generated policies omit staff-only, self-read, security-administration, staff-access and export permissions.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#keeps a staff-only key out of its app’s administrator policy
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#keeps the self-access key out of every tier, because the grant resolver answers it from the user’s own row
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#keeps a security power out of the Platform administrator policy, so a Power User cannot grant themselves more
Source
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#keeps a staff-only key out of its app’s administrator policy
04 Check declared built-in validation before storagevalidationapinegativetest
Proves
BR-CAP-PFM-SEC-013-04
Preconditions
Prepare foreign-application, unknown-key, allow-pattern and reserved-name declarations.
Steps
Attempt reconciliation with each invalid declaration.
Expected
Each fails and writes no built-in definition.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/catalog/release-manifest-built-ins.integration.spec.js#refuses it, naming the policy and the app this service defines no permission for
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#refuses a declaration that allows a key the release does not define, writing nothing
services-platform:modules/security/tests/unit/services/catalog/catalog-plan.spec.ts#refuses a declaration taking a key the tier generator owns
Source
services-platform:modules/security/tests/integration/services/catalog/release-manifest-built-ins.integration.spec.js#refuses it, naming the policy and the app this service defines no permission for
05 Check shared built-in creation and updatestransitionapinegativetest
Proves
BR-CAP-PFM-SEC-013-05 INV-DOM-PFM-SEC-003-16
Preconditions
Prepare two customer views of the catalog.
Steps
Publish a declared built-in and update its rules.
Expected
It initially has no role holder; both customer views refer to the same updated definition.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#is one row two customers share, and a rule change reaches both without copying anything
Source
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#grants a newly shipped built-in to nobody: no role references it
06 Check built-in rename, withdrawal and restorationtransitionapinegativetest
Proves
BR-CAP-PFM-SEC-013-06
Preconditions
Prepare a referenced built-in.
Steps
Rename through former keys, withdraw it from a release and publish it again.
Expected
Identity and references survive rename, withdrawal archives authority with recorded holders, and restoration reuses the original row.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#renames a key through formerKeys, keeping the row and every reference to it
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#archives a built-in the release no longer declares and audits the roles still holding it
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#makes a retired built-in grant nothing while its holder keeps every other grant
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#brings a built-in back on its own row when a later release ships it again
Source
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#renames a key through formerKeys, keeping the row and every reference to it
07 Check the shipped role compositionruleunittest
Proves
BR-CAP-PFM-SEC-013-07
Preconditions
Use Platform’s reconciled catalog.
Steps
Build its standard roles.
Expected
Eight roles are produced; the customer Administrator carries the security-administrator and data-exporter policies and Power User does not.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#publishes the eight roles the catalog ships, in the order it ships them
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#gives Power User the administrator policies without the security administrator
services-platform:modules/security/tests/unit/services/catalog/export-authority.spec.ts#attaches it to no other built-in role, Power User included
Source
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#publishes the eight roles the catalog ships, in the order it ships them
08 Check built-in patterns and emergency authoritypermissionunitnegativetest
Proves
BR-CAP-PFM-SEC-013-09
Preconditions
Prepare the built-in role declarations.
Steps
Match their patterns against the relevant customer custom-record keys.
Expected
No tested pattern reaches those custom records, and emergency authority is confined to Rhythm Administrator.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#gives no built-in role a pattern that reaches a customer’s own records, the staff roles included
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#gives hq.emergency-access.use to Rhythm Administrator alone: Support Representative and Software Engineer are refused it
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#gives every customer-scope role the customer’s own scope, so none of them reaches the platform
Source
services-platform:modules/security/tests/unit/services/catalog/reconcile-catalog.spec.ts#gives no built-in role a pattern that reaches a customer’s own records, the staff roles included
09 Check the database reconciliation boundaryinvariantapinegativetest
Proves
BR-CAP-PFM-SEC-013-10 INV-DOM-PFM-SEC-003-13
Preconditions
Prepare built-in role, policy, rule and attachment rows.
Steps
Attempt mutations outside and within reconciliation.
Expected
Built-in mutations fail outside reconciliation and succeed through it; custom rows retain their separate behavior.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/integration/db/security-definition-integrity.integration.spec.js#refuses an insert, an update and a delete of a built-in role outside a reconciliation
services-platform:modules/security/tests/integration/db/security-definition-integrity.integration.spec.js#refuses a rule of a built-in outside a reconciliation, and allows the same rule inside one
services-platform:modules/security/tests/integration/db/security-definition-integrity.integration.spec.js#refuses an attachment on a built-in role outside a reconciliation: what a built-in is made of is Rhythm's
services-platform:modules/security/tests/integration/db/security-definition-integrity.integration.spec.js#leaves a customer's own policy alone: the window is about Rhythm's rows, not about the table
Source
services-platform:modules/security/tests/integration/db/security-definition-integrity.integration.spec.js#refuses an insert, an update and a delete of a built-in role outside a reconciliation
10 Check malformed and altered published releasesvalidationunitnegativetest
Proves
BR-CAP-PFM-SEC-013-11
Preconditions
Prepare duplicate keys, malformed keys and an altered checksum for an existing release.
Steps
Run release validation.
Expected
Problems are reported together, no invalid writes occur and changed republication is refused.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/services/catalog/catalog-plan.spec.ts#refuses a key defined twice, naming the key so the release is fixed rather than hunted for
services-platform:modules/security/tests/unit/services/catalog/catalog-plan.spec.ts#refuses a key that is not <app>.<resource>.<action>, before a row carries it
services-platform:modules/security/tests/unit/authorizer/registry-publish.spec.ts#refuses a release already published with another checksum: a release is immutable
services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#refuses a release with no identifier, a key defined twice and a malformed key, writing nothing
Source
services-platform:modules/security/tests/unit/services/catalog/catalog-plan.spec.ts#refuses a key defined twice, naming the key so the release is fixed rather than hunted for
11 Check shared permission-pattern resultsinteractionunittest
Proves
BR-CAP-PFM-SEC-013-12
Preconditions
Prepare the permission and pattern corpus.
Steps
Compare the four matcher entry points.
Expected
All entry points agree, including supported short patterns spanning remaining segments.
Data
Use the records described in the setup.
Bound to
services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#gives the same answer from all four functions for every pattern and key of the corpus
services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#matches hq.roles.manage from the pattern hq.*, the rule the grant slice used to drop
Source
services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#gives the same answer from all four functions for every pattern and key of the corpus
12 Custom and built-in access definition: active to archivedtransitionapiproposed
Proves
BR-CAP-PFM-SEC-013-06
Preconditions
Use an isolated custom and built-in access definition in active state, with the required authority and guard fixtures.
Steps
[ { "do": "Publish a release omitting the built-in and inspect holders and impact history.", "expect": "Read the resulting custom and built-in access definition as archived; inspect the associated records and recorded history for this transition.", "provenance": "proposed", "source": [ "services-platform:modules/security/services/catalog/reconcile-catalog.ts:reconcileCatalog", "services-platform at ad3f6a65: modules/security/db/security-roles.table.ts, security-policies.table.ts; services/definitions/manage-roles.ts, manage-policies.ts, impact.ts; services/catalog/*." ] } ]
Expected
Read the resulting custom and built-in access definition as archived; inspect the associated records and recorded history for this transition.
Data
A disposable customer, workspace and named actor; a controllable clock where the transition depends on time.
Source
services-platform:modules/security/services/catalog/reconcile-catalog.ts:reconcileCatalog,services-platform at ad3f6a65: modules/security/db/security-roles.table.ts, security-policies.table.ts; services/definitions/manage-roles.ts, manage-policies.ts, impact.ts; services/catalog/*.
13 Custom and built-in access definition: archived to activetransitionapiproposed
Proves
BR-CAP-PFM-SEC-013-06
Preconditions
Use an isolated custom and built-in access definition in archived state, with the required authority and guard fixtures.
Steps
[ { "do": "Publish a later release that declares the archived built-in again.", "expect": "Read the resulting custom and built-in access definition as active; inspect the associated records and recorded history for this transition.", "provenance": "proposed", "source": [ "services-platform:modules/security/services/catalog/catalog-plan.ts:planBuiltInPolicy", "services-platform at ad3f6a65: modules/security/db/security-roles.table.ts, security-policies.table.ts; services/definitions/manage-roles.ts, manage-policies.ts, impact.ts; services/catalog/*." ] } ]
Expected
Read the resulting custom and built-in access definition as active; inspect the associated records and recorded history for this transition.
Data
A disposable customer, workspace and named actor; a controllable clock where the transition depends on time.
Source
services-platform:modules/security/services/catalog/catalog-plan.ts:planBuiltInPolicy,services-platform at ad3f6a65: modules/security/db/security-roles.table.ts, security-policies.table.ts; services/definitions/manage-roles.ts, manage-policies.ts, impact.ts; services/catalog/*.
14 Publish shared access definitions from releases with model customer responsibilities with roles and policiesinteractionapiproposed
Proves
BR-CAP-PFM-SEC-012-02 BR-CAP-PFM-SEC-013-06
Preconditions
A built-in role and a customer-owned copy are both referenced.
Steps
Withdraw and republish the built-in in release reconciliation, then read both definitions.
Expected
The built-in restores its identity; the customer copy remains a separately editable definition.
Data
An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
Source
services-platform:modules/security/tests/e2e/definitions.e2e.spec.js#refuses a write against a built-in as read-only rather than as a record that is not there,services-platform:modules/security/tests/integration/services/catalog/reconcile-catalog.integration.spec.js#makes a retired built-in grant nothing while its holder keeps every other grant
15 Publish shared access definitions from releases with enforce access at request boundariesinteractionapiproposed
Proves
BR-CAP-PFM-SEC-013-11 BR-CAP-PFM-SEC-015-05
Preconditions
An active release serves a protected operation.
Steps
Stage invalid route declarations, then stage a valid changed release and authorize the shared operation.
Expected
Invalid declarations do not stage; the valid staged and active requirements constrain the request together.
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/catalog/catalog-plan.spec.ts#answers every problem of the release at once, rather than the first one it met,services-platform:modules/security/tests/unit/authorizer/registry-manifest.spec.ts#refuses a staffOnly key below a system route

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.