You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by wu...@apache.org on 2022/11/21 01:45:03 UTC

[shardingsphere-elasticjob] branch master updated: docs: add Casdoor docs (#2152)

This is an automated email from the ASF dual-hosted git repository.

wuweijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob.git


The following commit(s) were added to refs/heads/master by this push:
     new e39c78e9b docs: add Casdoor docs (#2152)
e39c78e9b is described below

commit e39c78e9b91d957bdeb7ac15f4d16356953f2d2e
Author: jakiuncle <88...@users.noreply.github.com>
AuthorDate: Mon Nov 21 09:44:53 2022 +0800

    docs: add Casdoor docs (#2152)
    
    * docs: add Casdoor docs
    
    * docs: add Casdoor docs
    
    * docs: add Casdoor docs
    
    * docs: add Casdoor docs
---
 .../elasticjob-lite/operation/web-console.cn.md    |  48 +++++++++++++++++++++
 .../elasticjob-lite/operation/web-console.en.md    |  46 ++++++++++++++++++++
 docs/static/img/casdoor/application.png            | Bin 0 -> 253329 bytes
 docs/static/img/casdoor/casdoorConfig.png          | Bin 0 -> 73683 bytes
 docs/static/img/casdoor/cert.png                   | Bin 0 -> 124650 bytes
 docs/static/img/casdoor/list.png                   | Bin 0 -> 21601 bytes
 6 files changed, 94 insertions(+)

diff --git a/docs/content/user-manual/elasticjob-lite/operation/web-console.cn.md b/docs/content/user-manual/elasticjob-lite/operation/web-console.cn.md
index 57ddcb934..619a51e10 100644
--- a/docs/content/user-manual/elasticjob-lite/operation/web-console.cn.md
+++ b/docs/content/user-manual/elasticjob-lite/operation/web-console.cn.md
@@ -13,6 +13,7 @@ chapter = true
 控制台提供两种账户:管理员及访客。
 管理员拥有全部操作权限,访客仅拥有察看权限。
 默认管理员用户名和密码是 root/root,访客用户名和密码是 guest/guest,可通过 `conf\application.properties` 修改管理员及访客用户名及密码。
+
 ```
 auth.root_username=root
 auth.root_password=root
@@ -20,6 +21,53 @@ auth.guest_username=guest
 auth.guest_password=guest
 ```
 
+## Casdoor登录
+
+控制台集成了[Casdoor](https://casdoor.org/)单点登录,用户可以选择Casdoor进行登录等一些列操作。
+
+步骤一: 部署casdoor
+Casdoor的源代码托管在 GitHub: https://github.com/casdoor/casdoor 
+
+启动模式有开发模式和生产模式,此处以开发模式为例,[更多详细](https://casdoor.org/docs/basic/server-installation)
+
+后端启动方式
+
+```bash
+go run main.go
+```
+
+前端启动方式
+
+```bash
+cd web
+yarn install
+yarn start
+```
+
+步骤二:配置casdoor并得到所需的数据
+
+![casdoorConfig](https://shardingsphere.apache.org/elasticjob/current/img/casdoor/casdoorConfig.png)
+
+用红线指出来的是后端配置需要用到的,其中Redirect URLs取决于你要要callback的地址
+
+我们还需要根据所选cert到cert选项中找到对应的cert,如本例为cert-built-in,其中certificate也是我们所需要用到的。
+
+![cert](https://shardingsphere.apache.org/elasticjob/current/img/casdoor/cert.png)
+
+更多[casdoor文档](https://casdoor.org/docs/overview)
+
+步骤三:在ShardingSphere中进行配置
+
+在[sharingshphere-elasticjob-ui](https://github.com/apache/shardingsphere-elasticjob-ui)中的该application.properties进行配置
+
+![list](https://shardingsphere.apache.org/elasticjob/current/img/casdoor/list.png)
+
+将我们在casdoor获取的数据粘贴到相应位置即可如:
+
+![application](https://shardingsphere.apache.org/elasticjob/current/img/casdoor/application.png)
+
+这样我们就可以在shardingsphere-elasticjob-ui中使用casdoor了!更多功能详见[Casdoor](https://casdoor.org/)
+
 ## 功能列表
 
 - 登录安全控制
diff --git a/docs/content/user-manual/elasticjob-lite/operation/web-console.en.md b/docs/content/user-manual/elasticjob-lite/operation/web-console.en.md
index a9fee0e77..c4c71d904 100644
--- a/docs/content/user-manual/elasticjob-lite/operation/web-console.en.md
+++ b/docs/content/user-manual/elasticjob-lite/operation/web-console.en.md
@@ -20,6 +20,52 @@ auth.guest_username=guest
 auth.guest_password=guest
 ```
 
+## Login with Casdoor
+
+The console have integrated [Casdoor](https://casdoor.org/). We can choose it  for SSO.
+
+Step1: Deploy Casdoor
+
+Casdoor code in GitHub: https://github.com/casdoor/casdoor 
+
+Here a example for development mode. [More](https://casdoor.org/docs/basic/server-installation)
+
+Backend
+
+```bash
+go run main.go
+```
+
+Frontend
+
+```bash
+cd web
+yarn install
+yarn start
+```
+
+Step2:Configure Casdoor
+
+![casdoorConfig](https://shardingsphere.apache.org/elasticjob/current/img/casdoor/casdoorConfig.png)
+
+RedirectURLs is depend on what url you need redirect.The selected data will use in next.
+
+2.On the certificate editing page, you can see your `Certificate`
+
+![cert](https://shardingsphere.apache.org/elasticjob/current/img/casdoor/cert.png)
+
+Step3:Configure application in ShardingSphere
+
+First we need find the application.properties we need configure
+
+![list](https://shardingsphere.apache.org/elasticjob/current/img/casdoor/list.png)
+
+Second we need copy the data in Casdoor application and paste them into application.
+
+![application](https://shardingsphere.apache.org/elasticjob/current/img/casdoor/application.png)
+
+Now we can use it
+
 ## Function list
 
 - Login security control
diff --git a/docs/static/img/casdoor/application.png b/docs/static/img/casdoor/application.png
new file mode 100644
index 000000000..950fad95a
Binary files /dev/null and b/docs/static/img/casdoor/application.png differ
diff --git a/docs/static/img/casdoor/casdoorConfig.png b/docs/static/img/casdoor/casdoorConfig.png
new file mode 100644
index 000000000..c48d1ae79
Binary files /dev/null and b/docs/static/img/casdoor/casdoorConfig.png differ
diff --git a/docs/static/img/casdoor/cert.png b/docs/static/img/casdoor/cert.png
new file mode 100644
index 000000000..fa7e1f7d3
Binary files /dev/null and b/docs/static/img/casdoor/cert.png differ
diff --git a/docs/static/img/casdoor/list.png b/docs/static/img/casdoor/list.png
new file mode 100644
index 000000000..39717753b
Binary files /dev/null and b/docs/static/img/casdoor/list.png differ