Skip to content

Commit

Permalink
Merge feature/distributed to useradd
Browse files Browse the repository at this point in the history
  • Loading branch information
Astitva committed Mar 3, 2024
2 parents 839cc84 + 766bfa0 commit 97f757e
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 10 deletions.
1 change: 1 addition & 0 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ yarn build #build the react app into build/ directory
yarn develop #start the development server without building. Great for live edits.

#Required: Choose one config for application (mandatory)
yarn config:local
yarn config:dev
yarn config:prod
yarn config:test
Expand Down
19 changes: 19 additions & 0 deletions client/config/local.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
if (typeof window !== 'undefined') {
window.env = {
REACT_APP_ENVIRONMENT: 'dev',
REACT_APP_URL: 'http://localhost/',
REACT_APP_URL_BASENAME: '',
REACT_APP_URL_DTLINK: '/lab',
REACT_APP_URL_LIBLINK: '',
REACT_APP_WORKBENCHLINK_VNCDESKTOP: '/tools/vnc/?password=vncpassword',
REACT_APP_WORKBENCHLINK_VSCODE: '/tools/vscode/',
REACT_APP_WORKBENCHLINK_JUPYTERLAB: '/lab',
REACT_APP_WORKBENCHLINK_JUPYTERNOTEBOOK: '',

REACT_APP_CLIENT_ID: '934b98f03f1b6f743832b2840bf7cccaed93c3bfe579093dd0942a433691ccc0',
REACT_APP_AUTH_AUTHORITY: 'https://gitlab.com/',
REACT_APP_REDIRECT_URI: 'http://localhost/Library',
REACT_APP_LOGOUT_REDIRECT_URI: 'http://localhost/',
REACT_APP_GITLAB_SCOPES: 'openid profile read_user read_repository api',
};
};
6 changes: 4 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ Edit all the fields according to your specific case.

Note: The Server DNS can also be an IP address.
However, for proper working it is neccessary to use the
same convention (IP/DNS) in the CLIENT_CONFIG file as well.
same convention (IP/DNS) in the `CLIENT_CONFIG` file as well.

### Website Client

- Assign the correct client config file to `CLIENT_CONFIG and
- Assign the correct client config file to `CLIENT_CONFIG` and
update the values.

| Deployment Scenario | client env file |
Expand Down Expand Up @@ -101,6 +101,8 @@ and the compose file being used.
### Caveat

The usernames in the `.env` file need to match those in the conf file.
The conf.local is used by compose.local.yml and
conf.server is used by compose.server.yml.

Traefik routes are controlled by the `.env` file
Authentication on these routes is controlled by the `conf` file.
Expand Down
1 change: 0 additions & 1 deletion docker/dev/.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ OAUTH_URL='https://gitlab.foo.com'
CLIENT_ID='xx'
CLIENT_SECRET='xx'
OAUTH_SECRET='random-secret-string'
CLIENT_CONFIG='/home/Desktop/DTaaS/deploy/config/client/env.local.js'
OAUTH_CONF_FILEPATH='/home/Desktop/DTaaS/docker/conf.local'
username1='user1'
username2='user2'
4 changes: 2 additions & 2 deletions docker/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ This scenario is for software developers:

The configuration files to be updated are:

1. client/config/dev.js
1. deploy/config/lib.docker
1. client/config/local.js
1. deploy/config/lib.docker (optional)

The relevant docker commands are:

Expand Down
2 changes: 1 addition & 1 deletion docker/dev/compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
context: ${DTAAS_DIR}/
dockerfile: ${DTAAS_DIR}/docker/dev/client.dockerfile
volumes:
- "${DTAAS_DIR}/client/config/dev.js:/dtaas/client/build/env.js"
- "${DTAAS_DIR}/client/config/local.js:/dtaas/client/build/env.js"
labels:
- "traefik.enable=true"
- "traefik.http.routers.client.entryPoints=web"
Expand Down
10 changes: 6 additions & 4 deletions docs/admin/servers/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ Here are the steps to get started:
- The callback URL informs the OAuth provider of the
page where
signed-in users should be redirected. It is the landing
homepage of the DTaaS applicati1on.
(either <http://foo.com/Library/> or <http://localhost/Library/>)
homepage of the DTaaS application.
(either <http://foo.com/_oauth/> or <http://localhost/_oauth/>)
- The logout URL is the URL for signout of gitlab and clear authorization
within traefik-forward auth.
(either <http://foo.com/_oauth/> or <http://localhost/_oauth/>)
(either <http://foo.com/_oauth/logout> or <http://localhost/_oauth/logout>).
The logout URL is to help users logout of traefik forward-auth. The logout
URL should not be entered into Gitlab OAuth application setup.

**4. OAuth Application Creation:**

Expand All @@ -72,7 +74,7 @@ Here are the steps to get started:
|Application Secret|CLIENT_SECRET| _xx_ |
|Callback URL|(to be directly entered in Gitlab OAuth registration)||
|Forward-auth secret|OAUTH_SECRET|_random-secret-string_ (password for forward-auth, can be changed to your preferred string) |
|Scopes|email||
|Scopes| read_user ||

## Development Environment

Expand Down

0 comments on commit 97f757e

Please sign in to comment.