Location Research Breakthrough Possible @S-Logix pro@slogix.in

Revoking Unauthorized OIDC Authorization Abuse Against Authelia Identity Services Through Client Authorization Policies and Authorization-Event Monitoring

Description

Modern identity platforms use OpenID Connect (OIDC) to allow applications to authenticate users and obtain authorized access to protected resources. Authelia can operate as an OpenID Connect Provider, allowing registered relying-party clients to use Authelia for authentication and authorization. Authelia’s OIDC implementation provides client-specific authorization policies that determine whether an authorization request is permitted.

An OIDC authorization-abuse scenario occurs when an unauthorized or improperly configured client attempts to use the identity provider’s authorization endpoint to obtain authorization that it should not receive.

The abuse may involve a registered client requesting authorization for an unintended user, requesting an unauthorized authentication level, using an unapproved redirect URI, requesting unsupported response or grant types, attempting to bypass the expected consent process, or repeatedly generating authorization requests outside the expected application workflow.

In this use case, a controlled Authelia OIDC Provider is deployed on Ubuntu Linux inside an isolated VirtualBox laboratory. A synthetic OIDC client application is registered with Authelia and configured with explicitly permitted authorization parameters.

A Kali Linux security-testing system is used to generate controlled authorization requests against the laboratory OIDC authorization endpoint. The testing is restricted to the registered laboratory client and synthetic accounts.

Authelia’s OIDC client authorization policies are configured to determine whether the requesting user is permitted to authorize access to the specific client. These policies are specifically intended for OIDC Authorization Requests and are distinct from general Access Control Rules. A matching deny policy rejects the authorization request and returns an OIDC access_denied error.

Additional client restrictions are configured for redirect URIs, scopes, grant types, response types, PKCE, consent mode, and other OIDC parameters. Authelia recommends using the authorization-code response type and supports PKCE and Pushed Authorization Requests as additional OIDC security controls.

Authorization events are monitored through Authelia logs and telemetry. Authelia exposes OIDC endpoint metrics including authorization, consent, token, revocation, introspection, and configuration endpoints. JSON logging can also be enabled to provide structured security telemetry for centralized monitoring.

The controlled attack is repeated after the authorization policies are implemented to verify that unauthorized authorization requests are rejected, legitimate OIDC authorization continues to function, security events are recorded, and the complete authorization-abuse timeline can be investigated.

Complete Identity and Access Management Workflow: Authelia OIDC Provider → Registered OIDC Client → Authorization Request → Client / User Validation → Authorization Policy Evaluation → Unauthorized Request Detection → Authorization Denial → access_denied Response → Authorization Event Logging → Security Monitoring → Investigation → Policy Remediation → Post-Remediation Validation

Existing Security Problem

Application: Authelia OpenID Connect Identity Service

Authelia provides the controlled identity-management and OIDC Provider environment. Authelia’s OIDC Provider allows registered clients to request authorization from the Authorization Endpoint. Client-specific authorization policies can determine whether users are permitted to authorize access to a particular client. Authelia also provides client-level restrictions for parameters including redirect URIs, scopes, grant types, response types, authorization policies, PKCE, consent mode, and Pushed Authorization Requests.

Existing Problem:

An OIDC client can become an authorization-abuse risk when authorization requests are accepted without sufficiently restricting which users, clients, redirect URIs, scopes, or authentication policies are permitted. An attacker may attempt to generate an authorization request using the identity of a legitimate client but with authorization parameters or user context that are not permitted by the organization’s intended policy.

The security problem is therefore:

OIDC Client / Attacker-Controlled Request → Authelia Authorization Endpoint → Authorization Request Parameters → Client Identity → Requested User / Authentication Level → Requested Scope / Redirect URI / Response Type → Authorization Policy Evaluation → Unauthorized Authorization Request → Potential Authorization → Potential Authorization Code / Token Issuance → Unauthorized Application Access

The proposed security architecture applies client-specific authorization policies, strict OIDC client configuration, redirect-URI restrictions, response-type restrictions, PKCE, consent controls, and authorization-event monitoring to prevent unauthorized authorization requests from resulting in approved access.

Attack

Specific Attack: Unauthorized OIDC Authorization Abuse

Unauthorized OIDC authorization abuse occurs when a client or maliciously constructed authorization request attempts to obtain authorization that does not satisfy the identity provider’s configured client or user authorization requirements. The attack is performed against the laboratory Authelia OIDC Authorization Endpoint. The objective is to verify that Authelia does not simply process every syntactically valid authorization request. Instead, the authorization request must satisfy the registered client’s authorization policy and configured OIDC restrictions. A matching deny rule in the authorization policy results in a rejected consent and an OIDC access_denied response.

