Skip to content

fix(rest): omit OAuth token type values from errors - #1079

Closed
zhjwpku wants to merge 1 commit into
apache:mainfrom
zhjwpku:fix/rest-oauth-token-response-errors
Closed

zhjwpku wants to merge 1 commit into
apache:mainfrom
zhjwpku:fix/rest-oauth-token-response-errors

Conversation

@zhjwpku

@zhjwpku zhjwpku commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

OAuth token response validation includes an unsupported token_type value in the returned error, allowing response-provided data to reach application logs. Omit that value while preserving the validation error kind and the allowed-type diagnostic. JSON parse errors already omit response values.

Add regression coverage through both client-credentials and token-exchange requests for malformed JSON, missing fields, wrong field types and invalid token types. The regression fails before the fix through both request paths.

Validation: REST suite (499 passed, 1 skipped), pre-commit, and clang-tidy on changed lines.

Keep server-provided token_type values out of validation errors while preserving the error kind and allowed-type diagnostic. Cover malformed responses through both FetchToken and ExchangeToken.
@zhjwpku zhjwpku closed this Nov 1, 2026
@zhjwpku zhjwpku reopened this Nov 1, 2026
zhjwpku added a commit to zhjwpku/iceberg-cpp that referenced this pull request Nov 1, 2026
Restore the upstream token-response parser and keep the targeted validation-error fix and regression coverage in PR apache#1079.
@zhjwpku zhjwpku closed this Nov 1, 2026
@zhjwpku
zhjwpku deleted the fix/rest-oauth-token-response-errors branch November 2, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant