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: WS protobuf messages should be binary into release/1.13.x #19256

Merged

Conversation

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

Backport

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

WARNING automatic cherry-pick of commits failed. Commits will require human attention.

merge conflict error: POST https://api.github.com/repos/hashicorp/vault/merges: 409 Merge conflict []

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


The WebSockets spec states that text messages must be valid UTF-8 encoded strings, which protobuf messages virtually never are.

This instead correctly sends the protobuf events as binary messages.


Overview of commits

@hashicorp-cla
Copy link

hashicorp-cla commented Feb 17, 2023

CLA assistant check
All committers have signed the CLA.

@swenson swenson force-pushed the backport/websocket-binary/optionally-factual-mosquito branch from ae6873b to 4944581 Compare February 17, 2023 19:42
The [WebSockets spec](https://www.rfc-editor.org/rfc/rfc6455) states
that text messages must be valid UTF-8 encoded strings, which protobuf
messages virtually never are. This now correctly sends the protobuf events
as binary messages.

We change the format to correspond to CloudEvents, as originally intended,
and remove a redundant timestamp and newline.

We also bump the eventlogger to fix a race condition that this code triggers.
@swenson swenson force-pushed the backport/websocket-binary/optionally-factual-mosquito branch from 4944581 to 491e218 Compare February 17, 2023 19:48
@swenson swenson marked this pull request as ready for review February 17, 2023 19:48
@swenson
Copy link
Contributor

swenson commented Feb 17, 2023

Conflict was just in go.sum.

@swenson swenson added this to the 1.13.0 milestone Feb 17, 2023
@swenson swenson enabled auto-merge (squash) February 17, 2023 19:49
@swenson swenson merged commit c9eb3c7 into release/1.13.x Feb 17, 2023
@swenson swenson deleted the backport/websocket-binary/optionally-factual-mosquito branch February 17, 2023 20:59
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.

3 participants