Skip to content

Commit

Permalink
Fixes codeclimate issues
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadtalasila committed Jun 5, 2024
1 parent c3e3164 commit 674cef5
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 44 deletions.
2 changes: 1 addition & 1 deletion docs/admin/client/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Here are the steps to get started:
homepage of the DTaaS application.
- The logout URL is where users will be directed after logging out.

**4. OAuth Application Creation:**
**4. OAuth Application Creation:**

- During the creation of the OAuth application on GitLab, you need to specify
the scope. Choose openid, profile, read_user, read_repository, and api scopes.
Expand Down
45 changes: 24 additions & 21 deletions docs/admin/guides/add_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,36 @@ removing a user account.

Please do the following:

1. **Add user to Gitlab instance:**
Add a new account for the new user on the Gitlab instance.
Note the username and email of the new account.
**1. Add user to Gitlab instance:**

1. Use the [DTaaS CLI](../cli.md) to bring up the workspaces for new users.
This brings up the containers, without the backend authorization.
Add a new account for the new user on the Gitlab instance.
Note the username and email of the new account.

1. Add backend authorization for the user
**2. Create User Workspace:**

1. Go to the _docker_ directory
Use the [DTaaS CLI](../cli.md) to bring up the workspaces for new users.
This brings up the containers, without the backend authorization.

```bash
cd <DTaaS>/docker
```
**3. Add backend authorization for the user:**

1. Add three lines to the `conf.server` file
- Go to the _docker_ directory

```txt
rule.onlyu3.action=auth
rule.onlyu3.rule=PathPrefix(`/alice`)
rule.onlyu3.whitelist = [email protected]
```
```bash
cd <DTaaS>/docker
```

1. Restart the docker container responsible for backend authorization.
- Add three lines to the `conf.server` file

```bash
docker compose -f compose.server.yml --env-file .env up -d --force-recreate traefik-forward-auth
```
```txt
rule.onlyu3.action=auth
rule.onlyu3.rule=PathPrefix(`/alice`)
rule.onlyu3.whitelist = [email protected]
```

1. The new users are now added to the DTaaS instance, with authorization enabled.
**4. Restart the docker container responsible for backend authorization.**

```bash
docker compose -f compose.server.yml --env-file .env up -d --force-recreate traefik-forward-auth
```

**5. The new users are now added to the DTaaS instance, with authorization enabled.**
45 changes: 23 additions & 22 deletions docs/admin/guides/remove_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,39 @@ removing a user account.

Please do the following:

1. Remove an existing user with the [DTaaS CLI](../cli.md)
**1. Remove an existing user with the [DTaaS CLI](../cli.md)**

1. Remove backend authorization for the user:
**2. Remove backend authorization for the user:**

- Go to the _docker_ directory
- Go to the _docker_ directory

```bash
cd <DTaaS>/docker
```
```bash
cd <DTaaS>/docker
```

- Remove these three lines from the `conf.server` file
- Remove these three lines from the `conf.server` file

```txt
rule.onlyu3.action=auth
rule.onlyu3.rule=PathPrefix(`/alice`)
rule.onlyu3.whitelist = [email protected]
```
```txt
rule.onlyu3.action=auth
rule.onlyu3.rule=PathPrefix(`/alice`)
rule.onlyu3.whitelist = [email protected]
```

- Run the command for these changes to take effect:
- Run the command for these changes to take effect:

```bash
docker compose -f compose.server.yml --env-file .env up -d --force-recreate traefik-forward-auth
```
```bash
docker compose -f compose.server.yml --env-file .env up -d --force-recreate traefik-forward-auth
```

The extra users now have no backend authorization.
The extra users now have no backend authorization.

1. Remove users to Gitlab instance (optional)
Please see
[gitlab docs](https://docs.gitlab.com/ee/user/profile/account/delete_account.html)
for more help.
**3. Remove users to Gitlab instance (optional):**

1. **The user account is now deleted**
Please see
[gitlab docs](https://docs.gitlab.com/ee/user/profile/account/delete_account.html)
for more help.

**4. The user account is now deleted.**

## Caveat

Expand Down

0 comments on commit 674cef5

Please sign in to comment.