You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by zi...@apache.org on 2022/12/28 02:11:59 UTC
[pulsar-manager] branch master updated: [improve][doc] Add casdoor document for administration-pulsar-manager (#499)
This is an automated email from the ASF dual-hosted git repository.
zixuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-manager.git
The following commit(s) were added to refs/heads/master by this push:
new 3a38b80 [improve][doc] Add casdoor document for administration-pulsar-manager (#499)
3a38b80 is described below
commit 3a38b80375112bb3d73309c8527314f7109d6719
Author: jakiuncle <88...@users.noreply.github.com>
AuthorDate: Wed Dec 28 10:11:53 2022 +0800
[improve][doc] Add casdoor document for administration-pulsar-manager (#499)
* [improve][doc] Add casdoor document for administration-pulsar-manager
* [improve][doc] Add casdoor document for administration-pulsar-manager
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
* [improve][doc] Add casdoor document for administration-pulsar-manager
* Update README.md
* Update README.md
Co-authored-by: Zixuan Liu <no...@gmail.com>
---
README.md | 70 +++++++++++++++++++++++++++-
docs/img/Pulsar-manager_editApplication.svg | 4 ++
docs/img/Pulsar-manager_editOrganization.svg | 4 ++
3 files changed, 77 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 89b5e37..d696244 100644
--- a/README.md
+++ b/README.md
@@ -144,7 +144,7 @@ bkvm address => http://localhost:7750/bkvm
```
2. Build and start the backend.
-
+
```
cd pulsar-manager
./gradlew build -x test
@@ -273,6 +273,74 @@ The pulsar-manager can monitor topics and subscriptions.

+## Casdoor
+
+
+### Casdoor Installation
+
+You can use casdoor to realize sso.
+
+Casdoor can connect to Pulsar-manager simply.
+
+Because the code for connecting the casdoor has been added in Pulsar-manager, we need to configure the casdoor in the back-end and front-end.
+
+#### Step1. Deploy Casdoor
+
+Firstly, the Casdoor should be deployed.
+
+You can refer to the Casdoor official documentation for the [Casdoor](https://casdoor.org/docs/overview)
+
+After a successful deployment, you need to ensure:
+
+- The Casdoor server is successfully running on **http://localhost:8000**.
+- Open your favorite browser and visit **http://localhost:7001**, you will see the login page of Casdoor.
+- Input `admin` and `123` to test login functionality is working fine.
+
+Then you can quickly implement a casdoor based login page in your app with the following steps.
+
+#### step2. Configure Casdoor
+
+Configure casdoor can refer to [casdoor](https://door.casdoor.com/login)(Configure casdoor's browser better not use one browser with your develop browser).
+
+You also should configure the organization, and application, you also can refer to [casdoor](https://door.casdoor.com/login).
+
+##### step2.1 you should create an organization
+
+
+
+##### step2.2 you should create an application
+
+
+
+#### Step3. Configure back-end code
+
+You should configure casdoor's Configuration in the Line 154 of pulsar-manager/src/main/resources/application.properties
+
+```ini
+casdoor.endpoint=http://localhost:8000
+casdoor.clientId=<client id in previous step>
+casdoor.clientSecret=<client Secret in previous step>
+casdoor.certificate=<client certificate in previous step>
+casdoor.organizationName=pulsar
+casdoor.applicationName=app-pulsar
+```
+
+#### Step4. Configure front-end code
+
+You also need configure casdoor's Configuration in the Line 50 of pulsar-manager/front-end/src/main.js
+
+```
+const config = {
+ serverUrl: "http://localhost:7001",
+ clientId: "6ba06c1e1a30929fdda7",
+ organizationName: "pulsar",
+ appName: "app-plusar",
+ redirectPath: "/#callback",
+};
+```
+
+Now you can use Casdoor.
+
## Development
### Default Test database HerdDB
diff --git a/docs/img/Pulsar-manager_editApplication.svg b/docs/img/Pulsar-manager_editApplication.svg
new file mode 100644
index 0000000..372fd73
--- /dev/null
+++ b/docs/img/Pulsar-manager_editApplication.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1878 845">
+ <image width="1878" height="845" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB1YAAANNCAYAAAAklJyxAAAgAElEQVR4nOzdD3SU530n+p8AYfPPgAOY2LIhTm3FTmPLjh0v5iY0TqzQ1sS7bn3U0269cWh6Dm4o2kJ76u3tuj7dW/e20BUltXY3S9wmPb1VkybXhe5llT8NTjFJILFqN7iyU4wNJhjkgDDin5B0531HI82MRhqBJSTg80mnmnn/PO8z7/vO4KOvnt9T0ZMRI6y9vT2mTp060s1yiRiFW/KCUVFRMerHSM7vpXyOLzTJPXE+7gsAAAAAALiYHD9+PGbOnDmibU4a0dZgBAiRRpegDgAAAAAA4OxNGOsOAAAAAAAAAIx3glUAAAAAAACAMgSrAAAAAAAAAGUIVgEAAAAAAADKEKwCAAAAAAAAlDFptBo+fvz4aDU [...]
+</svg>
\ No newline at end of file
diff --git a/docs/img/Pulsar-manager_editOrganization.svg b/docs/img/Pulsar-manager_editOrganization.svg
new file mode 100644
index 0000000..21e4150
--- /dev/null
+++ b/docs/img/Pulsar-manager_editOrganization.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1838 641">
+ <image width="1838" height="641" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABy4AAAKBCAYAAAABV4ymAAAgAElEQVR4nOzdfXyV9Z0n/C8KrYIK2MRmMT6gt6bijMbWlkVW2W0lsiu0jtZJx9lxRMdqnCLZirROH5TqjDtt6ASZIXU7qO3s1OautVPBe2noPKBFFrU19t5Co1PUGhiEtIAKAhHZc508nZOcPACJFw/v9+t1mpzr4Xf9rnOu8Ieffr+/YXszAgAAAAAAACBFR6U9AQAAAAAAAADBJQAAAAAAAJA6wSUAAAAAAACQOsElAAAAAAAAkDrBJQAAAAAAAJA6wSUAAAAAAACQOsElAAAAAAAAkDrBJQAAAAAAAJC64cn/tLa2xs6dO+Odd95Jez4AAAAAAADAEeSoo46KY445pi24TELL5A0AAAAAAADAuy3JK7OtYlV [...]
+</svg>
\ No newline at end of file