Feat: add LDAP SSO login doc
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 48 KiB |
|
@ -8,7 +8,7 @@ In KubeVela V1.3, we provide two methods to login: local login and SSO.
|
|||
|
||||
Local login uses the username and password stored in the local database to log in, and SSO integrates [Dex](https://dexidp.io/), which can be configured by configuring Dex's [OpenID Connect](https://dexidp.io/docs/openid-connect) to implement many different ways to log in, such as: GitHub, LDAP, etc.
|
||||
|
||||
After the platform is initialized, local login is used by default. Platform administrators can configure SSO through the platform configuration page. In this tutorial, we'll use the GitHub Connector to show how to use SSO with KubeVela.
|
||||
After the platform is initialized, local login is used by default. Platform administrators can configure SSO through the platform configuration page. In this tutorial, we'll use the GitHub and LDAP Connector to show how to use SSO with KubeVela.
|
||||
|
||||
## Enable Dex Addon
|
||||
|
||||
|
@ -22,7 +22,10 @@ After enabling the Dex Addon, we also need to upgrade the VelaUX addon and open
|
|||
|
||||
## Configure Dex Connectors
|
||||
|
||||
Next, we need to configure the Dex Connectors. Take GitHub Connector as an example, if you don't have a GitHub Oauth App, you need to create an Oauth App on GitHub's Developer settings first, and set the App's Authorization callback URL to `[Vela UX address]/dex/callback`.
|
||||
Next, we need to configure the Dex Connectors.
|
||||
### Configure GitHub Connector
|
||||
|
||||
Take GitHub Connector as an example, if you don't have a GitHub Oauth App, you need to create an Oauth App on GitHub's Developer settings first, and set the App's Authorization callback URL to `[Vela UX address]/dex/callback`.
|
||||
|
||||
> Note that please make sure your Vela UX has a public IP address due to third-party redirection involved.
|
||||
|
||||
|
@ -30,6 +33,20 @@ After creating the Oauth App, configure the Dex Connector in the integration con
|
|||
|
||||

|
||||
|
||||
### Configure LDAP Connector
|
||||
|
||||
If you want to use LDAP for SSO, you need to set up the LDAP Connector first.
|
||||
|
||||
> Before configuring, please make sure you have LDAP installed correctly and that LDAP can communicate with the Vela UX network.
|
||||
|
||||
After selecting the Connector type as LDAP, fill in the address of the LDAP server in `Host`, and specify `BaseDN`.
|
||||
|
||||

|
||||
|
||||
If your LDAP does not provide anonymous authentication access, then you need to open the `Advanced Parameters`, fill in `BindDN` and `BindPW`, Connector will use these credentials for user search.
|
||||
|
||||

|
||||
|
||||
> For more types of Dex Connectors, please refer to [Dex Connectors Configuration](../how-to/dashboard/config/dex-connectors).
|
||||
|
||||
## Platform setting
|
||||
|
@ -48,7 +65,7 @@ Log out and refresh the page again, you can see that we have entered the Dex log
|
|||
|
||||

|
||||
|
||||
Then, select GitHub to login.
|
||||
Then, you select GitHub or LDAP to login.
|
||||
|
||||

|
||||
|
||||
|
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 48 KiB |
|
@ -8,7 +8,7 @@ title: 使用单点登录
|
|||
|
||||
本地登录使用本地数据库中存储的用户名密码进行登录,而单点登录集成了 [Dex](https://dexidp.io/),可以通过配置 Dex 的 [OpenID Connect](https://dexidp.io/docs/openid-connect) 来实现多种不同方式的登录,如:GitHub、LDAP 等等。
|
||||
|
||||
平台初始化后,默认使用本地登录。平台管理员可以通过平台配置页面,配置单点登录。在本教程中,我们将使用 GitHub Connector 来演示单点登录。
|
||||
平台初始化后,默认使用本地登录。平台管理员可以通过平台配置页面,配置单点登录。在本教程中,我们将分别使用 GitHub 和 LDAP Connector 来演示单点登录。
|
||||
|
||||
## 开启 Dex 插件
|
||||
|
||||
|
@ -22,7 +22,11 @@ title: 使用单点登录
|
|||
|
||||
## 配置 Dex Connectors
|
||||
|
||||
接着,我们需要配置 Dex Connectors。以 GitHub Connector 为例,如果你没有 GitHub Oauth App,需要首先在 GitHub 的 Developer settings 上创建一个 Oauth App,并且设置该 App 的 Authorization callback URL 为 `[Vela UX 地址]/dex/callback`。
|
||||
接着,我们需要配置 Dex Connectors。
|
||||
|
||||
### 配置 GitHub Connector
|
||||
|
||||
以 GitHub Connector 为例,如果你没有 GitHub Oauth App,需要首先在 GitHub 的 Developer settings 上创建一个 Oauth App,并且设置该 App 的 Authorization callback URL 为 `[Vela UX 地址]/dex/callback`。
|
||||
|
||||
> 注意,由于涉及到第三方跳转,请确保你的 Vela UX 拥有公网地址。
|
||||
|
||||
|
@ -30,9 +34,23 @@ title: 使用单点登录
|
|||
|
||||

|
||||
|
||||
### 配置 LDAP Connector
|
||||
|
||||
如果你希望使用 LDAP 进行单点登录,需要在这里配置 LDAP Connector。
|
||||
|
||||
> 在进行配置前,请确保你已经正确安装了 LDAP,并且 LDAP 能与 Vela UX 网络通信。
|
||||
|
||||
选择 Connector 类型为 LDAP 后,在 Host 处填写 LDAP 服务器的地址,并且指定 BaseDN。
|
||||
|
||||

|
||||
|
||||
如果你的 LDAP 没有提供匿名身份验证访问,那么你还需要打开高阶参数,填写 BindDN 和 BindPW,Connector 将使用这些信息进行用户的搜索。
|
||||
|
||||

|
||||
|
||||
> 关于更多类型的 Dex Connectors 配置,请查阅 [Dex Connectors 配置](../how-to/dashboard/config/dex-connectors)
|
||||
|
||||
## 平台配置
|
||||
### 平台配置
|
||||
|
||||
通过单点登录进来的用户,如果之前在本地数据库中存在与此邮箱相同的用户,将自动与之绑定,否则创建新用户。
|
||||
|
||||
|
@ -42,14 +60,14 @@ title: 使用单点登录
|
|||
|
||||

|
||||
|
||||
## 使用单点登录
|
||||
### 使用单点登录
|
||||
|
||||
退出当前用户的登录,重新刷新页面,可以看到,我们已经进入了 Dex 的登录页面。
|
||||
|
||||

|
||||
|
||||
选择 GitHub 登录后,进行授权登录。
|
||||
你可以选择使用 GitHub 或者 LDAP 进行登录。进行选择后,授权此次登录:
|
||||
|
||||

|
||||
|
||||
至此,我们已经成功完成了使用 GitHub 的单点登录。此时,如果登录的用户邮箱与之前本地登录的用户邮箱能够相互关联,新登入的用户将继承之前用户的权限。
|
||||
至此,我们已经成功完成了使用 GitHub/LDAP 的单点登录。此时,如果登录的用户邮箱与之前本地登录的用户邮箱能够相互关联,新登入的用户将继承之前用户的权限。
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
title: 自定义插件
|
||||
---
|
||||
|
||||
下图展示了在启用一个插件时,KubeVela 做了哪些事情。可以看到插件仓库中所存放的其实是插件的资源文件,当通过 UX/CLI 启用一个插件时,它们会从插件仓库把这些资源文件拉取下来,渲染成一个 KubeVela 应用并创建。最终由运行在管控集群的 KubeVela 控制器完成对应用中所描述资源的下发。
|
||||
一个 KubeVela 的插件就是包含了一系列文件的目录。 下图展示了在启用一个插件时,KubeVela 做了哪些事情。当通过 UX/CLI 启用一个插件时,会从插件仓库把这些资源文件拉取下来。
|
||||
|
||||
文件当中用于扩展平台能力的文件如各种模块定义文件(componentDefinition,traitDefinition 等)和 schema 文件(在 UX 上增强显示效果的文件)会被 UX/CLI 直接下发到管控集群。 资源描述( resources, template 和 metadata )文件会被用来渲染成一个 KubeVela 应用并创建,最终由运行在管控集群的 KubeVela 下发到各个集群当中。
|
||||
|
||||

|
||||
|
||||
|
@ -150,11 +152,11 @@ parameter: {
|
|||
|
||||
### 模块定义文件 (X-Definitions) 目录 (非必须)
|
||||
|
||||
你可以在插件目录下面创建一个 definitions 文件目录,用于存放组件定义、运维特征定义和工作流节点定义等模版定义文件。需要注意的是,由于被管控集群中通常不会安装 KubeVela 控制器,所以即使插件通过设置元数据文件 (metadata.yaml) 中 `deployTo.runtimeCluster` 字段开启在子集群安装该插件,模版定义的文件也并不会下发到子集群中。
|
||||
你可以在插件目录下面创建一个 definitions 文件目录,用于存放组件定义、运维特征定义和工作流节点定义等模版定义文件。需要注意的是,由于被管控集群中通常不会安装 KubeVela 控制器,所以在启用插件时这些文件仅会被下发到管控集群。
|
||||
|
||||
### 模版参数展示增强文件 (UI-Schema) 目录 (非必须)
|
||||
|
||||
schemas 目录用于存放`X-Definitions` 所对应的 UI-schema 文件,用于在 UX 中展示 `X-Definitions` 所需要填写参数时增强显示效果。
|
||||
schemas 目录用于存放`X-Definitions` 所对应的 UI-schema 文件,用于在 UX 中展示 `X-Definitions` 所需要填写参数时增强显示效果。需要注意的是,和模块定义文件一样,这些文件仅会被下发到管控集群。
|
||||
|
||||
上面就完整介绍了如何制作一个插件,你可以在这个 [目录中](https://github.com/oam-dev/catalog/tree/master/experimental/addons/example) 找到上面所介绍插件的完整例子。
|
||||
|
||||
|
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 48 KiB |
|
@ -8,7 +8,7 @@ title: 使用单点登录
|
|||
|
||||
本地登录使用本地数据库中存储的用户名密码进行登录,而单点登录集成了 [Dex](https://dexidp.io/),可以通过配置 Dex 的 [OpenID Connect](https://dexidp.io/docs/openid-connect) 来实现多种不同方式的登录,如:GitHub、LDAP 等等。
|
||||
|
||||
平台初始化后,默认使用本地登录。平台管理员可以通过平台配置页面,配置单点登录。在本教程中,我们将使用 GitHub Connector 来演示单点登录。
|
||||
平台初始化后,默认使用本地登录。平台管理员可以通过平台配置页面,配置单点登录。在本教程中,我们将分别使用 GitHub 和 LDAP Connector 来演示单点登录。
|
||||
|
||||
## 开启 Dex 插件
|
||||
|
||||
|
@ -22,7 +22,11 @@ title: 使用单点登录
|
|||
|
||||
## 配置 Dex Connectors
|
||||
|
||||
接着,我们需要配置 Dex Connectors。以 GitHub Connector 为例,如果你没有 GitHub Oauth App,需要首先在 GitHub 的 Developer settings 上创建一个 Oauth App,并且设置该 App 的 Authorization callback URL 为 `[Vela UX 地址]/dex/callback`。
|
||||
接着,我们需要配置 Dex Connectors。
|
||||
|
||||
### 配置 GitHub Connector
|
||||
|
||||
以 GitHub Connector 为例,如果你没有 GitHub Oauth App,需要首先在 GitHub 的 Developer settings 上创建一个 Oauth App,并且设置该 App 的 Authorization callback URL 为 `[Vela UX 地址]/dex/callback`。
|
||||
|
||||
> 注意,由于涉及到第三方跳转,请确保你的 Vela UX 拥有公网地址。
|
||||
|
||||
|
@ -30,9 +34,23 @@ title: 使用单点登录
|
|||
|
||||

|
||||
|
||||
### 配置 LDAP Connector
|
||||
|
||||
如果你希望使用 LDAP 进行单点登录,需要在这里配置 LDAP Connector。
|
||||
|
||||
> 在进行配置前,请确保你已经正确安装了 LDAP,并且 LDAP 能与 Vela UX 网络通信。
|
||||
|
||||
选择 Connector 类型为 LDAP 后,在 Host 处填写 LDAP 服务器的地址,并且指定 BaseDN。
|
||||
|
||||

|
||||
|
||||
如果你的 LDAP 没有提供匿名身份验证访问,那么你还需要打开高阶参数,填写 BindDN 和 BindPW,Connector 将使用这些信息进行用户的搜索。
|
||||
|
||||

|
||||
|
||||
> 关于更多类型的 Dex Connectors 配置,请查阅 [Dex Connectors 配置](../how-to/dashboard/config/dex-connectors)
|
||||
|
||||
## 平台配置
|
||||
### 平台配置
|
||||
|
||||
通过单点登录进来的用户,如果之前在本地数据库中存在与此邮箱相同的用户,将自动与之绑定,否则创建新用户。
|
||||
|
||||
|
@ -42,14 +60,14 @@ title: 使用单点登录
|
|||
|
||||

|
||||
|
||||
## 使用单点登录
|
||||
### 使用单点登录
|
||||
|
||||
退出当前用户的登录,重新刷新页面,可以看到,我们已经进入了 Dex 的登录页面。
|
||||
|
||||

|
||||
|
||||
选择 GitHub 登录后,进行授权登录。
|
||||
你可以选择使用 GitHub 或者 LDAP 进行登录。进行选择后,授权此次登录:
|
||||
|
||||

|
||||
|
||||
至此,我们已经成功完成了使用 GitHub 的单点登录。此时,如果登录的用户邮箱与之前本地登录的用户邮箱能够相互关联,新登入的用户将继承之前用户的权限。
|
||||
至此,我们已经成功完成了使用 GitHub/LDAP 的单点登录。此时,如果登录的用户邮箱与之前本地登录的用户邮箱能够相互关联,新登入的用户将继承之前用户的权限。
|
||||
|
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 48 KiB |
|
@ -41,9 +41,9 @@ As shown, you need to do the following configuration:
|
|||
|
||||
- Repo Type: Git and Helm are supported. In this example, we choose Helm.
|
||||
- Repo URL: Fill in the repo address you needed. we type in: https://charts.bitnami.com/bitnami. If you have configured the helm repo in [Integration](../how-to/dashboard/config/helm-repo) you can choose the repo directly.
|
||||
- Chart: After fill Helm repo URL, will list all available chart in this field. You can choose one from the list, here we choose: redis.
|
||||
- Version: After choose the helm chart, will list all available version of it. Choose one version of this chart, here we choose: 16.8.5.
|
||||
- Values: Custom parameters of Chart. Since we are using ACK cluster in the example, PV has a minimum capacity requirement, 15Gi. In the same way, other parameters can also be configured according to your cluster's status.
|
||||
- Chart: After fill Helm repo URL, will list all available charts in this field. You can choose one from the list, here we choose: redis.
|
||||
- Version: After choose the helm chart, will list all available versions in this field. Choose one version of this chart, here we choose: 16.8.5.
|
||||
- Values: After choose the version, will list all parameters of this helm Chart. Since we are using ACK cluster in the example, PV has a minimum capacity requirement, 15Gi. In the same way, other parameters can also be configured according to your cluster's status.
|
||||
|
||||
After filling in the above parameters, click `Create` to complete the application creation and enter the application configuration page. The following steps will stay the same as you've learned in [Deploy First Application](../quick-start).
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ In KubeVela V1.3, we provide two methods to login: local login and SSO.
|
|||
|
||||
Local login uses the username and password stored in the local database to log in, and SSO integrates [Dex](https://dexidp.io/), which can be configured by configuring Dex's [OpenID Connect](https://dexidp.io/docs/openid-connect) to implement many different ways to log in, such as: GitHub, LDAP, etc.
|
||||
|
||||
After the platform is initialized, local login is used by default. Platform administrators can configure SSO through the platform configuration page. In this tutorial, we'll use the GitHub Connector to show how to use SSO with KubeVela.
|
||||
After the platform is initialized, local login is used by default. Platform administrators can configure SSO through the platform configuration page. In this tutorial, we'll use the GitHub and LDAP Connector to show how to use SSO with KubeVela.
|
||||
|
||||
## Enable Dex Addon
|
||||
|
||||
|
@ -22,7 +22,10 @@ After enabling the Dex Addon, we also need to upgrade the VelaUX addon and open
|
|||
|
||||
## Configure Dex Connectors
|
||||
|
||||
Next, we need to configure the Dex Connectors. Take GitHub Connector as an example, if you don't have a GitHub Oauth App, you need to create an Oauth App on GitHub's Developer settings first, and set the App's Authorization callback URL to `[Vela UX address]/dex/callback`.
|
||||
Next, we need to configure the Dex Connectors.
|
||||
### Configure GitHub Connector
|
||||
|
||||
Take GitHub Connector as an example, if you don't have a GitHub Oauth App, you need to create an Oauth App on GitHub's Developer settings first, and set the App's Authorization callback URL to `[Vela UX address]/dex/callback`.
|
||||
|
||||
> Note that please make sure your Vela UX has a public IP address due to third-party redirection involved.
|
||||
|
||||
|
@ -30,6 +33,20 @@ After creating the Oauth App, configure the Dex Connector in the integration con
|
|||
|
||||

|
||||
|
||||
### Configure LDAP Connector
|
||||
|
||||
If you want to use LDAP for SSO, you need to set up the LDAP Connector first.
|
||||
|
||||
> Before configuring, please make sure you have LDAP installed correctly and that LDAP can communicate with the Vela UX network.
|
||||
|
||||
After selecting the Connector type as LDAP, fill in the address of the LDAP server in `Host`, and specify `BaseDN`.
|
||||
|
||||

|
||||
|
||||
If your LDAP does not provide anonymous authentication access, then you need to open the `Advanced Parameters`, fill in `BindDN` and `BindPW`, Connector will use these credentials for user search.
|
||||
|
||||

|
||||
|
||||
> For more types of Dex Connectors, please refer to [Dex Connectors Configuration](../how-to/dashboard/config/dex-connectors).
|
||||
|
||||
## Platform setting
|
||||
|
@ -48,7 +65,7 @@ Log out and refresh the page again, you can see that we have entered the Dex log
|
|||
|
||||

|
||||
|
||||
Then, select GitHub to login.
|
||||
Then, you select GitHub or LDAP to login.
|
||||
|
||||

|
||||
|
||||
|
|