Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add 'obfuscate_validation_errors' option to hide details about configured limits #18

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

rickbijkerk
Copy link
Collaborator

introduce option: 'obfuscate_validation_errors' to obfuscate errors

Before:

{
  "data": {},
  "errors": [
    {
      "message": "operation has exceeded maximum tokens. found [8], max [1]"
    }
  ]
}

after:

{
  "data": {},
  "errors": [
    {
      "message": "Error(s) redacted"
    }
  ]
}

@ldebruijn
Copy link
Owner

I get wanting to obfuscate errors, seems like a logical addition.

Does it make sense to add this as a global property, or rather as a setting per rule?

@rickbijkerk
Copy link
Collaborator Author

rickbijkerk commented Jan 10, 2024

i'd say global as from security perspective on a public api you should always enable obfuscation.
Also i dont see a usecase to split it up atm, if we really see case for it in the future we can always split it up further

cmd/main.go Outdated Show resolved Hide resolved
cmd/main.go Outdated Show resolved Hide resolved
@ldebruijn ldebruijn merged commit 717be30 into main Jan 10, 2024
2 checks passed
@ldebruijn ldebruijn deleted the feature/option_to_obfuscate_errors branch January 10, 2024 15:06
ldebruijn pushed a commit that referenced this pull request Jan 23, 2024
…ured limits (#18)

Add configuration option: 'obfuscate_validation_errors' to obfuscate errors

---------

Co-authored-by: Rick Bijkerk <[email protected]>
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.

2 participants