-
Notifications
You must be signed in to change notification settings - Fork 351
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
filters/auth: add token validator filter #3126
Conversation
f1f25e6
to
4b6060f
Compare
304caa2
to
4179657
Compare
4179657
to
a53b42d
Compare
👍 |
1 similar comment
👍 |
|
||
> This filter is experimental and may change in the future, please see tests for example usage. | ||
|
||
The filter obtains token info and allows request if there was no error |
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.
We used tokeninfo as tool name, so it might make sense to stay with tokeninfo here and not use "token info".
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.
Its an info about token which it obtains. We also use "token info" in a few other places.
The `oauthTokeninfoValidate` filter obtains token info and allows request if there was no error otherwise it responds with `401 Unauthorized` status and configured response body. It does nothing if any preceding filter already validated the token or if route is annotated with configured annotations. It is useful as a default filter to ensure each request has a valid token. Since its logic is diffrent from existing oauthTokeninfo* filters it is implemented as a separate filter type. Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
a53b42d
to
cc53a8d
Compare
👍 |
1 similar comment
👍 |
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 diff zalando/skipper@v0.21.124...v0.21.133
…-version skipper: update canary version to v0.21.133 * build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 diff zalando/skipper@v0.21.124...v0.21.133
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 diff zalando/skipper@v0.21.124...v0.21.133 depends on #7757
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 diff zalando/skipper@v0.21.124...v0.21.133 depends on #7757
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 * Revert "Facilitate OPA decision correlation with business flows (#3041)": zalando/skipper#3138 * build(deps): bump docker/build-push-action from 6.1.0 to 6.2.0: zalando/skipper#3134 * dependabot: group GoLang dependencies update: zalando/skipper#3136 * build(deps): bump github.com/open-policy-agent/opa from 0.65.0 to 0.66.0: zalando/skipper#3135 * build(deps): bump amazonlinux from `b0016cb` to `5bf7910` in /fuzz: zalando/skipper#3133 * metrics: refactor prometheus metric registration: zalando/skipper#3132 diff zalando/skipper@v0.21.124...v0.21.139 depends on #7786
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 * Revert "Facilitate OPA decision correlation with business flows (#3041)": zalando/skipper#3138 * build(deps): bump docker/build-push-action from 6.1.0 to 6.2.0: zalando/skipper#3134 * dependabot: group GoLang dependencies update: zalando/skipper#3136 * build(deps): bump github.com/open-policy-agent/opa from 0.65.0 to 0.66.0: zalando/skipper#3135 * build(deps): bump amazonlinux from `b0016cb` to `5bf7910` in /fuzz: zalando/skipper#3133 * metrics: refactor prometheus metric registration: zalando/skipper#3132 diff zalando/skipper@v0.21.124...v0.21.139 depends on #7786
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 * Revert "Facilitate OPA decision correlation with business flows (#3041)": zalando/skipper#3138 * build(deps): bump docker/build-push-action from 6.1.0 to 6.2.0: zalando/skipper#3134 * dependabot: group GoLang dependencies update: zalando/skipper#3136 * build(deps): bump github.com/open-policy-agent/opa from 0.65.0 to 0.66.0: zalando/skipper#3135 * build(deps): bump amazonlinux from `b0016cb` to `5bf7910` in /fuzz: zalando/skipper#3133 * metrics: refactor prometheus metric registration: zalando/skipper#3132 diff zalando/skipper@v0.21.124...v0.21.139 depends on #7786
The
oauthTokeninfoValidate
filter obtains token info and allows request if there was no error otherwise it responds with401 Unauthorized
status and configured response body.It does nothing if any preceding filter already validated the token or if route is annotated with configured annotations.
It is useful as a default filter to ensure each request has a valid token.
Since its logic is diffrent from existing oauthTokeninfo* filters it is implemented as a separate filter type.