Attack Behavior:
Kali Linux / Controlled OIDC Test Client
→
Prepare Authorization Request
→
Target Laboratory Authelia Authorization Endpoint
→
Present Registered Client Identity
→
Request Authorization for Protected Client
→
Introduce Controlled Authorization-Policy Violation
→
Authelia Receives Authorization Request
→
Client Configuration Validation
→
Authorization Policy Evaluation
→
Unauthorized Request Detected
→
Authorization Request Denied
→
OIDC access_denied Response
→
Authorization Event Logged
→
Security Event Investigated

Security Concept

Client Authorization Policies and Authorization-Event Monitoring:

OIDC authorization should be treated as a policy-controlled identity operation rather than simply a successful authentication event.

Authelia provides dedicated OIDC authorization policies that are applied to authorization requests for individual clients. These policies can use conditions such as user or group identity and network information to determine the effective authorization policy. The available effective policies include one_factor, two_factor, and deny. This is distinct from Authelia’s general Access Control Rules. Its documentation and architecture decision record distinguish OIDC Authorization Request policies from ordinary access-control rules because they operate at different stages and have different purposes. The client itself is also restricted through its OIDC configuration. Authelia supports restrictions involving redirect URIs, scopes, grant types, response types, PKCE, consent mode, authorization policy, and Pushed Authorization Requests. Authorization-event monitoring provides visibility into the authorization workflow. Authelia provides structured logging and OIDC telemetry, including authorization and consent endpoint metrics, which can be correlated with the controlled security test.

The secure processing flow is:

OIDC Authorization Request
→
Authelia OIDC Provider
→
Client Identity Validation
→
Redirect URI Validation
→
Response Type / Grant Validation
→
Scope Validation
→
PKCE / Authorization-Request Validation
→
Client Authorization Policy
→
User / Group / Network Evaluation
→
Allow / Deny Decision
→
Authorization Code / Access Denied
→
Authorization Event Logging
→
Wazuh Monitoring
→
OpenSearch Investigation
→
Post-Remediation Validation

Defensive Mechanism

Client Authorization Policy

A dedicated Authelia authorization policy is assigned to the protected OIDC client.

Purpose

Control which users are permitted to authorize access to the registered OIDC client.

User and Group Authorization Restriction

Authorization-policy rules are configured using controlled laboratory users and groups.

Purpose

Prevent unauthorized users or groups from authorizing access to the protected client.

Authorization Denial Policy

A deny policy is configured for the controlled unauthorized condition.

Purpose

Reject an authorization request that violates the defined client authorization policy.

Redirect URI Restriction

The OIDC client is configured with explicitly approved redirect URIs.

Purpose

Prevent authorization responses from being redirected to an unregistered laboratory destination.

Response-Type Restriction

The OIDC client is restricted to the intended response type, with authorization code used for the laboratory implementation.

Purpose

Prevent unauthorized use of unsupported or less-secure OIDC response types.

Grant-Type Restriction

Only required OAuth/OIDC grant types are enabled for the laboratory client.

Purpose

Prevent the client from using unnecessary token-acquisition mechanisms.

Scope Restriction

Only required OIDC scopes are assigned to the laboratory client.

Purpose

Prevent authorization requests from obtaining unnecessary identity or resource permissions.

PKCE Enforcement

PKCE is enabled for the laboratory authorization-code flow.

Purpose

Reduce authorization-code interception and misuse risk.

Explicit Consent

The laboratory client uses explicit consent where appropriate.

Purpose

Require an authorization decision before access is granted to the requesting client.

Pushed Authorization Request Protection

Pushed Authorization Requests are enabled where the controlled client supports them.

Purpose

Move authorization-request parameters to a back-channel and reduce the ability to manipulate front-channel authorization parameters.

Authorization-Event Monitoring

Authorization requests, consent events, and relevant OIDC endpoint activity are monitored through Authelia logs and telemetry.

Purpose

Detect and investigate abnormal authorization behavior.

Security Event Correlation

Authorization events are correlated with client identity, user identity, request time, response status, and policy decisions.

Purpose

Reconstruct the complete authorization-abuse sequence.

Centralized Security Investigation

Relevant Authelia security telemetry is forwarded to centralized monitoring and analysis infrastructure.

Purpose

Provide searchable evidence for unauthorized OIDC authorization attempts.

Security Tools

Identity and Access Management Platform: Authelia

