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

feature request: Allow user-supplied request_id as HTTP header #2382

Closed
stevenscg opened this issue Feb 16, 2017 · 2 comments
Closed

feature request: Allow user-supplied request_id as HTTP header #2382

stevenscg opened this issue Feb 16, 2017 · 2 comments

Comments

@stevenscg
Copy link
Contributor

The request_id added with #1650 is great for tracing vault requests and responses.

It would be a great to be able to trace a request among and across services including vault (and consul and nomad - hopefully).

With my internal services, I have some HTTP middleware that checks for the HTTP header X-Request-ID (the specific header is actually configurable) on each incoming request.

If the header is found and meets some arbitrary length constraints, each service uses the provided value as the request_id internally. This value is written to the request and system logs and we use it to lookup a complete request chain in our centralized logging systems.

If the header is not found on the request, a UUID is generated just like vault does today.

At least for my own services, this was a very simple but very powerful way to support distributed tracing and help in debugging issues.

I can't think of any security issues with a feature like this, but if there were concerns, it might be reasonable to allow a vault administrator to specify the name of the HTTP header as part of their listener configuration to enable this feature.

@jefferai
Copy link
Member

You can already do this; in 0.6.5 you can set a list of headers that you want to appear in audit logs, including whether you want those values HMAC'd or not.

@stevenscg
Copy link
Contributor Author

stevenscg commented Feb 16, 2017

Works for me! Thanks Jeff.

Found it in the changelog and #2321. Excellent!

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

No branches or pull requests

2 participants