-
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
Service identity injection to request payload #1256
Comments
This would be quite simple to implement, I would assume (at least for HTTP requests). We could be returning two headers:
And perhaps:
|
Just a couple of things to keep in mind when implementing this: If you want the full spiffie entry you can use https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto#extensions-filters-network-http-connection-manager-v3-httpconnectionmanager-setcurrentclientcertdetails and set the type to URI (side note: from my experience developers do not want the full spiffie entry, and making everyone parse that themselves is pointless). For the service name you have to manually extract it. The SAN URI part is available via Lua scripts, an example usage is here: https://github.com/allegro/envoy-control/blob/master/envoy-control-core/src/main/resources/lua/ingress_client_name_header.lua#L12 , but make sure you use Envoy version higher than 59e29685d33bd730c76ccb3b8383b666c0942523 (a couple of commits after Kuma identifies services by SAN URI: spiffe://{mesh}/{service} so additional question to @subnetmarco - by “service zone” name only you mean the first part of the URI “{mesh}“ right? |
Thanks for the pointers @slonka. We have already adopted envoy 1.16.1, so that should not be a problem. |
@nickolaev I'm sorry I was mistaken v1.16.1 was released |
I will work on this issue. |
@rucciva you can get service identity from the header
So you can parse this header, get I will come back to this feature the next week and I will implement headers proposed by @subnetmarco. @slonka thank you very much for your hints. They were very helpful. |
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. |
I think the issue is still open because the implementation was never completed. @jakubdyszkiewicz do you have more ctx? |
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. |
The issue is still open because this was not merged: #2158 (comment) right? |
+1 for finishing up the implementation of this functionality |
For these headers to be injected (edited) |
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
Shouldn't |
you're right, it just needs to be different than |
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
AFAIK this is solved (with the full entry, clients have to extract name manually), you just need to make sure you mark the app with protocol http/grpc. Closing, if something does not work please reopen. |
Summary
A service might implement a custom Accounting logic. Meanwhile in service mesh scenario, it is preferred to delegate Authentication and Authorization to the data plane, making the receiving service unaware of the caller identity. Thus it would be preferable if the caller identity can be made available to the receiving service, .e.g through HTTP header injection.
Steps To Reproduce
Additional Details & Logs
The text was updated successfully, but these errors were encountered: