Secure development

Connecting authorisation decisions to safe application responses

Access decision: person, gate, database arranged to illustrate connecting authorisation decisions to safe application responses.

Connecting authorisation decisions to safe application responses 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 decisions to safe application responses 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.

A Policy Decision Point (PDP) evaluates access; a Policy Enforcement Point (PEP) applies the result before releasing data or performing an action. OpenID AuthZEN Authorisation API 1.0 defines single and multiple evaluations, as well as search interfaces. This sheet covers enforcing individual decisions, authorised resource lists, and query filters. See Authorisation Patterns for placement and Policy and Data Distribution for trustworthy inputs.

Bind each decision to the authenticated subject, action, resource, tenant, and relevant context. AuthZEN's evaluation interfaces carry the information used to evaluate access. Supplying verified role or relationship attributes is legitimate when the policy requires them; accepting a client's assertion of its own privileges is not.

Why it matters

Consider a realistic failure: a permission decision is correct, but response generation later includes information the caller was not entitled to receive.

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 for small sets when a list or filter interface is unavailable. Keep candidate data inside the trusted service until checks complete; exclude denied and unresolved items. Apply the same restriction to counts, exports, and other outputs that could reveal protected data.
  • Use a maintained adapter for the exact PDP and data store. Cerbos PlanResources distinguishes always-allowed, always-denied, and conditional plans; OPA's Compile API supports partial evaluation. Capabilities depend on the implementation and policy language, not a universal restriction on ReBAC or other model families.
  • Cover every data path. Enforce the restriction on list, search, export, count, aggregate, and direct-object reads. An authorised list does not authorize a later update or delete.
  • Intersect predicates. Combine authorisation restrictions with application and tenant predicates using logical AND. An always-allowed authorisation result does not remove those other restrictions; always-denied must return no protected data.
  • 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