/permission-qaQA-1234

Role, tenant, and object-permission QA

Validates authentication and authorisation across roles, tenants, ownership states, endpoints, operations, cached sessions, and direct-object access.

  1. Authorisation model preflight
  2. Identity
  3. Permission matrix generation
  4. Side-effect
  5. UI
  6. Session
  7. Finding assessment
  8. Publish restricted report
Scope and intent

A controlled workflow specification

This page defines the behaviour, controls, evidence, and outputs required from the skill. It does not claim that a language model can enforce security or correctness by wording alone.

Use when

Appropriate use

Use for role-based access control, organisation switching, shared resources, admin features, APIs, invitations, and security-sensitive workflows.

Do not use when

Non-goals

Do not use as a full penetration test, with real customer accounts, or without an isolated permission matrix and explicit security handling.

8
versioned workflow phases
4
explicit approval gates
6
defined result states
9
versioned output artifacts
Material changes to the source, environment, identity, approved actions, or expected behaviour invalidate dependent approvals and require revalidation.
Workflow

The 8 phases

Each phase has explicit inputs and outputs. Approval gates are hard stops bound to exact versions and hashes.

Phase 1: Authorisation model preflight Gate 1 · approve permission model

Resolve roles, permissions, tenants, resource ownership, inheritance, feature flags, endpoints, UI controls, token types, and authorised expectations.

actor · tenant · resource · operation · expected decision

Phase 2: Identity and session design

Create isolated users, tenants, memberships, tokens, ownership states, and session transitions. Record how each identity is independently verified.

identity IDs · role attestation · token scope · session state

Phase 3: Permission matrix generation

Create positive and negative combinations for read, create, update, delete, share, invite, export, and administrative operations.

allow · deny · not found · inherited · cross-tenant · owner/non-owner

Phase 4: Side-effect and security approval Gate 2 · approve actions

Review invitations, emails, exports, deletions, audit events, rate limits, and any tests that could expose or modify sensitive data.

test sinks · destructive action · audit impact · data boundary

Phase 5: UI and direct API execution

Test both visible controls and direct requests. Verify role, tenant, ownership, endpoint, and operation before every assertion.

UI state · HTTP response · resource state · audit event

Phase 6: Session and transition checks

Test role changes, organisation switches, token expiry, cached permissions, revoked access, concurrent sessions, and reauthentication.

before/after role · cache invalidation · token reuse · session isolation

Phase 7: Finding assessment Gate 3 · confirm finding

Classify over-permission, under-permission, information leakage, inconsistent UI/API, stale authorisation, or requirement gap.

security impact · reproducibility · affected scope

Phase 8: Publish restricted report and cleanup Gate 4 · publish

Publish through the appropriate security or product channel, remove isolated identities and resources, and preserve redacted evidence.

restricted evidence · defect route · cleanup · audit record
Approval contract

Every gate approves an exact decision object

An approval cannot be reused after its environment, source, action plan, or approved document changes.

Approval gates and binding requirements
GateDecisionRequired binding
1Gate 1 · approve permission modelApproval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state.
2Gate 2 · approve actionsApproval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state.
3Gate 3 · confirm findingApproval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state.
4Gate 4 · publishApproval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state.
Result model

Defined states prevent vague conclusions

Attempt outcomes remain separate from these workflow results. Errors, cancellations, and invalid context are never silently converted into a pass.

PASS

The verified actor receives the approved decision for the tested operation and resource state.

OVER-PERMISSION

An actor can perform or observe an operation that should be denied.

UNDER-PERMISSION

An actor is incorrectly denied an approved operation.

INFORMATION LEAK

The response reveals resource existence or sensitive details beyond the actor's permission.

INCONSISTENT

UI and API, sessions, or related endpoints enforce different decisions.

REQUIREMENT GAP

The authorised permission expectation is missing or contradictory.

Evidence contract

Evidence must directly support the claim

Evidence has provenance, capture context, privacy classification, retention, and integrity metadata. A convenient artifact is not automatically sufficient proof.

Required evidence by claim type
ClaimPrimary evidenceRequired validation
IdentityIndependent role and tenant attestationThe tested token and session belong to the intended actor.
UI authorisationScreenshot and interaction traceVisibility and enabled state match the expected capability.
API authorisationRequest and response captureEndpoint, method, status, body, and relevant headers are recorded.
Object isolationResource IDs and ownership mapCross-tenant and non-owner access are directly attempted.
State changeBefore-and-after resource verificationDenied operations create no hidden side effect.
AuditabilityAudit-log entry where requiredAllowed and denied sensitive actions produce the expected record.
Trust and safety

