172 Authentication and Authorization Patterns

172 Authentication and Authorization Patterns

Authentication answers “who are you?” Authorization answers “what are you allowed to do?”

Request Decision Path

request -> authenticate principal -> evaluate policy(resource, action) -> allow/deny

Design Rules

  • Keep authn and authz modules separate.
  • Default deny when policy is unclear.
  • Keep policy inputs explicit and testable.