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

Fold Ambassador auth functionality into ext_authz #2828

Closed
8 tasks
kflynn opened this issue Mar 15, 2018 · 7 comments
Closed
8 tasks

Fold Ambassador auth functionality into ext_authz #2828

kflynn opened this issue Mar 15, 2018 · 7 comments
Labels
enhancement Feature requests. Not bugs or questions.

Comments

@kflynn
Copy link
Contributor

kflynn commented Mar 15, 2018

Ambassador's auth filter (described in #2621) is deliberately more general than the authz mechanism embodied by external_auth.proto and implemented in #2417. After discussions between Envoy, Tigera, and Datawire folks, it seems that the best way forward is to fold Ambassador's auth functionality into the existing auth filter.

This issue will track the work of getting this done. We expect it to comprise multiple PRs, starting with a data-plane-api PR.

Description:

There are several tasks here:

The auth service needs to be able to control the response back to the downstream client on auth failure.

This should require enabling it in config, and currently will apply only to HTTP requests.

  • Extend external_auth.proto to allow the auth service to pass back HTTP status, headers, and body on failure
  • Extend filter config for opt-in to this functionality
  • Extend filter itself to pass back the response from the auth service on failure.

The auth service needs to be able to modify the request that continues downstream on success.

"Modifying the request" here means allowing the auth service to send back HTTP headers to inject into the request as it goes upstream. This will also apply only to HTTP requests, and only headers that have been whitelisted in config will be accepted for injected.

  • Extend external_auth.proto to allow the auth service to pass HTTP headers to inject on success.
  • Extend filter config to support whitelisting headers which may be injected.
  • Extend filter itself to modify the request going upstream on success (if requested)

The auth service needs to support raw HTTP requests to the auth service, rather than gRPC.

Only the HTTP method and headers will be passed to the auth service: no body will be passed, and no TLS and peer information will be passed (unless X-Forwarded-* headers are present). The HTTP Content-Length header will be forced to 0.

  • Extend filter config to support an encapsulation attribute, which will default to gRPC.
  • Extend filter itself to support raw HTTP if requested.
@mattklein123 mattklein123 added the enhancement Feature requests. Not bugs or questions. label Mar 15, 2018
htuch pushed a commit to envoyproxy/data-plane-api that referenced this issue Apr 2, 2018
…563)

This PR includes the necessary modifications in support of envoyproxy/envoy#2828.

Added additional configuration to ext_authz.proto so that the filter is able to call an HTTP/1.1 authorization service.

In external_auth.proto, added a nested message to CheckResponse that allows the authorization service to pass additional HTTP response attributes back to the authz filter.

Signed-off-by: Gabriel <gsagula@gmail.com>
@stale
Copy link

stale bot commented Jun 19, 2018

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Jun 19, 2018
@kflynn
Copy link
Contributor Author

kflynn commented Jun 19, 2018

#3162 is progressing through review. I'll make a pass probably tomorrow AM over the checklist above.

@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label Jun 19, 2018
htuch pushed a commit that referenced this issue Jun 27, 2018
This PR extends the current Ext_Authz filter to allow optional HTTP attributes being passed from the Authorization service down to client or, to the upstream services. I would like to get some feedback on the changes to the current gRPC async client and filter before moving to implementation of HTTP part of this extension and tests.

*issue: #2828

Risk Level: Medium
Testing: Manual, unit testing.
Docs Changes: envoyproxy/data-plane-api#563

Signed-off-by: Gabriel <gsagula@gmail.com>
@stale
Copy link

stale bot commented Jul 19, 2018

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Jul 19, 2018
@richarddli
Copy link
Member

cc: @gsagula

@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label Jul 20, 2018
@gsagula
Copy link
Member

gsagula commented Jul 20, 2018

@richarddli Except with one issue in the raw HTTP auth client, the #2828 is done.

Please, see Matt's comment about the current raw HTTP client approach #3888.

@mattklein123
Copy link
Member

OK let's close this and we can track addition work as individual issues. Thank you all!

@kflynn
Copy link
Contributor Author

kflynn commented Jul 20, 2018

Thanks all! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests. Not bugs or questions.
Projects
None yet
Development

No branches or pull requests

4 participants