Controls that must be enforced outside the prompt

These controls belong in the runtime, connector permissions, sandbox, renderer, storage layer, and review process.

Runtime control

Least-privilege data

Use synthetic tenants and resources; never enumerate real customer objects.

Runtime control

Restricted findings

Potential security issues are not published in ordinary public channels.

Runtime control

Independent identity verification

UI labels alone do not prove the active role or tenant.

Runtime control

Direct-request coverage

Hidden UI controls do not substitute for server-side enforcement.

Runtime control

No destructive ambiguity

Delete and export tests require approved ownership and sinks.

Runtime control

Token isolation

Tokens, cookies, and credentials never enter reports or model-visible evidence.

Decision policy

Ordered outcomes, not averaged pass counts

The first applicable high-severity outcome takes precedence. A manual override is recorded separately and never rewrites the calculated result.

SECURITY ESCALATION

Over-permission, information leakage, or cross-tenant access requires restricted handling.

FAIL

Required permission behaviour is incorrect.

BLOCKED

Identity, expectation, or safe test data cannot be established.

PASS WITH GAP

Required checks pass but accepted optional combinations remain.

PASS

All required permission combinations enforce the approved decisions.

Known limitations

Uncertainty and coverage limits remain visible

The workflow documents what it cannot prove and what further evidence would change confidence.

  • Limit 1. This skill validates known authorisation rules; it is not a comprehensive offensive security assessment.
  • Limit 2. Identity providers and caches can introduce delayed permission changes.
  • Limit 3. Not-found versus forbidden behaviour may be intentionally product-specific.
  • Limit 4. Rate limiting and abuse controls may require isolated security environments.
  • Limit 5. Audit-log access can be restricted and may need specialist verification.
  • Limit 6. Permission models change frequently and require versioned expectations.
Outputs

Versioned records for review and continuation

Human summaries are generated from validated structured records. They are not maintained as separate, drifting sources of truth.

permission-context.json

Versioned output produced by the workflow.

identity-map.json

Versioned output produced by the workflow.

permission-matrix.csv

Versioned output produced by the workflow.

action-plan.md

Versioned output produced by the workflow.

attempt-ledger.jsonl

Versioned output produced by the workflow.

evidence-manifest.json

Versioned output produced by the workflow.

findings/

Versioned output produced by the workflow.

cleanup-report.md

Versioned output produced by the workflow.

permission-report.html

Versioned output produced by the workflow.

artifacts/qa/permission-qa/<run-id>/
├── permission-context.json
├── identity-map.json
├── permission-matrix.csv
├── action-plan.md
├── attempt-ledger.jsonl
├── evidence-manifest.json
├── findings/
├── cleanup-report.md
└── permission-report.html
Example

Example request and controlled output

Request

Input

Test whether Members can view but not edit another organisation's shared playlist. Check both UI controls and direct API requests after switching organisations.
Result

Output excerpt

Permission result: SECURITY ESCALATION

Finding:
A Member cannot see the Edit control in the UI but can update the playlist name through a direct API request after switching organisations.

Classification:
Cross-tenant over-permission.

Evidence:
Verified Member token, organisation membership map, request/response capture, and before/after resource state.

Publication:
Restricted security route required.
Production readiness

Required before operational use

The written skill is only one layer. The repository, runtime, connectors, evidence storage, and publication path must implement these requirements.

  • Required. Tool, filesystem, repository, command, secret, and network permissions are enforced outside the model.
  • Required. Every source, environment, build, plan, and approval has a version or content hash.
  • Required. Untrusted values are escaped, length-bounded, path-safe, and separated from executable instructions.
  • Required. Attempt outcomes, scenario verdicts, workflow decisions, and publication status remain separate.
  • Required. Raw evidence, publishable evidence, access control, retention, redaction, and deletion are defined.
  • Required. Concurrent runs use unique IDs, locks, idempotency keys, and conflict-aware updates.
  • Required. Material changes invalidate dependent approvals and outcomes.
  • Required. The repository validator passes before the skill is considered production-ready.
In one line

/permission-qa

Validates authentication and authorisation across roles, tenants, ownership states, endpoints, operations, cached sessions, and direct-object access.