Skip to content

Commit

Permalink
[improve][doc] Add casdoor document for administration-pulsar-manager (
Browse files Browse the repository at this point in the history
…#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 <nodeces@gmail.com>

* Update README.md

Co-authored-by: Zixuan Liu <nodeces@gmail.com>

* Update README.md

Co-authored-by: Zixuan Liu <nodeces@gmail.com>

* Update README.md

Co-authored-by: Zixuan Liu <nodeces@gmail.com>

* Update README.md

Co-authored-by: Zixuan Liu <nodeces@gmail.com>

* Update README.md

Co-authored-by: Zixuan Liu <nodeces@gmail.com>

* Update README.md

Co-authored-by: Zixuan Liu <nodeces@gmail.com>

* Update README.md

Co-authored-by: Zixuan Liu <nodeces@gmail.com>

* Update README.md

Co-authored-by: Zixuan Liu <nodeces@gmail.com>

* Update README.md

Co-authored-by: Zixuan Liu <nodeces@gmail.com>

* Update README.md

Co-authored-by: Zixuan Liu <nodeces@gmail.com>

* [improve][doc] Add casdoor document for administration-pulsar-manager

* Update README.md

* Update README.md

Co-authored-by: Zixuan Liu <nodeces@gmail.com>
  • Loading branch information
jakiuncle and nodece authored Dec 28, 2022
1 parent c37fae0 commit 3a38b80
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 1 deletion.
70 changes: 69 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ bkvm address => http://localhost:7750/bkvm
```
2. Build and start the backend.
```
cd pulsar-manager
./gradlew build -x test
Expand Down Expand Up @@ -273,6 +273,74 @@ The pulsar-manager can monitor topics and subscriptions.
![pulsar-manager-token](docs/img/pulsar-manager-token.gif)
## 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
![organization](/docs/img/Pulsar-manager_editOrganization.svg)
##### step2.2 you should create an application
![application](/docs/img/Pulsar-manager_editApplication.svg)
#### 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
Expand Down
4 changes: 4 additions & 0 deletions docs/img/Pulsar-manager_editApplication.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/img/Pulsar-manager_editOrganization.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3a38b80

Please sign in to comment.