-
Notifications
You must be signed in to change notification settings - Fork 31
feat(dir/dirctl/helm): add Envoy external authorization with multi-provider authentication #807
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
base: main
Are you sure you want to change the base?
Conversation
aa9ec3b to
2a4e183
Compare
|
The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).
|
|
Test mock server for local development only. Intentionally logs HTTP headers and user input to verify Envoy |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
256709c to
611165a
Compare
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
|
@tkircsi did you manage to find any existing implementations for ext_authz service that works with OAuth2? AFAIR we discussed that we can drop the org/gh implementation for a generic one and configure the authz rules outside of the service itself but through configs |
|
@ramizpolic I investigated whether we could replace our custom |
paralta
left a comment
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.
a couple of comments on the cli changes, will continue with the other parts
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
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.
client code looks good overall 👍
However, the OAuth code (oauth_web.go, oauth_device.go, token_cache.go) talks to GitHub, not the Directory server, so I think it does not really belong in the Dir client module. I would suggest moving to auth/client.
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
paralta
left a comment
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.
Regarding the auth changes, the three modules under this folder (authprovider, authzserver, cmd/envoy-authz) are tightly coupled. I think it would be simpler to have a single module with subpackages, WDYT?
|
That's a good idea, and I agree. But let's wait for the OIDC provider PoC, because with the OIDC provider (Zitadel(or other) + Envoy) solution, the entire |
Implements a production-ready Envoy ExtAuthz solution for authenticating dirctl users via GitHub OAuth2 while maintaining SPIFFE mTLS for service-to-service communication.
New Components
Authentication Provider Framework
auth/authprovider/github.com/google/go-github/v50Envoy ExtAuthz Service
auth/authzserver/implementing Envoy ext_authz gRPC API (v3)auth/cmd/envoy-authz/main service with environment-based configurationdirctl CLI Enhancements
dirctl auth login- GitHub OAuth (Device Flow default, Web Flow with--web)dirctl auth status- Show authentication status and validate tokendirctl auth logout- Clear cached credentials~/.config/dirctl/--auth-tokenflag orDIRECTORY_CLIENT_TOKENenv varDeployment & Infrastructure
install/charts/envoy-authz/dirHelm chart (disabled by default)docker-bake.hclfor image buildsKey Features
DIRECTORY_CLIENT_TOKEN)Module Structure
New independent modules in
auth/directory:auth/authprovider/- Provider interface and GitHub implementationauth/authzserver/- ExtAuthz gRPC serverauth/cmd/envoy-authz/- Main service with Dockerfile