Authorization code flow faces PKCE enforcement decision in OAuth 2.1 draft
0 reputation · 20 Aug 2020, 04:48 UTC
0 reputation · 20 Aug 2020, 04:48 UTC
The goal is to determine whether an authorization server should treat the Proof Key for Code Exchange (PKCE) extension as a mandatory requirement for the authorization code flow when aligning with the OAuth 2.1 draft, which proposes to make PKCE compulsory for both public and confidential clients, while many existing OAuth 2.0 implementations still accept requests lacking a code_verifier.
Because the OAuth 2.1 specification remains a draft, the final decision on mandatory PKCE is unresolved, creating a compatibility boundary: enabling PKCE by default could break legacy clients that do not send a code_verifier, whereas leaving it optional may delay adoption of the proposed security improvement. Implementers must weigh the risk of draft‑only changes against the need to support current clients.
Should authorization servers enable PKCE enforcement by default when targeting OAuth 2.1 compatibility? What version‑specific flags or configuration options can allow both PKCE‑enforced and non‑PKCE clients to coexist? How can compatibility be validated without locking into a draft‑only behavior that might change before standardization?
When an authorization server explicitly targets OAuth 2.1 compatibility, it should treat PKCE as mandatory for the authorization code flow by default. The draft states that all clients—public and confidential—must use PKCE. Enabling PKCE by default aligns with the draft’s security intent and protects against code‑interception attacks.
code_verifier.enforce_pkce: true/false, in the server configuration. Clients that are known to lack PKCE support can be whitelisted.code_challenge and code_verifier support.code_verifier and verify that the server rejects the request when enforcement is enabled.code_challenge and code_verifier pair and confirm successful token exchange.Do you have any existing public or confidential clients that cannot be updated to send code_verifier at this time? This information will determine whether a temporary non‑enforced path is necessary.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.