feat: Add HTTP support for External Auth#4994
Conversation
|
Hi @clayton-gonsalves! Welcome to our community and thank you for opening your first Pull Request. Someone will review it soon. Thank you for committing to making Contour better. You can also join us on our mailing list and in our channel in the Kubernetes Slack Workspace |
0cb4efc to
384194a
Compare
384194a to
8b98559
Compare
8b98559 to
e68014c
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4994 +/- ##
==========================================
- Coverage 78.02% 77.87% -0.16%
==========================================
Files 138 138
Lines 17545 17677 +132
==========================================
+ Hits 13690 13766 +76
- Misses 3591 3646 +55
- Partials 264 265 +1
|
d5b8150 to
1669f31
Compare
|
@clayton-gonsalves just wanted to let you know I'm working through review here, but you may not see comments until next week. Thanks for the patience! |
|
Thank you, @skriss. |
skriss
left a comment
There was a problem hiding this comment.
Thanks again for the PR and the patience @clayton-gonsalves! Overall this looks good; I have some suggestions for simplifying a few things. I may have a few more minor comments down the road but I think this covers the bulk of the bigger stuff. Let me know if anything is unclear or doesn't make sense to you, happy to discuss more.
440143e to
383d7e9
Compare
|
@skriss Thanks for the review; I have addressed all but one of the comments left by you. Happy to chat about the test case and how to address it. |
skriss
left a comment
There was a problem hiding this comment.
Thanks for the updates @clayton-gonsalves, couple more comments
d294d8a to
ce2aea7
Compare
|
@clayton-gonsalves I'm going to take one more pass through this tomorrow but I think it's looking pretty good. @sunjayBhatia will take another look as well. Thanks again for all your work on this! |
sunjayBhatia
left a comment
There was a problem hiding this comment.
still running some stuff locally and reading tests but some small changes to make
ce2aea7 to
14084c0
Compare
sunjayBhatia
left a comment
There was a problem hiding this comment.
some testing and doc nits but looks great overall!
|
|
||
| ### Overriding global external authorization for a virtual host | ||
|
|
||
| Sometimes you may want a different configuration than what is defined globally. To override the global external authorization, add the `authorization` block to your HTTPProxy as shown below |
There was a problem hiding this comment.
maybe note here which things can be overridden by HTTP vs HTTPS vhosts (i.e. you can't change auth server on an HTTP vhost)
There was a problem hiding this comment.
Modified the heading and added a note at the bottom of the section
|
should be able to merge main/rebase to fix spellcheck |
14084c0 to
5a3a6d5
Compare
Closes projectcontour#4954. Signed-off-by: claytonig <claytonivorgonsalves@gmail.com> Address review comments Signed-off-by: claytonig <claytonivorgonsalves@gmail.com>
Signed-off-by: claytonig <claytonivorgonsalves@gmail.com>
Signed-off-by: claytonig <claytonivorgonsalves@gmail.com>
5a3a6d5 to
dd6a8b5
Compare
skriss
left a comment
There was a problem hiding this comment.
This LGTM, thanks for all the work on it @clayton-gonsalves! Will leave for @sunjayBhatia.
Support globally configuring an external auth server which is enabled by default for all vhosts, both HTTP and HTTPS. Closes projectcontour#4954. Signed-off-by: claytonig <claytonivorgonsalves@gmail.com>
Support globally configuring an external auth server which is enabled by default for all vhosts, both HTTP and HTTPS. Closes projectcontour#4954. Signed-off-by: claytonig <claytonivorgonsalves@gmail.com> Signed-off-by: yy <yang.yang@daocloud.io>
Signed-off-by: yy <yang.yang@daocloud.io> add some unit test Signed-off-by: yy <yang.yang@daocloud.io> git rebase Signed-off-by: yy <yang.yang@daocloud.io> expose configuration for envoy's RateLimitedAsResourceExhausted (projectcontour#4971) The Rate Limit filter in Envoy translates a 429 HTTP response code to UNAVAILABLE as specified in the gRPC mapping document, but Google recommends translating it to RESOURCE_EXHAUSTED (see https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md) This commit introduces a new setting to allow contour to forward the same parameter introduced in envoyproxy/envoy#4879 The default value is disabled to retain the original behaviour of returning UNAVAILABLE, as changing it would be a breaking change. Closes projectcontour#4901. Signed-off-by: Víctor Roldán Betancort <vroldanbet@authzed.com> Signed-off-by: yy <yang.yang@daocloud.io> rebase Signed-off-by: yy <yang.yang@daocloud.io> update tracing config validate Signed-off-by: yy <yang.yang@daocloud.io> make generate Signed-off-by: yy <yang.yang@daocloud.io> add chengelog Signed-off-by: yy <yang.yang@daocloud.io> update make general Signed-off-by: yy <yang.yang@daocloud.io> goimport Signed-off-by: yy <yang.yang@daocloud.io> update tracing Signed-off-by: yy <yang.yang@daocloud.io> fix golint Signed-off-by: yy <yang.yang@daocloud.io> update test Signed-off-by: yy <yang.yang@daocloud.io> delete unused code Signed-off-by: yy <yang.yang@daocloud.io> delete error file Signed-off-by: yy <yang.yang@daocloud.io> update changelog Signed-off-by: yy <yang.yang@daocloud.io> fix some mistake Signed-off-by: yy <yang.yang@daocloud.io> feat: Add HTTP support for External Auth (projectcontour#4994) Support globally configuring an external auth server which is enabled by default for all vhosts, both HTTP and HTTPS. Closes projectcontour#4954. Signed-off-by: claytonig <claytonivorgonsalves@gmail.com> Signed-off-by: yy <yang.yang@daocloud.io> refactor DAG and DAG consumers to support >2 Listeners (projectcontour#5128) Updates projectcontour#4960. Signed-off-by: Steve Kriss <krisss@vmware.com> Signed-off-by: yy <yang.yang@daocloud.io> resolve conflict Signed-off-by: yy <yang.yang@daocloud.io> fix Signed-off-by: yy <yang.yang@daocloud.io>
Signed-off-by: yy <yang.yang@daocloud.io> add some unit test Signed-off-by: yy <yang.yang@daocloud.io> git rebase Signed-off-by: yy <yang.yang@daocloud.io> expose configuration for envoy's RateLimitedAsResourceExhausted (projectcontour#4971) The Rate Limit filter in Envoy translates a 429 HTTP response code to UNAVAILABLE as specified in the gRPC mapping document, but Google recommends translating it to RESOURCE_EXHAUSTED (see https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md) This commit introduces a new setting to allow contour to forward the same parameter introduced in envoyproxy/envoy#4879 The default value is disabled to retain the original behaviour of returning UNAVAILABLE, as changing it would be a breaking change. Closes projectcontour#4901. Signed-off-by: Víctor Roldán Betancort <vroldanbet@authzed.com> Signed-off-by: yy <yang.yang@daocloud.io> rebase Signed-off-by: yy <yang.yang@daocloud.io> update tracing config validate Signed-off-by: yy <yang.yang@daocloud.io> make generate Signed-off-by: yy <yang.yang@daocloud.io> add chengelog Signed-off-by: yy <yang.yang@daocloud.io> update make general Signed-off-by: yy <yang.yang@daocloud.io> goimport Signed-off-by: yy <yang.yang@daocloud.io> update tracing Signed-off-by: yy <yang.yang@daocloud.io> fix golint Signed-off-by: yy <yang.yang@daocloud.io> update test Signed-off-by: yy <yang.yang@daocloud.io> delete unused code Signed-off-by: yy <yang.yang@daocloud.io> delete error file Signed-off-by: yy <yang.yang@daocloud.io> update changelog Signed-off-by: yy <yang.yang@daocloud.io> fix some mistake Signed-off-by: yy <yang.yang@daocloud.io> feat: Add HTTP support for External Auth (projectcontour#4994) Support globally configuring an external auth server which is enabled by default for all vhosts, both HTTP and HTTPS. Closes projectcontour#4954. Signed-off-by: claytonig <claytonivorgonsalves@gmail.com> Signed-off-by: yy <yang.yang@daocloud.io> refactor DAG and DAG consumers to support >2 Listeners (projectcontour#5128) Updates projectcontour#4960. Signed-off-by: Steve Kriss <krisss@vmware.com> Signed-off-by: yy <yang.yang@daocloud.io> resolve conflict Signed-off-by: yy <yang.yang@daocloud.io> fix Signed-off-by: yy <yang.yang@daocloud.io>
This change adds external authorization support for HTTP upstreams.
Fixes: #4954
Signed-off-by: Clayton Gonsalves claytonivorgonsalves@gmail.com