Skip to content

Commit

Permalink
add permission support documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Karthik <[email protected]>
  • Loading branch information
karthikjeeyar committed Nov 22, 2024
1 parent 2dc7f6d commit fbb89a2
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
25 changes: 25 additions & 0 deletions workspaces/lightspeed/plugins/lightspeed-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,28 @@ lightspeed:
url: 'https://localhost:443/v1'
token: 'js92n-ssj28dbdk902' # dummy token
```
#### Permission Framework Support
The Lightspeed Backend plugin has support for the permission framework.
- When [RBAC permission](https://github.com/backstage/community-plugins/tree/main/workspaces/rbac/plugins/rbac-backend#installation) framework is enabled, for non-admin users to access lightspeed backend API, the role associated with your user should have the following permission policies associated with it. Add the following in your permission policies configuration file named `rbac-policy.csv`:

```CSV
p, role:default/team_a, lightspeed.conversations.read, read, allow
p, role:default/team_a, lightspeed.conversations.create, create, allow
p, role:default/team_a, lightspeed.conversations.delete, delete, allow
g, user:default/<your-user-name>, role:default/team_a
```

You can specify the path to this configuration file in your application configuration:

```yaml
permission:
enabled: true
rbac:
policies-csv-file: /some/path/rbac-policy.csv
policyFileReload: true
```
27 changes: 27 additions & 0 deletions workspaces/lightspeed/plugins/lightspeed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,33 @@ The Lightspeed plugin enables you to interact with any LLM server running a mode

- Follow the lightspeed backend plugin [README](https://github.com/janus-idp/backstage-plugins/tree/main/plugins/lightspeed-backend) to integrate lightspeed backend in your Backstage instance.

**Note**

### Permission Framework Support

The Lightspeed plugin has support for the permission framework.

- When [RBAC permission](https://github.com/backstage/community-plugins/tree/main/workspaces/rbac/plugins/rbac-backend#installation) framework is enabled, for non-admin users to access lightspeed UI, the role associated with your user should have the following permission policies associated with it. Add the following in your permission policies configuration file named `rbac-policy.csv`:

```CSV
p, role:default/team_a, lightspeed.conversations.read, read, allow
p, role:default/team_a, lightspeed.conversations.create, create, allow
p, role:default/team_a, lightspeed.conversations.delete, delete, allow
g, user:default/<your-user-name>, role:default/team_a
```

You can specify the path to this configuration file in your application configuration:

```yaml
permission:
enabled: true
rbac:
policies-csv-file: /some/path/rbac-policy.csv
policyFileReload: true
```
### Installation
1. Install the Lightspeed plugin using the following command:
Expand Down

0 comments on commit fbb89a2

Please sign in to comment.