Authentication vs. Authorization

Authentication establishes which account is making a request. Authorization determines which actions that account may perform on a specific resource. In a support tool, sign-in identifies the staff account. The permission rules determine which customer records the account can view and which changes it can make.

From sign-in to a case decisionThe same staff account can receive a different decision for each action or record.
  1. Verify identity

    Confirm the authenticator or validate the trusted provider response.

  2. Resolve the account

    Associate the session or validated token with a staff account.

  3. Check permission

    Evaluate the requested action, record, role, and current team membership.

  4. Apply the result

    Return only permitted case data or deny the request.

Authentication establishes identity

An application can verify a user's control of an authenticator, such as a password or a passkey. With federated sign-in, the application validates a response from its trusted identity provider and associates it with the appropriate account. Subsequent requests can use an established session or a validated token so the application can recognize the account.

Document which service signs users in, which component validates subsequent requests, and how the application associates external identities with local accounts. Find the corresponding service identities for tasks that run without a person signing in.

Authorization enforces permissions

For every protected request, evaluate the action, target resource, and relevant facts about the caller. A decision may depend on the caller's role, current organization membership, the record's owner, or its state. Make that decision at a trusted server-side boundary. A hidden administrative button can guide the interface while the server independently applies the same policy to the operation.

Start with an explicit grant for each protected action. Deny the request if no rule permits it. Check the rules consistently where a feature reads, updates, exports, or otherwise acts on records. Temporary grants should have an end condition, and sensitive actions may need current membership or permission data. Set an explicit rule for how quickly a role change must affect sessions already in use.

Which facts determine case accessName each policy input before writing its permit and deny tests.
  • Account identity

    A trusted session identifies the staff member making the request.

  • Role

    A support role can grant reading while a supervisor role can grant closure.

  • Record scope

    The case's assigned team limits which staff accounts can read it.

  • Current state

    The case state can determine which changes are available to an eligible supervisor.

Turn the policy into test cases

Ask the feature owner to name the roles, actions, and record scope before implementation. For example, a support agent may read a case assigned to their team while a supervisor may close cases for that team. Exercise both permitted and forbidden actions using synthetic accounts and records in an approved test environment.

Case Evidence to check
An agent opens a case assigned to their own team. The application returns the permitted case and fields.
A signed-in agent requests a case assigned to a different team. The server denies access and returns no private case details.
An agent attempts a supervisor-only state change. The server denies the change and the case remains in its original state.
A supervisor's role is removed during an active session. The service stops permitting supervisor actions within the documented revocation window.

When adding a new API, export, or background job, add cases for its permission boundary. Automated checks can catch regressions in documented rules. Have a reviewer confirm that those rules reflect the application's actual business requirements.

Review the session lifecycle ยท Explore scoped application security reviews

References