Skip to content

Commit

Permalink
docs: Complete installation documentation for casibase (#11)
Browse files Browse the repository at this point in the history
* docs: Complete installation documentation for casibase

* docs: Complete installation documentation for casibase
  • Loading branch information
palp1tate authored Sep 11, 2023
1 parent 8bbe667 commit 887dec8
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 34 deletions.
46 changes: 25 additions & 21 deletions docs/basic/casdoor-sso.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,45 @@
---
title: Casdoor-SSO
description: Introduction of casdoor in casibase
description: Setup Casdoor for casibase
keywords: [Casdoor, SSO, Security, Authentication, Authorization]
authors: [kv-chiu]
authors: [uestc-wxy]
---

```mdx-code-block
import styles from '.././styles.module.css';
import CasdoorCard from "@site/src/components/CasdoorCard";
```

## Introduction
Casibase uses Casdoor as its backend service,so make sure to deploy it in advance.

Casdoor is a powerful and lightweight open-source [Identity Access Management (IAM)](https://en.wikipedia.org/wiki/Identity_management) / [Single-Sign-On (SSO)](https://en.wikipedia.org/wiki/Single_sign-on) server. It's developed and maintained by [**Casbin**](https://casbin.org).
Please refer to: <https://casdoor.org/docs/basic/server-installation> to install and configure Casdoor.

```mdx-code-block
<div className={styles.gradientborder}>
<CasdoorCard src="https://door.casdoor.com/login" />
</div>
```
Follow these steps to setup Casdoor for casibase:

- Create an Organization

![create-organization](/img/create-organization.png)

- Configure information about the Organization

![configure-organization](/img/configure-organization.png)

- Create a new Application

![create-application](/img/create-application.png)

Casdoor serves both the web UI and the login requests from the application users.
- Configuring Application Information (Remember Name, ClientID and ClientSecret)

## Features
![configure-application](/img/configure-application.png)

- **Single-Sign-On (SSO)**: Sign in to multiple applications with one set of login credentials.
- **Social Login**: Sign in with GitHub, Google, etc.
- **Integrated Provider Management**: Manage all your providers in one place.
- **Authentication**: Verify the identity of your users.
- Add a member to the newly created organization

![Principle](/img/principles.gif)
![add-user](/img/add-user-1.png)

:::tip
![add-user](/img/add-user-2.png)

Casibase manages third-party service providers through Casdoor:
- Configure member information (remember its Name as well as Password)

- **Storage**: Manage your storage providers, such as AWS, Azure, etc.
- **AI**: Manage your chat providers, such as OpenAI, ChatGLM, etc.
![configure-user](/img/configure-user-1.png)

:::
![configure-user](/img/configure-user-2.png)
51 changes: 38 additions & 13 deletions docs/basic/server-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Server Installation
description: Install and configure Casdoor server
keywords: [Casibase server, installation, configuration]
authors: [kv-chiu]
authors: [kv-chiu, uestc-wxy]
---

## Requirements
Expand Down Expand Up @@ -65,6 +65,12 @@ git clone https://github.com/casbin/casibase

## Configuration

### Configure Casdoor

Please refer to: <https://casibase.org/docs/basic/casdoor-sso> to configure Casdoor.

Remember your `clientId``clientSecret``organization``application` and so on in Casdoor configuration, we will use them later.

### Configure Database

Casibase supports mysql, mssql, sqlite3, postgres. Casibase uses mysql by default.
Expand Down Expand Up @@ -123,6 +129,29 @@ dataSourceName = "file:casibase.db?cache=shared"
dbName = casibase
```

### Custom configuration

Casibase supports custom configuration, you can modify the configuration file `conf/app.conf` to change the configuration.

- Backend (casibase\conf\app.conf)

```ini
casdoorEndpoint = http://localhost:8000
clientId = <Your_clientId_in_Casdoor_configuration>
clientSecret = <Your_clientSecret_in_Casdoor_configuration>
casdoorOrganization = casibase
casdoorApplication = app-casibase
```

- Frontend (casibase\web\src\Conf.js)

```js
serverUrl: "http://localhost:7001"
clientId: "<Your_clientId_in_Casdoor_configuration>"
appName: "app-casibase"
organizationName: "casibase"
```

## Run

There are currently two methods to start, you can choose one according to your own situation.
Expand Down Expand Up @@ -159,13 +188,6 @@ yarn install
yarn start
```

Visit: `http://localhost:13001` in your browser. Log into Casibase dashboard with the default global admin account: `built-in/admin`

```bash
admin
123
```

### Production mode

#### Backend
Expand Down Expand Up @@ -196,12 +218,15 @@ yarn install
yarn build
```

Visit: `http://localhost:14000` in your browser. Log into Casibase dashboard with the default global admin account: `built-in/admin`
## Preview

```bash
admin
123
```
Visit: `http://localhost:13001` in your browser. Login into Casibase dashboard with the user account you have just registered in Casdoor:

![login](/img/login-casibase.png)

Then you will go to the home page of Casibase:

![home](/img/casibase-home.png)

:::tip

Expand Down
Binary file added static/img/add-user-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/add-user-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/casibase-home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/configure-application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/configure-organization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/configure-user-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/configure-user-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/create-application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/create-organization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/login-casibase.png
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 887dec8

Please sign in to comment.