Authelia provides the controlled identity-management environment and acts as the laboratory OpenID Connect Provider. Its OIDC Provider supports registered clients, authorization policies, client restrictions, authorization requests, consent, tokens, and related OIDC functionality.

Purpose
  • Provide the OIDC identity service.
  • Register laboratory clients.
  • Authenticate laboratory users.
  • Evaluate authorization policies.
  • Allow or deny authorization requests.

OIDC Provider: Authelia OpenID Connect 1.0 Provider

The OIDC Provider handles authorization requests from registered relying-party clients.

Purpose
  • Process OIDC authorization requests.
  • Validate client parameters.
  • Apply authorization policies.
  • Generate authorization responses.
  • Generate controlled authorization events.

OIDC Client: Controlled Laboratory Application

A synthetic application is registered as an OIDC client with Authelia.

Purpose
  • Represent the legitimate relying party.
  • Request authorization from Authelia.
  • Provide controlled redirect URIs.
  • Request approved scopes.
  • Validate legitimate authorization behavior.

Authorization Policy Mechanism: Authelia OIDC Authorization Policies

Authelia provides client-specific authorization policies for OIDC Authorization Requests. These policies can apply different authorization outcomes depending on configured rules.

Purpose
  • Restrict client authorization.
  • Apply user and group rules.
  • Apply network-based rules.
  • Deny unauthorized authorization.
  • Enforce the intended identity policy.

Authorization Configuration Mechanism: Authelia OIDC Client Restrictions

Authelia provides client-level controls for redirect URIs, scopes, grant types, response types, PKCE, consent mode, and authorization policies.

Purpose
  • Restrict OIDC client capabilities.
  • Reduce unnecessary authorization options.
  • Prevent unauthorized redirect destinations.
  • Restrict requested permissions.
  • Enforce approved OIDC flows.

OIDC Security Mechanism: PKCE

PKCE is used with the laboratory authorization-code flow.

Purpose
  • Bind the authorization request to the client-generated verifier.
  • Reduce authorization-code interception risk.
  • Strengthen the authorization-code flow.

Authorization Request Protection: Pushed Authorization Requests

Pushed Authorization Requests (PAR) are used where supported by the laboratory OIDC client.

Purpose
  • Send authorization parameters through the back-channel.
  • Reduce front-channel parameter manipulation.
  • Strengthen authorization-request integrity.

Security Monitoring Tool: Wazuh

Wazuh monitors the Ubuntu Authelia environment and collects relevant identity and authorization events.

Purpose
  • Monitor Authelia logs.
  • Detect authorization failures.
  • Monitor suspicious OIDC activity.
  • Generate security alerts.
  • Support incident investigation.

Security Analytics Tool: OpenSearch

OpenSearch provides centralized investigation and correlation of OIDC authorization events.

Purpose
  • Search authorization events.
  • Correlate client and user activity.
  • Analyze authorization-denial events.
  • Review request timestamps.
  • Support security investigation.

OIDC Testing Platform: Kali Linux

Kali Linux provides the controlled security-testing environment.

Purpose
  • Generate laboratory OIDC authorization requests.
  • Test client restrictions.
  • Test authorization policies.
  • Validate denial behavior.
  • Perform post-remediation testing.

Operating System: Ubuntu Linux

Ubuntu provides the controlled environment hosting Authelia and supporting monitoring components.

Purpose
  • Host Authelia.
  • Host the laboratory OIDC service.
  • Store configuration.
  • Generate security logs.
  • Support authorization-security validation.

Virtualization Platform: VirtualBox

VirtualBox provides the isolated identity-security laboratory.

Purpose
  • Host Ubuntu and Kali Linux.
  • Isolate OIDC security testing.
  • Provide controlled networking.
  • Support repeatable authorization-abuse testing.
  • Prevent testing activity from affecting external identity services.

Process

STEP 01

Step 1: Prepare the Isolated Identity Security Laboratory

  • Create the Ubuntu Linux virtual machine for the Authelia identity service.
  • Prepare the Kali Linux security-testing virtual machine.
  • Configure isolated laboratory networking.
  • Assign controlled laboratory IP addresses.
  • Confirm that all OIDC authorization testing remains restricted to the authorized laboratory.
Tools: VirtualBox + Ubuntu + Kali Linux
STEP 02

Step 2: Deploy Authelia

  • Install the supported Authelia deployment on the Ubuntu laboratory system.
  • Configure the required storage and authentication backend.
  • Start the Authelia service.
  • Verify that the Authelia web interface is accessible.
  • Record the deployed Authelia version and baseline configuration.
