prestodb/presto · error · ParseException
Invalid JSON value
Error message
Invalid JSON value
What it means
OidcDiscovery.readConfiguration found a field in the metadata JSON whose type does not match what is expected (e.g. a string field encoded as an array); the field name is included. Non-standard or malformed provider metadata.
Source
Thrown at presto-main/src/main/java/com/facebook/presto/server/security/oauth2/OidcDiscovery.java:138
else {
userinfoEndpoint = Optional.empty();
}
return new OAuth2ServerConfig(
// AD FS server can include "access_token_issuer" field in OpenID Provider Metadata.
// It's not a part of the OIDC standard thus have to be handled separately.
// see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oidce/f629647a-4825-465b-80bb-32c7e9cec2c8
getOptionalField("access_token_issuer", Optional.ofNullable(metadataJson.get("access_token_issuer")).map(JsonNode::textValue), ACCESS_TOKEN_ISSUER, accessTokenIssuer),
getRequiredField(
"authorization_endpoint",
URI.create(authorizationEndpoint.orElse(metadata.getAuthorizationEndpointURI().toString())),
AUTH_URL,
authUrl),
getRequiredField("token_endpoint", metadata.getTokenEndpointURI(), TOKEN_URL, tokenUrl),
getRequiredField("jwks_uri", metadata.getJWKSetURI(), JWKS_URL, jwksUrl),
userinfoEndpoint.map(URI::create));
}
catch (JsonProcessingException e) {
throw new ParseException("Invalid JSON value", e);
}
}
private static URI getRequiredField(String metadataField, URI metadataValue, String configurationField, Optional<String> configurationValue)
{
Optional<String> uri = getOptionalField(metadataField, Optional.ofNullable(metadataValue).map(URI::toString), configurationField, configurationValue);
checkMetadataState(uri.isPresent(), "Missing required \"%s\" property.", metadataField);
return URI.create(uri.get());
}
private static Optional<String> getOptionalField(String metadataField, Optional<String> metadataValue, String configurationField, Optional<String> configurationValue)
{
if (configurationValue.isPresent()) {
if (!configurationValue.equals(metadataValue)) {
LOG.warn("Overriding \"%s=%s\" from OpenID metadata document with value \"%s=%s\" defined in configuration",
metadataField, metadataValue.orElse(""), configurationField, configurationValue.orElse(""));
}
return configurationValue;View on GitHub (pinned to 55bb57d202)
Solutions
- Inspect the named field in the provider's discovery document and report the type mismatch to the IdP vendor
- Use a standards-compliant OIDC provider or fix the served metadata
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-main/src/main/java/com/facebook/presto/server/security/oauth2/OidcDiscovery.java:138 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/ee458e86eb87d470.
Report an issue: GitHub.