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

Create ServerErrCh to surface server errors back to caller. #1897

Merged
merged 5 commits into from
Mar 19, 2024

Conversation

divyaac
Copy link
Contributor

@divyaac divyaac commented Mar 18, 2024

Creates a channel, ServerErrCh that will surface server errors back to the caller. This channel will hold a maximum of one error at a time.

The purpose of this, is to allow Vault Agent and Vault Proxy to re-authenticate if the error message from the server indicates that the token is an "invalid token". More information on this initiative here: https://hermes.hashicorp.services/document/1yTtWJEvyoYLPkYRQ3lxs6dHmqAVyC177BMEBEXuu8fE?draft=false

@divyaac divyaac force-pushed the VAULT-23741_Surface_Server_Error_To_Vault_Agent branch 2 times, most recently from f881db1 to 78343c7 Compare March 18, 2024 18:42
Create a channel to surface error from server

Created a channel to surface server errors

Create a channel to surface error from server

Dummy commit

Edited linters

Edited runner initialization
@divyaac divyaac force-pushed the VAULT-23741_Surface_Server_Error_To_Vault_Agent branch from 78343c7 to 70ede88 Compare March 18, 2024 18:50
Copy link
Contributor

@VioletHynes VioletHynes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I have some minor comments, but none are blocking.

A test would be great, but I think it would be difficult to test this in consul-template directly and we should be able to have plenty of Agent tests around this, so I don't see that as blocking either!

watch/watcher.go Outdated Show resolved Hide resolved
manager/runner.go Outdated Show resolved Hide resolved
watch/view_test.go Outdated Show resolved Hide resolved
divyaac and others added 3 commits March 18, 2024 12:06
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
@divyaac divyaac merged commit 6830525 into main Mar 19, 2024
54 checks passed
@divyaac divyaac deleted the VAULT-23741_Surface_Server_Error_To_Vault_Agent branch March 19, 2024 00:02
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