Tools: Authelia + Ubuntu
STEP 03

Step 3: Enable and Configure the OIDC Provider

  • Enable the Authelia OpenID Connect Provider.
  • Configure the required OIDC provider settings.
  • Configure the provider signing and identity parameters.
  • Verify the OIDC discovery configuration.
  • Confirm that the laboratory OIDC endpoints are reachable.
Tools: Authelia OIDC Provider + Ubuntu
STEP 04

Step 4: Create the Laboratory Users and Groups

  • Create the legitimate laboratory user.
  • Create a separate unauthorized-test user.
  • Create the required laboratory groups.
  • Assign the legitimate user to the approved client-access group.
  • Keep the unauthorized-test identity outside the approved authorization group.
Tools: Authelia + Ubuntu
STEP 05

Step 5: Register the Controlled OIDC Client

  • Register the synthetic laboratory application as an OIDC client.
  • Generate the required client credentials.
  • Configure the approved redirect URI.
  • Configure the intended response type.
  • Configure only the required grant types and scopes.
  • Record the client configuration as the trusted baseline.
Tools: Authelia OIDC Client + Laboratory Application
STEP 06

Step 6: Configure the Authorization-Code Flow

  • Configure the laboratory client to use the authorization-code flow.
  • Configure PKCE using the supported secure challenge method.
  • Configure the approved redirect URI.
  • Configure the intended OIDC scopes.
  • Verify a normal authorization-code login.
  • Confirm that the legitimate client can complete the authorization process.
Tools: Authelia + OIDC Client + PKCE
STEP 07

Step 7: Establish the Normal OIDC Authorization Baseline

  • Start a normal authorization request from the laboratory application.
  • Authenticate using the legitimate laboratory user.
  • Review the requested scopes.
  • Complete the authorization and consent process.
  • Confirm successful redirection to the approved redirect URI.
  • Record the normal authorization-event sequence.
Tools: Authelia + Laboratory OIDC Client + Wazuh
STEP 08

Step 8: Configure the Client Authorization Policy

  • Create a dedicated OIDC authorization policy.
  • Define the default authorization behavior.
  • Create a rule for the approved laboratory group.
  • Create a controlled denial condition for the unauthorized laboratory identity.
  • Assign the authorization policy to the registered OIDC client.
  • Verify that the policy is associated with the correct client.
Tools: Authelia OIDC Authorization Policies
STEP 09

Step 9: Configure Client Restrictions

  • Restrict the client to the approved redirect URI.
  • Restrict the client to the required scopes.
  • Restrict the client to the intended grant types.
  • Restrict the client to the authorization-code response type.
  • Enable the intended PKCE requirement.
  • Configure explicit consent where required.
Tools: Authelia OIDC Client Configuration
STEP 10

Step 10: Configure Pushed Authorization Requests

  • Verify whether the laboratory OIDC client supports PAR.
  • Enable Pushed Authorization Requests for the client where supported.
  • Configure the required client authentication.
  • Verify that authorization parameters are submitted through the back-channel.
  • Confirm that the resulting authorization request uses the issued request URI.
Tools: Authelia + OIDC Client + PAR
STEP 11

Step 11: Configure Authorization-Event Logging

  • Configure Authelia logging in structured JSON format.
  • Configure an appropriate laboratory log level.
  • Store Authelia logs in the controlled laboratory environment.
  • Verify that OIDC authorization activity appears in the logs.
  • Identify authorization-related log entries for later correlation.
Tools: Authelia Logging + Ubuntu
STEP 12

Step 12: Configure Security Monitoring

  • Configure Wazuh to monitor the Authelia host.
  • Collect Authelia authentication and OIDC logs.
  • Monitor authorization-related events.
  • Monitor denied authorization responses.
  • Generate a controlled test event and verify Wazuh visibility.
Tools: Wazuh + Authelia + Ubuntu
STEP 13

Step 13: Configure Centralized Authorization Investigation

  • Forward relevant Wazuh events to OpenSearch.
  • Create searches for OIDC authorization activity.
  • Create searches for authorization-denial events.
  • Create searches for repeated authorization requests.
  • Create searches for client identifiers and source information.
  • Verify that the normal OIDC authorization sequence can be reconstructed.
Tools: OpenSearch + Wazuh
STEP 14

