Secure development

Distributing authorisation policy and decision data safely

Access decision: person, gate, database arranged to illustrate distributing authorisation policy and decision data safely.

Distributing authorisation policy and decision data safely connects a security requirement to the behaviour of a real feature. The relevant controls need to remain effective across custom code, integrations and the production configuration. Understanding authorisation policy and decision data safely helps establish which security property the feature needs and where that property is actually enforced.

What does this involve?

Authorisation determines which resources and operations an established identity may use. It must be enforced where protected data is read or changed. User interface restrictions, obscure identifiers and documentation can help usability, but they do not replace the service's own permission decision.

An authorisation decision is only as reliable as its policy and input data. A Policy Decision Point (PDP) evaluates rules using attributes supplied by a Policy Enforcement Point (PEP) or an authoritative Policy Information Point (PIP). OPA's external data guidance describes common ways to deliver those inputs. See Authorisation Patterns for component placement.

Record who may change each policy and attribute, which service is authoritative for it, and the maximum delay before a change must affect decisions. Distinguish policy changes, such as a new restriction, from data changes, such as revoking a user's membership. Neither organisational ownership nor update frequency determines acceptable delay: a central policy can require an emergency update, while another can have a scheduled effective date.

Why it matters

Consider a realistic failure: a service keeps using stale permission data after a sensitive access rule changes.

A missing check can expose another account's information or let an ordinary user perform a privileged action. The result should be described by the actual records and operations reached, including whether access crosses a customer or organisational boundary.

Implementation guidance should be applied to a real feature and its deployment. Framework defaults, custom handlers and integrated services all influence whether the intended protection remains effective.

How penetration testers check for it

Trace the relevant feature from its entry point to the data or operation it protects, including custom code and alternate paths.

  • Compare users with different roles and ownership relationships.
  • Exercise read, change, delete and alternate access paths.
  • Test nested resources, background processing and state changes.
  • Confirm rejection as well as the legitimate successful journey.

How to fix it

Use the appropriate maintained mechanisms and verify the result in the actual production configuration.

  • Use this when the source can satisfy the decision's availability and freshness requirements. A lookup does not guarantee current data if the source, replica, or intermediate cache is stale. Deny affected operations when a required attribute cannot be obtained reliably.
  • Use this only when changing the data through a deployment meets its freshness requirement. Avoid embedding mutable account status or revocation data in releases that cannot update promptly.
  • Verify policy artifacts before activation. For bundles, require a signature from a configured trusted publisher and verify all covered files; OPA documents the verification and activation rules. Protect transport and signing keys as well. A valid signature proves origin and integrity, not that a policy is correct or current.
  • At startup, do not serve protected operations until the required policy and data are available and valid.
  • Enforce permission checks at each protected operation.
  • Maintain regression cases for unauthorised users and changed permissions.

A successful response alone does not prove unauthorised access. Establish whose resource was affected and what the caller was legitimately entitled to do.

Recheck the changed behaviour against the original failure conditions and the legitimate user journey. Keep enough evidence to show which release and configuration were verified, and include related entry points that depend on the same security decision.

Read about our methodology or contact pentested.com to discuss secure development and code review.

See your first test report this week.

Book a 30 minute demo. We will verify one of your targets with you and run a test against it, so you can judge the results on your own systems.

Book a demo