Skip to content

fix(gcp): report auth_file path instead of file contents in parse error#13409

Merged
shreemaan-abhishek merged 4 commits into
apache:masterfrom
shreemaan-abhishek:chore/gcp-auth-error-message
May 25, 2026
Merged

fix(gcp): report auth_file path instead of file contents in parse error#13409
shreemaan-abhishek merged 4 commits into
apache:masterfrom
shreemaan-abhishek:chore/gcp-auth-error-message

Conversation

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor

Description

The GCP secret backend (apisix/secret/gcp.lua) and the google-cloud-logging plugin both read a credentials file configured via auth_file. When that file fails to parse as JSON, the error message embedded the entire raw file content.

This change reports the configured auth_file path in the parse-failure message instead of the file content, making it consistent with the adjacent read-failure and schema-check error messages in the same functions. The underlying JSON decode error is still included.

Which issue(s) this PR fixes:

N/A

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 21, 2026
membphis
membphis previously approved these changes May 21, 2026
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels May 21, 2026
@shreemaan-abhishek
shreemaan-abhishek merged commit 9166556 into apache:master May 25, 2026
19 checks passed
wistefan pushed a commit to wistefan/apisix that referenced this pull request Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants