A security architect is designing an authentication framework for a native mobile application that authenticates users against an enterprise Identity Provider using OpenID Connect. Because native applications are public clients that cannot securely store a static client secret, the architect must mitigate the risk of authorization code interception attacks on the device operating system. Which mechanism should be integrated into the authorization code flow to address this vulnerability?
- Proof Key for Code Exchange (PKCE) to cryptographically bind the token request to the initial authorization requestCevap
- BRole-Based Access Control (RBAC) policies enforced at the Identity Provider to validate user permission assignments before issuing authorization codes
- CIP address allowlisting on the Identity Provider token endpoint to restrict requests to known cellular network gateway ranges
- DSAML 2.0 Web Browser Single Sign-On profile relying on client-side HTTP POST bindings with static X.509 private keys embedded in the application binary
Cevap
Proof Key for Code Exchange (PKCE) to cryptographically bind the token request to the initial authorization request
Proof Key for Code Exchange (PKCE) is an extension to the OAuth 2.0 authorization code flow specifically created for public clients like native mobile apps. It dynamically generates a unique secret (code verifier) and sends a hashed version (code challenge) during the initial authorization request. When exchanging the authorization code for tokens, the app sends the original verifier. Because an eavesdropping app on the device lacks the verifier, intercepted authorization codes cannot be redeemed.
Adım Adım Çözüm
Anahtar Kavram
PKCE in OAuth 2.0 / OIDC IAM Architecture for Public Clients