JWT audience and issuer claim validation
Apache
Impala validates the iss
(issuer)
and aud
(audience)
claims in JWT to
prevent token redirection attacks.
Cloudera Runtime 7.3.3 supports claim validation of JWTs to enhance security in federated authentication environments. When configured, Impala verifies that incoming tokens are issued by trusted authorities and are generated specifically for Impala. This prevents token redirection attacks, when a valid token issued for one service is improperly presented to another.
This feature aligns Impala authentication with the following RFC 8725 recommendations:
- Validate Issuer and Subject: Verifies that the token was signed and issued by an authorized identity provider.
- Use and Validate Audience: Verifies that the token was issued specifically for the Impala service.
Configuration using --oauth_servers
Claim validation is configured within the --oauth_servers JSON configuration. Each OAuth provider entry can specify issuer and audience constraints.
| Configuration field | Type | Description |
|---|---|---|
| issuerClaims | STRING | A
list of trusted issuer URLs. If
configured,
the iss claim
in
the incoming tokens must match one of these values exactly. Tokens
with missing or mismatched iss claims are rejected with a
HTTP
401 Unauthorized response.
Example:
["https://idp1.example.com", "https://idp2.example.com"] |
| audienceClaims | STRING | A
list of acceptable audience identifiers. If
configured,
the aud claim in
the
incoming tokens must match one of these values. If the
aud claim
contains
an array of
audiences (as per JWT specification), validation
succeeds
if at least one value
matches.
Tokens with missing or mismatched aud claims are
rejected with an
HTTP 401 Unauthorized response. Example:
["impala", "impala-prod"] |
Validation behavior
Impala enforces the following validation behavior:
- Fail-closed validation
Any token failing claim validation triggers an immediate authentication rejection (401 Unauthorized). the engine grants no partial or degraded access.
- Audit logging
Failed claim validations are logged at INFO or WARN level, specifying which claim failed without logging sensitive token data.
- Backward compatibility
When issuerClaims and audienceClaims are not configured within an --oauth_servers entry, Impala skips claim validation, allowing existing JWT configurations to operate without modification.
Examples
Validate issuer and audience claims in --oauth_servers:
--oauth_servers='[{
"issuer": "https://auth.example.com",
"issuerClaims": ["https://auth.example.com"],
"audienceClaims": ["impala", "impala-service"],
"jwks_uri": "https://auth.example.com/.well-known/jwks.json"
}]'
Multiple OAuth providers with different claim requirements:
--oauth_servers='[
{
"issuer": "https://idp1.example.com",
"issuerClaims": ["https://idp1.example.com"],
"audienceClaims": ["impala-prod"],
"jwks_uri": "https://idp1.example.com/.well-known/jwks.json"
},
{
"issuer": "https://idp2.example.com",
"issuerClaims": ["https://idp2.example.com"],
"audienceClaims": ["impala", "shared-service"],
"jwks_uri": "https://idp2.example.com/.well-known/jwks.json"
}
]'
