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

Backport of Events API uses consistent JSON serialization and error codes into release/1.13.x #19262

Conversation

hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #19246 to be assessed for backporting due to the inclusion of the label backport/1.13.x.

The below text is copied from the body of the original PR.


A couple of small tweaks for consistency:

  • UseProtoNames when serializing JSON fields to ensure we use underscores instead of proto3's default camel case to make us consistent with the rest of the Vault API. EDIT: Superseded by events: WS protobuf messages should be binary #19232 which changed to returning the cloud events formatted version of the event. I kept the additional test coverage though.
  • Return 403 for unauthorized requests

For illustration on the status codes:

$ curl --fail -H "X-Vault-Token: $(vault token create -policy=default -field=token)" http://127.0.0.1:8200/v1/sys/mounts
curl: (22) The requested URL returned error: 403

$ curl --fail http://127.0.0.1:8200/v1/sys/mounts
curl: (22) The requested URL returned error: 403

Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/events-api-json-and-status/literally-model-amoeba branch 2 times, most recently from bd43766 to 1130693 Compare February 20, 2023 16:24
@tomhjp tomhjp added this to the 1.13.0 milestone Feb 20, 2023
@tomhjp tomhjp merged commit 6e323b6 into release/1.13.x Feb 20, 2023
@tomhjp tomhjp deleted the backport/events-api-json-and-status/literally-model-amoeba branch February 20, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants