403 Forbidden
The HTTP status meaning the server knows who the caller is but that identity is not allowed to do this.
In more detail
Retrying with the same credentials will not help; the caller needs a different grant, such as a token with the required scope. Use 401 instead when the problem is missing or invalid credentials.
Examples
In the APIs course: The course service answers 403 when a token lacks tasks:write.Kubernetes: a Forbidden answer comes either from RBAC (the message names user, verb and resource) or from admission such as Pod Security (the message names the violated policy).In a Kubernetes audit log, a burst of 403 responses for one token is someone exploring what a stolen credential can do.Related terms
- 401 Unauthorized — The HTTP status meaning the request has no valid credentials, so the caller must authenticate first.
- authorization — Deciding whether an already identified caller may perform a particular action on a particular resource.
- OAuth scope — A named permission a token carries, such as tasks:read or tasks:write, limiting what the token may be used for.
- Kubernetes audit log — The Kubernetes API server's record of every request made to it: who asked, for what, and whether it was allowed.
- HTTP status code — The three-digit number at the start of a response, such as 200 or 404, that says how the server handled the request.
- 404 Not Found — The HTTP status meaning there is no resource at the requested address.
Taught in
- Rate Limiting Strategies — Modern API Architecture: REST, GraphQL & gRPC
- Scopes And Key Rotation — Modern API Architecture: REST, GraphQL & gRPC
- Mocking Dependencies — Modern API Architecture: REST, GraphQL & gRPC
- Role-Based and Policy-Based Authorization — Modern .NET Core, C# & Enterprise Microservices
- Troubleshooting: OOMKilled, Throttling And Evictions — Kubernetes: Production-Grade Container Orchestration
- RBAC: Roles, Bindings And Least Privilege — Kubernetes: Production-Grade Container Orchestration
- Pod Security Admission And Pod Security Standards — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: Forbidden Requests And Admission Rejections — Kubernetes: Production-Grade Container Orchestration
- Windows Event Logs, Sysmon & Linux Auditd Telemetry — Security Operations & Threat Hunting (SOC)
- Authentication Versus Authorisation — Application Security & Threat Modeling for Engineers
- Broken Object Level Authorization — Application Security & Threat Modeling for Engineers