{"record":{"id":"ee458e86eb87d470","repo":"prestodb/presto","slug":"invalid-json-value","errorCode":null,"errorMessage":"Invalid JSON value","messagePattern":"Invalid JSON value","errorType":"exception","errorClass":"ParseException","httpStatus":null,"severity":"error","filePath":"presto-main/src/main/java/com/facebook/presto/server/security/oauth2/OidcDiscovery.java","lineNumber":138,"sourceCode":"            else {\n                userinfoEndpoint = Optional.empty();\n            }\n            return new OAuth2ServerConfig(\n                    // AD FS server can include \"access_token_issuer\" field in OpenID Provider Metadata.\n                    // It's not a part of the OIDC standard thus have to be handled separately.\n                    // see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oidce/f629647a-4825-465b-80bb-32c7e9cec2c8\n                    getOptionalField(\"access_token_issuer\", Optional.ofNullable(metadataJson.get(\"access_token_issuer\")).map(JsonNode::textValue), ACCESS_TOKEN_ISSUER, accessTokenIssuer),\n                    getRequiredField(\n                            \"authorization_endpoint\",\n                            URI.create(authorizationEndpoint.orElse(metadata.getAuthorizationEndpointURI().toString())),\n                            AUTH_URL,\n                            authUrl),\n                    getRequiredField(\"token_endpoint\", metadata.getTokenEndpointURI(), TOKEN_URL, tokenUrl),\n                    getRequiredField(\"jwks_uri\", metadata.getJWKSetURI(), JWKS_URL, jwksUrl),\n                    userinfoEndpoint.map(URI::create));\n        }\n        catch (JsonProcessingException e) {\n            throw new ParseException(\"Invalid JSON value\", e);\n        }\n    }\n\n    private static URI getRequiredField(String metadataField, URI metadataValue, String configurationField, Optional<String> configurationValue)\n    {\n        Optional<String> uri = getOptionalField(metadataField, Optional.ofNullable(metadataValue).map(URI::toString), configurationField, configurationValue);\n        checkMetadataState(uri.isPresent(), \"Missing required \\\"%s\\\" property.\", metadataField);\n        return URI.create(uri.get());\n    }\n\n    private static Optional<String> getOptionalField(String metadataField, Optional<String> metadataValue, String configurationField, Optional<String> configurationValue)\n    {\n        if (configurationValue.isPresent()) {\n            if (!configurationValue.equals(metadataValue)) {\n                LOG.warn(\"Overriding \\\"%s=%s\\\" from OpenID metadata document with value \\\"%s=%s\\\" defined in configuration\",\n                        metadataField, metadataValue.orElse(\"\"), configurationField, configurationValue.orElse(\"\"));\n            }\n            return configurationValue;","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main/src/main/java/com/facebook/presto/server/security/oauth2/OidcDiscovery.java#L120-L156","documentation":"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.","triggerScenarios":"Thrown at presto-main/src/main/java/com/facebook/presto/server/security/oauth2/OidcDiscovery.java:138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}