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

External Authorization #2392

Closed
wants to merge 31 commits into from
Closed

Conversation

zhaohuabing
Copy link
Member

This PR continues the work by @akhenakh in #2313 to add per-route external authorization support.

Related: #1059

@zhaohuabing zhaohuabing requested a review from a team as a code owner January 3, 2024 03:38
@zhaohuabing zhaohuabing marked this pull request as draft January 3, 2024 03:38
Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Attention: 96 lines in your changes are missing coverage. Please review.

Comparison is base (90f1905) 64.64% compared to head (fd334c1) 64.59%.
Report is 24 commits behind head on main.

❗ Current head fd334c1 differs from pull request most recent head d2fae5a. Consider uploading reports for the commit d2fae5a to get more accurate results

Files Patch % Lines
internal/xds/translator/ext_authz.go 64.08% 44 Missing and 21 partials ⚠️
internal/ir/zz_generated.deepcopy.go 0.00% 13 Missing and 1 partial ⚠️
internal/gatewayapi/securitypolicy.go 54.54% 8 Missing and 2 partials ⚠️
internal/ir/xds.go 50.00% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2392      +/-   ##
==========================================
- Coverage   64.64%   64.59%   -0.05%     
==========================================
  Files         114      115       +1     
  Lines       16618    16858     +240     
==========================================
+ Hits        10742    10889     +147     
- Misses       5197     5265      +68     
- Partials      679      704      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: huabing zhao <[email protected]>
}

// TLSConfig describes a TLS configuration.
type TLSConfig struct {
Copy link
Member Author

Choose a reason for hiding this comment

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

This can be used for other external services as well, e.g, jwt providers.

@zhaohuabing zhaohuabing requested a review from arkodg January 11, 2024 05:25
Signed-off-by: huabing zhao <[email protected]>
// TLS defines the TLS configuration for the gRPC External Authorization service.
// Note: If not specified, the proxy will talk to the gRPC External
// Authorization service in plaintext.
TLS *TLSConfig `json:"tlsSettings,omitempty" yaml:"tlsSettings"`
Copy link
Member Author

Choose a reason for hiding this comment

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

The existence of TLS indicates that the Envoy should talk to the GRPC service with tls.

)

// ExtAuth defines the configuration for External Authorization.
type ExtAuth struct {
Copy link
Member Author

Choose a reason for hiding this comment

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

@arkodg @envoyproxy/gateway-maintainers Could you please take a look at the ext auth API? I'd like to reach agreement on the API before moving forward with this

Copy link
Contributor

Choose a reason for hiding this comment

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

can you open an API only PR so that PR can be marked as ready and can be reviewed by others as well ? tia

Copy link
Member Author

Choose a reason for hiding this comment

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

@zhaohuabing
Copy link
Member Author

Close this one because the commit history is a bit messy and it's hard to rebase/merge.

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.

3 participants