Auditing authorisation architecture and default-deny behaviour
Authorisation needs explicit rules for the current identity, resource, operation and relevant application state. Understanding authorisation architecture and default-deny behaviour 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.
Why it matters
Consider a realistic failure: a normal account reaches a privileged or cross-customer operation by using a route the interface does not advertise.
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.
A code audit connects a stated requirement to the implementation responsible for enforcing it. Source review and targeted behavioural checks should explain the same boundary and any relevant exceptions.
How penetration testers check for it
Review the specific control expectations below against the code, deployment and observable application behaviour.
- Confirm that the application ensures that function-level access is restricted to consumers with explicit permissions.
- Confirm that the application ensures that data-specific access is restricted to consumers with explicit permissions to specific data items to mitigate insecure direct object reference (IDOR) and broken object level authorisation (BOLA).
- Confirm that the application ensures that field-level access is restricted to consumers with explicit permissions to specific fields to mitigate broken object property level authorisation (BOPLA).
- Confirm that adaptive security controls based on a consumer's environmental and contextual attributes are implemented for authentication and authorisation decisions, as defined in the application's documentation. These controls must be applied when the consumer tries to start a new session and also during an existing session.
- Test nested resources, background processing and state changes.
- Confirm rejection as well as the legitimate successful journey.
How to fix it
Implement the required boundary in the component that actually performs the sensitive operation and retain focused regression coverage.
- Define explicit access rules and default-deny behaviour.
- Bind resource selection to trusted ownership and tenant context.
- 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.
Related issues
- Reviewing authorisation for each application operation
- Auditing authorisation consistency and sensitive permission changes
- Auditing OAuth authorisation server grants and token issuance
Read about our methodology or contact pentested.com to discuss the security of your application code.