You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/07/02 09:37:53 UTC
[GitHub] [apisix] hf400159 opened a new pull request, #7371: docs: update openid-connect attributes description and sync CN doc attributes.
hf400159 opened a new pull request, #7371:
URL: https://github.com/apache/apisix/pull/7371
### Description
update openid-connect attributes description and add CN doc attributes.
The default value of `introspection_endpoint_auth_method` is not "client_secret_basic" used, but the first value in well_know is used by default.
<!-- Please include a summary of the change and which issue is fixed. -->
<!-- Please also include relevant motivation and context. -->
Fixes # (issue)
### Checklist
- [ ] I have explained the need for this PR and the problem it solves
- [ ] I have explained the changes or the new features added to this PR
- [ ] I have added tests corresponding to this change
- [ ] I have updated the documentation to reflect this change
- [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
<!--
Note
1. Mark the PR as draft until it's ready to be reviewed.
2. Always add/update tests for any changes unless you have a good reason.
3. Always update the documentation to reflect the changes made in the PR.
4. Make a new commit to resolve conversations instead of `push -f`.
5. To resolve merge conflicts, merge master instead of rebasing.
6. Use "request review" to notify the reviewer after making changes.
7. Only a reviewer can mark a conversation as resolved.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] hf400159 commented on a diff in pull request #7371: docs: update openid-connect attributes description and sync CN doc attributes.
Posted by GitBox <gi...@apache.org>.
hf400159 commented on code in PR #7371:
URL: https://github.com/apache/apisix/pull/7371#discussion_r913318158
##########
docs/en/latest/plugins/openid-connect.md:
##########
@@ -33,29 +33,29 @@ The `openid-connect` Plugin provides authentication and introspection capability
## Attributes
-| Name | Type | Required | Default | Valid values | Description |
-|--------------------------------------|---------|----------|-----------------------|--------------|--------------------------------------------------------------------------------------------------------------------|
-| client_id | string | True | | | OAuth client ID. |
-| client_secret | string | True | | | OAuth client secret. |
-| discovery | string | True | | | Discovery endpoint URL of the identity server. |
-| scope | string | False | "openid" | | Scope used for authentication. |
-| realm | string | False | "apisix" | | Realm used for authentication. |
-| bearer_only | boolean | False | false | | When set to true, the Plugin will check for if the authorization header in the request matches a bearer token. |
-| logout_path | string | False | "/logout" | | Path for logging out. |
-| post_logout_redirect_uri | string | False | | | URL to redirect to after logging out. |
-| redirect_uri | string | False | "ngx.var.request_uri" | | URI to which the identity provider redirects back to. |
-| timeout | integer | False | 3 | [1,...] | Request timeout time in seconds. |
-| ssl_verify | boolean | False | false | | When set to true, verifies the identity provider's SSL certificates. |
-| introspection_endpoint | string | False | | | URL of the token verification endpoint of the identity server. |
-| introspection_endpoint_auth_method | string | False | "client_secret_basic" | | Authentication method name for token introspection. |
-| public_key | string | False | | | Public key to verify the token. |
-| use_jwks | boolean | False | | | When set to true, uses the JWKS endpoint of the identity server to verify the token. |
-| token_signing_alg_values_expected | string | False | | | Algorithm used for signing the authentication token. |
-| set_access_token_header | boolean | False | true | | When set to true, sets the access token in a request header. |
-| access_token_in_authorization_header | boolean | False | false | | When set to true, sets the access token in the `Authorization` header. Otherwise, set the `X-Access-Token` header. |
-| set_id_token_header | boolean | False | true | | When set to true and the ID token is available, sets the ID token in the `X-ID-Token` request header. |
-| set_userinfo_header | boolean | False | true | | When set to true and the UserInfo object is available, sets it in the `X-Userinfo` request header. |
-| set_refresh_token_header | boolean | False | false | | When set to true and a refresh token object is available, sets it in the `X-Refresh-Token` request header. |
+| Name | Type | Required | Default | Valid values | Description |
+|--------------------------------------|---------|----------|-----------------------|--------------|--------------------------------------------------------------------------------------------------------------------------|
+| client_id | string | True | | | OAuth client ID. |
+| client_secret | string | True | | | OAuth client secret. |
+| discovery | string | True | | | Discovery endpoint URL of the identity server. |
+| scope | string | False | "openid" | | Scope used for authentication. |
+| realm | string | False | "apisix" | | Realm used for authentication. |
+| bearer_only | boolean | False | false | | When set to true, the Plugin will check for if the authorization header in the request matches a bearer token. |
+| logout_path | string | False | "/logout" | | Path for logging out. |
+| post_logout_redirect_uri | string | False | | | URL to redirect to after logging out. |
+| redirect_uri | string | False | "ngx.var.request_uri" | | URI to which the identity provider redirects back to. |
+| timeout | integer | False | 3 | [1,...] | Request timeout time in seconds. |
+| ssl_verify | boolean | False | false | | When set to true, verifies the identity provider's SSL certificates. |
+| introspection_endpoint | string | False | | | URL of the token verification endpoint of the identity server. |
+| introspection_endpoint_auth_method | string | False | | | Authentication method name for token introspection, If not specified, the default will use the first value in well_know. |
Review Comment:
@starsz fixed. PTAL 😄
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] starsz commented on a diff in pull request #7371: docs: update openid-connect attributes description and sync CN doc attributes.
Posted by GitBox <gi...@apache.org>.
starsz commented on code in PR #7371:
URL: https://github.com/apache/apisix/pull/7371#discussion_r913087982
##########
docs/en/latest/plugins/openid-connect.md:
##########
@@ -33,29 +33,29 @@ The `openid-connect` Plugin provides authentication and introspection capability
## Attributes
-| Name | Type | Required | Default | Valid values | Description |
-|--------------------------------------|---------|----------|-----------------------|--------------|--------------------------------------------------------------------------------------------------------------------|
-| client_id | string | True | | | OAuth client ID. |
-| client_secret | string | True | | | OAuth client secret. |
-| discovery | string | True | | | Discovery endpoint URL of the identity server. |
-| scope | string | False | "openid" | | Scope used for authentication. |
-| realm | string | False | "apisix" | | Realm used for authentication. |
-| bearer_only | boolean | False | false | | When set to true, the Plugin will check for if the authorization header in the request matches a bearer token. |
-| logout_path | string | False | "/logout" | | Path for logging out. |
-| post_logout_redirect_uri | string | False | | | URL to redirect to after logging out. |
-| redirect_uri | string | False | "ngx.var.request_uri" | | URI to which the identity provider redirects back to. |
-| timeout | integer | False | 3 | [1,...] | Request timeout time in seconds. |
-| ssl_verify | boolean | False | false | | When set to true, verifies the identity provider's SSL certificates. |
-| introspection_endpoint | string | False | | | URL of the token verification endpoint of the identity server. |
-| introspection_endpoint_auth_method | string | False | "client_secret_basic" | | Authentication method name for token introspection. |
-| public_key | string | False | | | Public key to verify the token. |
-| use_jwks | boolean | False | | | When set to true, uses the JWKS endpoint of the identity server to verify the token. |
-| token_signing_alg_values_expected | string | False | | | Algorithm used for signing the authentication token. |
-| set_access_token_header | boolean | False | true | | When set to true, sets the access token in a request header. |
-| access_token_in_authorization_header | boolean | False | false | | When set to true, sets the access token in the `Authorization` header. Otherwise, set the `X-Access-Token` header. |
-| set_id_token_header | boolean | False | true | | When set to true and the ID token is available, sets the ID token in the `X-ID-Token` request header. |
-| set_userinfo_header | boolean | False | true | | When set to true and the UserInfo object is available, sets it in the `X-Userinfo` request header. |
-| set_refresh_token_header | boolean | False | false | | When set to true and a refresh token object is available, sets it in the `X-Refresh-Token` request header. |
+| Name | Type | Required | Default | Valid values | Description |
+|--------------------------------------|---------|----------|-----------------------|--------------|--------------------------------------------------------------------------------------------------------------------------|
+| client_id | string | True | | | OAuth client ID. |
+| client_secret | string | True | | | OAuth client secret. |
+| discovery | string | True | | | Discovery endpoint URL of the identity server. |
+| scope | string | False | "openid" | | Scope used for authentication. |
+| realm | string | False | "apisix" | | Realm used for authentication. |
+| bearer_only | boolean | False | false | | When set to true, the Plugin will check for if the authorization header in the request matches a bearer token. |
+| logout_path | string | False | "/logout" | | Path for logging out. |
+| post_logout_redirect_uri | string | False | | | URL to redirect to after logging out. |
+| redirect_uri | string | False | "ngx.var.request_uri" | | URI to which the identity provider redirects back to. |
+| timeout | integer | False | 3 | [1,...] | Request timeout time in seconds. |
+| ssl_verify | boolean | False | false | | When set to true, verifies the identity provider's SSL certificates. |
+| introspection_endpoint | string | False | | | URL of the token verification endpoint of the identity server. |
+| introspection_endpoint_auth_method | string | False | | | Authentication method name for token introspection, If not specified, the default will use the first value in well_know. |
Review Comment:
After digging it into.I found that:
1. The default value of `introspection_endpoint_auth_method` is "client_secret_basic", sorry to @hf400159 .
2. And the `lua-resty-openidc` will use another conf called "token_endpoint_auth_method".It doesn't introduce in the docs, but it can work well in "openid-connection" plugin.
The default value of "token_endpoint_auth_method" will fetch the first supported method specified by the OP.
refer https://github.com/zmartzone/lua-resty-openidc/blob/master/lib/resty/openidc.lua#L677
So in conclusion, I think we should keep the original doc, and add the new filed of "token_endpoint_auth_method" to the docs.
##########
docs/en/latest/plugins/openid-connect.md:
##########
@@ -33,29 +33,29 @@ The `openid-connect` Plugin provides authentication and introspection capability
## Attributes
-| Name | Type | Required | Default | Valid values | Description |
-|--------------------------------------|---------|----------|-----------------------|--------------|--------------------------------------------------------------------------------------------------------------------|
-| client_id | string | True | | | OAuth client ID. |
-| client_secret | string | True | | | OAuth client secret. |
-| discovery | string | True | | | Discovery endpoint URL of the identity server. |
-| scope | string | False | "openid" | | Scope used for authentication. |
-| realm | string | False | "apisix" | | Realm used for authentication. |
-| bearer_only | boolean | False | false | | When set to true, the Plugin will check for if the authorization header in the request matches a bearer token. |
-| logout_path | string | False | "/logout" | | Path for logging out. |
-| post_logout_redirect_uri | string | False | | | URL to redirect to after logging out. |
-| redirect_uri | string | False | "ngx.var.request_uri" | | URI to which the identity provider redirects back to. |
-| timeout | integer | False | 3 | [1,...] | Request timeout time in seconds. |
-| ssl_verify | boolean | False | false | | When set to true, verifies the identity provider's SSL certificates. |
-| introspection_endpoint | string | False | | | URL of the token verification endpoint of the identity server. |
-| introspection_endpoint_auth_method | string | False | "client_secret_basic" | | Authentication method name for token introspection. |
-| public_key | string | False | | | Public key to verify the token. |
-| use_jwks | boolean | False | | | When set to true, uses the JWKS endpoint of the identity server to verify the token. |
-| token_signing_alg_values_expected | string | False | | | Algorithm used for signing the authentication token. |
-| set_access_token_header | boolean | False | true | | When set to true, sets the access token in a request header. |
-| access_token_in_authorization_header | boolean | False | false | | When set to true, sets the access token in the `Authorization` header. Otherwise, set the `X-Access-Token` header. |
-| set_id_token_header | boolean | False | true | | When set to true and the ID token is available, sets the ID token in the `X-ID-Token` request header. |
-| set_userinfo_header | boolean | False | true | | When set to true and the UserInfo object is available, sets it in the `X-Userinfo` request header. |
-| set_refresh_token_header | boolean | False | false | | When set to true and a refresh token object is available, sets it in the `X-Refresh-Token` request header. |
+| Name | Type | Required | Default | Valid values | Description |
+|--------------------------------------|---------|----------|-----------------------|--------------|--------------------------------------------------------------------------------------------------------------------------|
+| client_id | string | True | | | OAuth client ID. |
+| client_secret | string | True | | | OAuth client secret. |
+| discovery | string | True | | | Discovery endpoint URL of the identity server. |
+| scope | string | False | "openid" | | Scope used for authentication. |
+| realm | string | False | "apisix" | | Realm used for authentication. |
+| bearer_only | boolean | False | false | | When set to true, the Plugin will check for if the authorization header in the request matches a bearer token. |
+| logout_path | string | False | "/logout" | | Path for logging out. |
+| post_logout_redirect_uri | string | False | | | URL to redirect to after logging out. |
+| redirect_uri | string | False | "ngx.var.request_uri" | | URI to which the identity provider redirects back to. |
+| timeout | integer | False | 3 | [1,...] | Request timeout time in seconds. |
+| ssl_verify | boolean | False | false | | When set to true, verifies the identity provider's SSL certificates. |
+| introspection_endpoint | string | False | | | URL of the token verification endpoint of the identity server. |
+| introspection_endpoint_auth_method | string | False | | | Authentication method name for token introspection, If not specified, the default will use the first value in well_know. |
Review Comment:
After digging it into.I found that:
1. The default value of `introspection_endpoint_auth_method` is "client_secret_basic", sorry to @hf400159 .
2. And the `lua-resty-openidc` will use another conf called "token_endpoint_auth_method".It doesn't introduce in the docs, but it can work well in "openid-connection" plugin.
The default value of "token_endpoint_auth_method" will fetch the first supported method specified by the OP.
refer https://github.com/zmartzone/lua-resty-openidc/blob/master/lib/resty/openidc.lua#L677
So in conclusion, I think we should keep the original doc, and add the new field of "token_endpoint_auth_method" to the docs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] starsz commented on a diff in pull request #7371: docs: update openid-connect attributes description and sync CN doc attributes.
Posted by GitBox <gi...@apache.org>.
starsz commented on code in PR #7371:
URL: https://github.com/apache/apisix/pull/7371#discussion_r912857781
##########
docs/en/latest/plugins/openid-connect.md:
##########
@@ -33,29 +33,29 @@ The `openid-connect` Plugin provides authentication and introspection capability
## Attributes
-| Name | Type | Required | Default | Valid values | Description |
-|--------------------------------------|---------|----------|-----------------------|--------------|--------------------------------------------------------------------------------------------------------------------|
-| client_id | string | True | | | OAuth client ID. |
-| client_secret | string | True | | | OAuth client secret. |
-| discovery | string | True | | | Discovery endpoint URL of the identity server. |
-| scope | string | False | "openid" | | Scope used for authentication. |
-| realm | string | False | "apisix" | | Realm used for authentication. |
-| bearer_only | boolean | False | false | | When set to true, the Plugin will check for if the authorization header in the request matches a bearer token. |
-| logout_path | string | False | "/logout" | | Path for logging out. |
-| post_logout_redirect_uri | string | False | | | URL to redirect to after logging out. |
-| redirect_uri | string | False | "ngx.var.request_uri" | | URI to which the identity provider redirects back to. |
-| timeout | integer | False | 3 | [1,...] | Request timeout time in seconds. |
-| ssl_verify | boolean | False | false | | When set to true, verifies the identity provider's SSL certificates. |
-| introspection_endpoint | string | False | | | URL of the token verification endpoint of the identity server. |
-| introspection_endpoint_auth_method | string | False | "client_secret_basic" | | Authentication method name for token introspection. |
-| public_key | string | False | | | Public key to verify the token. |
-| use_jwks | boolean | False | | | When set to true, uses the JWKS endpoint of the identity server to verify the token. |
-| token_signing_alg_values_expected | string | False | | | Algorithm used for signing the authentication token. |
-| set_access_token_header | boolean | False | true | | When set to true, sets the access token in a request header. |
-| access_token_in_authorization_header | boolean | False | false | | When set to true, sets the access token in the `Authorization` header. Otherwise, set the `X-Access-Token` header. |
-| set_id_token_header | boolean | False | true | | When set to true and the ID token is available, sets the ID token in the `X-ID-Token` request header. |
-| set_userinfo_header | boolean | False | true | | When set to true and the UserInfo object is available, sets it in the `X-Userinfo` request header. |
-| set_refresh_token_header | boolean | False | false | | When set to true and a refresh token object is available, sets it in the `X-Refresh-Token` request header. |
+| Name | Type | Required | Default | Valid values | Description |
+|--------------------------------------|---------|----------|-----------------------|--------------|--------------------------------------------------------------------------------------------------------------------------|
+| client_id | string | True | | | OAuth client ID. |
+| client_secret | string | True | | | OAuth client secret. |
+| discovery | string | True | | | Discovery endpoint URL of the identity server. |
+| scope | string | False | "openid" | | Scope used for authentication. |
+| realm | string | False | "apisix" | | Realm used for authentication. |
+| bearer_only | boolean | False | false | | When set to true, the Plugin will check for if the authorization header in the request matches a bearer token. |
+| logout_path | string | False | "/logout" | | Path for logging out. |
+| post_logout_redirect_uri | string | False | | | URL to redirect to after logging out. |
+| redirect_uri | string | False | "ngx.var.request_uri" | | URI to which the identity provider redirects back to. |
+| timeout | integer | False | 3 | [1,...] | Request timeout time in seconds. |
+| ssl_verify | boolean | False | false | | When set to true, verifies the identity provider's SSL certificates. |
+| introspection_endpoint | string | False | | | URL of the token verification endpoint of the identity server. |
+| introspection_endpoint_auth_method | string | False | | | Authentication method name for token introspection, If not specified, the default will use the first value in well_know. |
Review Comment:
Ok.Let me have a check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] juzhiyuan merged pull request #7371: docs: update openid-connect attributes description and sync CN doc attributes.
Posted by GitBox <gi...@apache.org>.
juzhiyuan merged PR #7371:
URL: https://github.com/apache/apisix/pull/7371
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] juzhiyuan commented on a diff in pull request #7371: docs: update openid-connect attributes description and sync CN doc attributes.
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on code in PR #7371:
URL: https://github.com/apache/apisix/pull/7371#discussion_r912566867
##########
docs/zh/latest/plugins/openid-connect.md:
##########
@@ -47,13 +47,15 @@ description: 本文介绍了关于 Apache APISIX `openid-connect` 插件的基
| timeout | integer | 否 | 3 | [1,...] | 请求超时时间,单位为秒 |
| ssl_verify | boolean | 否 | false | [true, false] | 当设置为 `true` 时,验证身份提供者的 SSL 证书。 |
| introspection_endpoint | string | 否 | | | 身份服务器的令牌验证端点的 URL。 |
-| introspection_endpoint_auth_method | string | 否 | "client_secret_basic" | | 令牌自省的认证方法名称。 |
+| introspection_endpoint_auth_method | string | 否 | | | 令牌自省的认证方法名称,如果未指定,则默认使用 well_know 中的第一个值。 |
| public_key | string | 否 | | | 验证令牌的公钥。 |
+| use_jwks | boolean | 否 | | | 当设置为 `true` 时,则会使用身份认证服务器的 JWKS 端点来验证令牌。 |
Review Comment:
Hi, could you please add the `default` value?
##########
docs/en/latest/plugins/openid-connect.md:
##########
@@ -33,29 +33,29 @@ The `openid-connect` Plugin provides authentication and introspection capability
## Attributes
-| Name | Type | Required | Default | Valid values | Description |
-|--------------------------------------|---------|----------|-----------------------|--------------|--------------------------------------------------------------------------------------------------------------------|
-| client_id | string | True | | | OAuth client ID. |
-| client_secret | string | True | | | OAuth client secret. |
-| discovery | string | True | | | Discovery endpoint URL of the identity server. |
-| scope | string | False | "openid" | | Scope used for authentication. |
-| realm | string | False | "apisix" | | Realm used for authentication. |
-| bearer_only | boolean | False | false | | When set to true, the Plugin will check for if the authorization header in the request matches a bearer token. |
-| logout_path | string | False | "/logout" | | Path for logging out. |
-| post_logout_redirect_uri | string | False | | | URL to redirect to after logging out. |
-| redirect_uri | string | False | "ngx.var.request_uri" | | URI to which the identity provider redirects back to. |
-| timeout | integer | False | 3 | [1,...] | Request timeout time in seconds. |
-| ssl_verify | boolean | False | false | | When set to true, verifies the identity provider's SSL certificates. |
-| introspection_endpoint | string | False | | | URL of the token verification endpoint of the identity server. |
-| introspection_endpoint_auth_method | string | False | "client_secret_basic" | | Authentication method name for token introspection. |
-| public_key | string | False | | | Public key to verify the token. |
-| use_jwks | boolean | False | | | When set to true, uses the JWKS endpoint of the identity server to verify the token. |
-| token_signing_alg_values_expected | string | False | | | Algorithm used for signing the authentication token. |
-| set_access_token_header | boolean | False | true | | When set to true, sets the access token in a request header. |
-| access_token_in_authorization_header | boolean | False | false | | When set to true, sets the access token in the `Authorization` header. Otherwise, set the `X-Access-Token` header. |
-| set_id_token_header | boolean | False | true | | When set to true and the ID token is available, sets the ID token in the `X-ID-Token` request header. |
-| set_userinfo_header | boolean | False | true | | When set to true and the UserInfo object is available, sets it in the `X-Userinfo` request header. |
-| set_refresh_token_header | boolean | False | false | | When set to true and a refresh token object is available, sets it in the `X-Refresh-Token` request header. |
+| Name | Type | Required | Default | Valid values | Description |
+|--------------------------------------|---------|----------|-----------------------|--------------|--------------------------------------------------------------------------------------------------------------------------|
+| client_id | string | True | | | OAuth client ID. |
+| client_secret | string | True | | | OAuth client secret. |
+| discovery | string | True | | | Discovery endpoint URL of the identity server. |
+| scope | string | False | "openid" | | Scope used for authentication. |
+| realm | string | False | "apisix" | | Realm used for authentication. |
+| bearer_only | boolean | False | false | | When set to true, the Plugin will check for if the authorization header in the request matches a bearer token. |
+| logout_path | string | False | "/logout" | | Path for logging out. |
+| post_logout_redirect_uri | string | False | | | URL to redirect to after logging out. |
+| redirect_uri | string | False | "ngx.var.request_uri" | | URI to which the identity provider redirects back to. |
+| timeout | integer | False | 3 | [1,...] | Request timeout time in seconds. |
+| ssl_verify | boolean | False | false | | When set to true, verifies the identity provider's SSL certificates. |
+| introspection_endpoint | string | False | | | URL of the token verification endpoint of the identity server. |
+| introspection_endpoint_auth_method | string | False | | | Authentication method name for token introspection, If not specified, the default will use the first value in well_know. |
Review Comment:
I'm not clear, cc @starsz to have a check 🙏
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org