-
Notifications
You must be signed in to change notification settings - Fork 335
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
feat(kuma-cp) add service identity injection #2158
feat(kuma-cp) add service identity injection #2158
Conversation
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
I haven't reviewed this, but a couple of notes
|
|
dfec4fa
to
b2b6f91
Compare
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Is there already a convention for this that other Envoy-based proxies use? It's better to be consistent with the broader ecosystem if there's something to be consistent with :) |
For example, |
This looks like good direction. Is there a chance to extract all uri sans from the cert (by not using x-forwarded-client-cert but some other structure)? |
I don't know, but I will investigate how is it solved in other projects. |
Cool. I don't know, but I suspect it can be done somehow... I will dive deeper into capabilities of the Lua filters. |
I found a way to extract all URI SANs from a cert: I tested this function and it returned a spiffe entry and all kuma tags. So it will be possible to forward |
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
ac7b48a
to
7b64afe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me
I have to fix e2e tests. It seems that my changes affected existing tests. |
Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
OK, let me summarize the slack discussion :)
So I think that this means we have consensus for
I'd like to see a very prominent comment in the implementation that the service identity semantics depends on Kuma configuring I'd also like to see explicit config to remove these headers in the virtual host @jakubdyszkiewicz suggested that all the service tags should be reflected into header. While I think this is a good idea, I don't see an Envoy API to remove headers that match a prefix, so I'm not sure how we can make the guarantees we need if we do this. We could file a separate issue for this and tackle it with a custom Envoy filter though. |
I checked that Envoy always applies |
Ok, lets start with just |
@jewertow is this something you are still planning on working on? |
I'm sorry that I didn't close it yet. Currently I have no time to work on this pull request. |
Signed-off-by: Jacek Ewertowski jacek.ewertowski1@gmail.com
Summary
This pull request is a continuation of #1941. This change introduces forwarding headers:
X-Kuma-Forwarded-Client-Cert
X-Kuma-Forwarded-Client-Service
X-Kuma-Forwarded-Client-Zone
These headers contain data extracted from a downstream SSL connection details in the Lua filter.
Issues resolved
Fix #1256
Testing
I created a repository with a set of configurations that allow to quickly test this feature manually. To do this, follow instructions defined here.