You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: INSTALL.md
+2-10Lines changed: 2 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,6 @@ Support environment variables are:
6
6
constENV_VARS_MAPPING= {
7
7
CATENAX_PORTAL_KEYCLOAK_URL:'keycloakUrl',
8
8
CATENAX_PORTAL_CLIENT_ID:'clientId',
9
-
CATENAX_PORTAL_DEFAULT_REALM:'defaultRealm',
10
-
CATENAX_PORTAL_REALM_LOGO:'realmLogo',
11
9
CATENAX_PORTAL_API_URL:'apiUrl',
12
10
CATENAX_PORTAL_BASE_URL:'baseUrl',
13
11
};
@@ -19,12 +17,6 @@ This variable is used to set up and use keycloak
19
17
`CATENAX_PORTAL_CLIENT_ID`
20
18
This variable is used to identify the client on keycloak
21
19
22
-
`CATENAX_PORTAL_DEFAULT_REALM`
23
-
This variable is used the set de default realm of the application
24
-
25
-
`CATENAX_PORTAL_REALM_LOGO`
26
-
This variable is used to replace the logo on the application
27
-
28
20
`CATENAX_PORTAL_API_URL`
29
21
This variable points to the desired api
30
22
@@ -110,7 +102,7 @@ When running the build docker image you are able to pass through multiple enviro
110
102
### Example command:
111
103
112
104
```shell
113
-
$ docker run -d -p 4200:8080 -e CATENAX_PORTAL_DEFAULT_REALM=TEST ${dockerImage}
105
+
$ docker run -d -p 4200:8080 -e ENV_VAR=VAR_VALUE ${dockerImage}
114
106
```
115
107
116
108
#### `Docker run`
@@ -125,7 +117,7 @@ To start a container in detached mode, you use `-d=true` or just `-d` option. By
125
117
126
118
To expose a container’s internal port, an operator can start the container with the `-P` or `-p` flag. The exposed port is accessible on the host and the ports are available to any client that can reach the host.
127
119
128
-
#### `-e CATENAX_PORTAL_DEFAULT_REALM=TEST`
120
+
#### `-e ENV_VAR=VAR_VALUE`
129
121
130
122
The operator can set any environment variable in the container by using one or more `-e` flags, even overriding already defined flags by the developer with a Dockerfile `ENV`.
The user authentication is managed by keycloak and each organization has its own realm.
3
+
The user authentication is managed by the central keycloak instance managed by catena.
4
+
You can configure your IDP there.
4
5
5
-
The app supports multi tenancy-authentication, so a realm must be specified on the URL.
6
+
[Here is a link on how to do that.](https://github.com/catenax-ng/tx-portal-assets/blob/main/docs/02.%20Technical%20Integration/02.%20Identity%20Provider%20Management/02.%20Configure%20Company%20IdP.md)
6
7
7
8
```bash
8
-
http://localhost:4200/${REALM}
9
+
http://localhost:4200/
9
10
```
10
11
11
12
In the app module, there is a function which is executed during the app bootstrap.
12
-
That function retrieves the realm provided on the URL, which is used to set up the Keycloak configurations.
13
+
That function retrieves the realm provided in the environment variables,
14
+
which is used to set up the Keycloak configurations.
13
15
14
16
### App module provider
15
17
@@ -28,36 +30,12 @@ That function retrieves the realm provided on the URL, which is used to set up t
28
30
keycloak.init({
29
31
config: {
30
32
url: environment.keycloakUrl,
31
-
realm,
32
-
clientId: 'ui',
33
+
realm: environment.defaultRealm,
34
+
clientId: environment.clientId,
33
35
},
34
36
initOptions: {
35
37
onLoad: 'login-required',
36
38
checkLoginIframe: false,
37
39
},
38
40
});
39
41
```
40
-
41
-
If multi-tenancy is disabled, the default realm is considered.
42
-
Those configurations are retrieved from the environment variables.
43
-
44
-
```typescript
45
-
exportconst environment = {
46
-
defaultRealm: '${REALM}',
47
-
...
48
-
};
49
-
```
50
-
51
-
> **Note:** For a deployed app those realms are already configured in the platform chart configurations:
0 commit comments