Step 14: Generate the Controlled OIDC Authorization-Abuse Request

  • Use Kali Linux as the authorized OIDC security-testing client.
  • Prepare a request targeting the laboratory Authelia Authorization Endpoint.
  • Use the registered laboratory client identity.
  • Introduce a controlled authorization-policy violation.
  • Keep the request within the laboratory OIDC configuration.
  • Record the generated request and expected security-policy result.
Tools: Kali Linux + Python + curl + Authelia
STEP 15

Step 15: Validate Unauthorized Authorization Detection

  • Submit the controlled authorization request.
  • Verify that Authelia receives the authorization request.
  • Verify that the client configuration is evaluated.
  • Verify that the OIDC authorization policy is evaluated.
  • Confirm that the unauthorized condition matches the configured denial rule.
  • Record the resulting authorization decision.
Tools: Authelia + OIDC Authorization Policy + Kali Linux
STEP 16

Step 16: Apply the Authorization-Denial Response

  • Verify that the matching authorization policy produces a denial decision.
  • Confirm that the authorization request does not proceed to successful consent.
  • Verify that Authelia returns the expected OIDC access_denied response.
  • Confirm that no unauthorized authorization code is issued.
  • Record the authorization-denial event.
Tools: Authelia + OIDC Authorization Policy
STEP 17

Step 17: Investigate the Authorization-Abuse Event

  • Review the Authelia authorization event.
  • Identify the affected OIDC client.
  • Identify the laboratory user associated with the request.
  • Review the request timestamp and response status.
  • Correlate the event with Wazuh telemetry.
  • Search OpenSearch for related authorization activity.
Tools: Authelia + Wazuh + OpenSearch
STEP 18

Step 18: Remove the Controlled Abuse Condition and Validate Recovery

  • Stop the unauthorized authorization requests.
  • Restore the legitimate laboratory user and client configuration.
  • Initiate a normal OIDC authorization request.
  • Complete the approved authentication and consent sequence.
  • Confirm redirection to the registered redirect URI.
  • Verify successful authorization for the legitimate client.
  • Review the corresponding security events.
Tools: Authelia + OIDC Client + Wazuh + OpenSearch
STEP 19

Step 19: Perform Final OIDC Authorization-Abuse Detection and Prevention Validation

  • Repeat the normal OIDC authorization baseline.
  • Repeat the controlled unauthorized authorization request.
  • Verify client identity validation.
  • Verify redirect-URI restriction.
  • Verify scope restriction.
  • Verify grant-type restriction.
  • Verify response-type restriction.
  • Verify PKCE enforcement.
  • Verify the client authorization policy.
  • Verify the unauthorized condition is denied.
  • Verify the access_denied response.
  • Verify authorization-event logging.
  • Verify Wazuh security monitoring.
  • Verify OpenSearch event correlation.
  • Verify legitimate authorization continues to operate.
  • Preserve the final OIDC security-validation evidence.
Tools: Authelia + OIDC Provider + OIDC Client + PKCE + Wazuh + OpenSearch + Kali Linux + Ubuntu

Outcome

  1. A controlled Authelia OpenID Connect identity environment is successfully established on Ubuntu Linux with a registered laboratory OIDC client.
  2. A legitimate authorization-code OIDC workflow is configured with controlled redirect URIs, scopes, grant types, response types, and PKCE restrictions.
  3. A controlled unauthorized OIDC authorization-abuse scenario is reproduced against the laboratory Authorization Endpoint without targeting external identity services.
  4. Client-specific authorization policies are applied to the OIDC client, providing a dedicated authorization decision point for the laboratory identity workflow.
  5. The controlled unauthorized authorization request is rejected by the configured authorization policy, producing the expected OIDC access_denied response rather than an approved authorization result.
  6. Redirect-URI, scope, grant-type, response-type, PKCE, and consent restrictions provide additional controls around the registered OIDC client’s authorization capabilities.
  7. Pushed Authorization Requests can provide an additional authorization-request integrity control for compatible laboratory clients by moving request parameters to the OIDC back-channel.
  8. Authelia authorization logs and OIDC telemetry provide evidence of authorization activity, while Wazuh monitors the identity service and OpenSearch provides centralized investigation and event correlation.
  9. Post-remediation testing confirms that the unauthorized laboratory authorization request is rejected while the legitimate OIDC client continues to complete the intended authorization workflow.
  10. The complete Authelia OIDC authorization-abuse detection and prevention workflow is demonstrated, covering OIDC client registration, authorization-code configuration, client restrictions, authorization-policy enforcement, controlled authorization abuse, denial through access_denied, authorization-event monitoring, Wazuh alerting, OpenSearch investigation, recovery, and final validation.
← Previous Project
Project 7 of 7