From f28a01a7e02b2b07031f52ab97f86e33794a96a1 Mon Sep 17 00:00:00 2001 From: vdisk Date: Sat, 28 Jan 2023 12:33:56 +0800 Subject: [PATCH] fix oidc doc --- apollo-portal/src/main/resources/application-oidc-sample.yml | 2 +- .../portal-how-to-implement-user-login-function.md | 4 ++-- .../portal-how-to-implement-user-login-function.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apollo-portal/src/main/resources/application-oidc-sample.yml b/apollo-portal/src/main/resources/application-oidc-sample.yml index 790678aa85c..7359bc5b9c7 100644 --- a/apollo-portal/src/main/resources/application-oidc-sample.yml +++ b/apollo-portal/src/main/resources/application-oidc-sample.yml @@ -40,7 +40,7 @@ spring: - openid # client-secret 是在 oidc 提供者处配置的客户端密码, 用于登录 provider # 从安全角度考虑更推荐使用环境变量来配置, 环境变量的命名规则为: 将配置项的 key 当中的 点(.)、横杠(-)替换为下划线(_), 然后将所有字母改为大写, spring boot 会自动处理符合此规则的环境变量 - # 例如 spring.security.oauth2.client.registration.registration-name.client-secret -> SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_NAME_VDISK_CLIENT_SECRET (REGISTRATION_NAME 可以替换为自定义的 oidc 客户端的名称) + # 例如 spring.security.oauth2.client.registration..client-secret -> SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION__CLIENT_SECRET ( 可以替换为自定义的 oidc 客户端的名称) client-secret: d43c91c0-xxxx-xxxx-xxxx-xxxxxxxxxxxx # registration-name-client 是 oidc 客户端的名称, 任意字符均可, client_credentials 类型的 registration 为选填项, 可以不配置 registration-name-client: diff --git a/docs/en/development/portal-how-to-implement-user-login-function.md b/docs/en/development/portal-how-to-implement-user-login-function.md index 95b27dbc904..89d51895b15 100644 --- a/docs/en/development/portal-how-to-implement-user-login-function.md +++ b/docs/en/development/portal-how-to-implement-user-login-function.md @@ -275,7 +275,7 @@ spring: - openid # client-secret is the client password configured at the oidc provider, used to log in to the provider # From the security point of view, it is recommended to use environment variables, which should be named as follows: dot(.), crossbar(-) The naming rule for environment variables is: replace the dot (.) and the crossbar (-) in the key of the configuration item with an underscore (_), then change all letters to uppercase, spring boot will automatically process environment variables that match this rule - # For example, spring.security.oauth2.client.registration.registration-name.client-secret -> SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_NAME_ VDISK_CLIENT_SECRET (REGISTRATION_NAME can be replaced with the name of a custom oidc client) + # For example, spring.security.oauth2.client.registration..client-secret -> SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION__CLIENT_SECRET ( can be replaced with the name of a custom oidc client) client-secret: d43c91c0-xxxx-xxxx-xxxx-xxxxxxxxxxxx ``` @@ -313,7 +313,7 @@ spring: - openid # client-secret is the client password configured at the oidc provider, used to log in to the provider # From the security point of view, it is recommended to use environment variables, which should be named as follows: dot(.), crossbar(-) The naming rule for environment variables is: replace the dot (.) and the crossbar (-) in the key of the configuration item with an underscore (_), then change all letters to uppercase, spring boot will automatically process environment variables that match this rule - # For example, spring.security.oauth2.client.registration.registration-name.client-secret -> SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_NAME_ VDISK_CLIENT_SECRET (REGISTRATION_NAME can be replaced with the name of a custom oidc client) + # For example, spring.security.oauth2.client.registration..client-secret -> SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION__CLIENT_SECRET ( can be replaced with the name of a custom oidc client) client-secret: d43c91c0-xxxx-xxxx-xxxx-xxxxxxxxxxxx # registration-name-client is the name of the oidc client, any character is allowed, registration of client_credentials type is optional, can not be configured registration-name-client: diff --git a/docs/zh/development/portal-how-to-implement-user-login-function.md b/docs/zh/development/portal-how-to-implement-user-login-function.md index 34a4c2ca285..dedbb29751f 100644 --- a/docs/zh/development/portal-how-to-implement-user-login-function.md +++ b/docs/zh/development/portal-how-to-implement-user-login-function.md @@ -269,7 +269,7 @@ spring: - openid # client-secret 是在 oidc 提供者处配置的客户端密码, 用于登录 provider # 从安全角度考虑更推荐使用环境变量来配置, 环境变量的命名规则为: 将配置项的 key 当中的 点(.)、横杠(-)替换为下划线(_), 然后将所有字母改为大写, spring boot 会自动处理符合此规则的环境变量 - # 例如 spring.security.oauth2.client.registration.registration-name.client-secret -> SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_NAME_VDISK_CLIENT_SECRET (REGISTRATION_NAME 可以替换为自定义的 oidc 客户端的名称) + # 例如 spring.security.oauth2.client.registration..client-secret -> SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION__CLIENT_SECRET ( 可以替换为自定义的 oidc 客户端的名称) client-secret: d43c91c0-xxxx-xxxx-xxxx-xxxxxxxxxxxx ``` @@ -306,7 +306,7 @@ spring: - openid # client-secret 是在 oidc 提供者处配置的客户端密码, 用于登录 provider # 从安全角度考虑更推荐使用环境变量来配置, 环境变量的命名规则为: 将配置项的 key 当中的 点(.)、横杠(-)替换为下划线(_), 然后将所有字母改为大写, spring boot 会自动处理符合此规则的环境变量 - # 例如 spring.security.oauth2.client.registration.registration-name.client-secret -> SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_NAME_VDISK_CLIENT_SECRET (REGISTRATION_NAME 可以替换为自定义的 oidc 客户端的名称) + # 例如 spring.security.oauth2.client.registration..client-secret -> SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION__CLIENT_SECRET ( 可以替换为自定义的 oidc 客户端的名称) client-secret: d43c91c0-xxxx-xxxx-xxxx-xxxxxxxxxxxx # registration-name-client 是 oidc 客户端的名称, 任意字符均可, client_credentials 类型的 registration 为选填项, 可以不配置 registration-name-client: