Skip to content

Commit b749b96

Browse files
committed
ftr: remove traces of realm usage bc not allowed by cx
TRACEFOSS-xxx
1 parent e35897b commit b749b96

32 files changed

+28
-138
lines changed

INSTALL.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Support environment variables are:
66
const ENV_VARS_MAPPING = {
77
CATENAX_PORTAL_KEYCLOAK_URL: 'keycloakUrl',
88
CATENAX_PORTAL_CLIENT_ID: 'clientId',
9-
CATENAX_PORTAL_DEFAULT_REALM: 'defaultRealm',
10-
CATENAX_PORTAL_REALM_LOGO: 'realmLogo',
119
CATENAX_PORTAL_API_URL: 'apiUrl',
1210
CATENAX_PORTAL_BASE_URL: 'baseUrl',
1311
};
@@ -19,12 +17,6 @@ This variable is used to set up and use keycloak
1917
`CATENAX_PORTAL_CLIENT_ID`
2018
This variable is used to identify the client on keycloak
2119

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-
2820
`CATENAX_PORTAL_API_URL`
2921
This variable points to the desired api
3022

@@ -110,7 +102,7 @@ When running the build docker image you are able to pass through multiple enviro
110102
### Example command:
111103
112104
```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}
114106
```
115107

116108
#### `Docker run`
@@ -125,7 +117,7 @@ To start a container in detached mode, you use `-d=true` or just `-d` option. By
125117

126118
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.
127119

128-
#### `-e CATENAX_PORTAL_DEFAULT_REALM=TEST`
120+
#### `-e ENV_VAR=VAR_VALUE`
129121

130122
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`.
131123

charts/traceability-foss-frontend/templates/deployment.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ spec:
4949
value: "{{ .Values.image.CATENAX_PORTAL_KEYCLOAK_URL }}"
5050
- name: CATENAX_PORTAL_CLIENT_ID
5151
value: "{{ .Values.image.CATENAX_PORTAL_CLIENT_ID }}"
52-
- name: CATENAX_PORTAL_DEFAULT_REALM
53-
value: "{{ .Values.image.CATENAX_PORTAL_DEFAULT_REALM }}"
5452
ports:
5553
- name: http
5654
containerPort: {{ .Values.service.port }}

charts/traceability-foss-frontend/values-dev-test.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ image:
33
tag: $ARGOCD_APP_REVISION
44
CATENAX_PORTAL_API_URL: 'https://traceability-test.dev.demo.catena-x.net/api'
55
CATENAX_PORTAL_KEYCLOAK_URL: 'https://centralidp.dev.demo.catena-x.net/auth'
6-
CATENAX_PORTAL_CLIENT_ID: 'Cl17-CX-Part'
7-
CATENAX_PORTAL_DEFAULT_REALM: 'CX-Central'
86

97
nameOverride: "traceability-foss-test-frontend"
108
fullnameOverride: "traceability-foss-test-frontend"

charts/traceability-foss-frontend/values-dev.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ image:
22
tag: $ARGOCD_APP_REVISION
33
CATENAX_PORTAL_API_URL: 'https://traceability.dev.demo.catena-x.net/api'
44
CATENAX_PORTAL_KEYCLOAK_URL: 'https://centralidp.dev.demo.catena-x.net/auth'
5-
CATENAX_PORTAL_CLIENT_ID: 'Cl17-CX-Part'
6-
CATENAX_PORTAL_DEFAULT_REALM: 'CX-Central'
75

86
ingress:
97
enabled: true

charts/traceability-foss-frontend/values-int-test.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ image:
22
tag: $ARGOCD_APP_REVISION
33
CATENAX_PORTAL_API_URL: 'https://traceability-test.int.demo.catena-x.net/api'
44
CATENAX_PORTAL_KEYCLOAK_URL: 'https://centralidp.int.demo.catena-x.net/auth'
5-
CATENAX_PORTAL_CLIENT_ID: 'Cl17-CX-Part'
6-
CATENAX_PORTAL_DEFAULT_REALM: 'CX-Central'
75

86
nameOverride: "traceability-foss-test-frontend"
97
fullnameOverride: "traceability-foss-test-frontend"

charts/traceability-foss-frontend/values-int.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ image:
22
tag: $ARGOCD_APP_REVISION
33
CATENAX_PORTAL_API_URL: 'https://traceability.int.demo.catena-x.net/api'
44
CATENAX_PORTAL_KEYCLOAK_URL: 'https://centralidp.int.demo.catena-x.net/auth'
5-
CATENAX_PORTAL_CLIENT_ID: 'Cl17-CX-Part'
6-
CATENAX_PORTAL_DEFAULT_REALM: 'CX-Central'
75

86
ingress:
97
enabled: true

charts/traceability-foss-frontend/values-pen.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ image:
22
tag: $ARGOCD_APP_REVISION
33
CATENAX_PORTAL_API_URL: 'https://traceability-pen.dev.demo.catena-x.net/api'
44
CATENAX_PORTAL_KEYCLOAK_URL: 'https://centralidp-pen.dev.demo.catena-x.net/auth'
5-
CATENAX_PORTAL_CLIENT_ID: 'Cl17-CX-Part'
6-
CATENAX_PORTAL_DEFAULT_REALM: 'CX-Central'
75

86
# important to not conflict with dev env (both use same ArgoCD instance)
97
namespace: product-traceability-foss-pen

charts/traceability-foss-frontend/values-pre-prod.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ image:
22
tag: $ARGOCD_APP_REVISION
33
CATENAX_PORTAL_API_URL: 'https://traceability.pre-prod.demo.catena-x.net/api'
44
CATENAX_PORTAL_KEYCLOAK_URL: 'https://centralidp.pre-prod.demo.catena-x.net/auth'
5-
CATENAX_PORTAL_CLIENT_ID: 'Cl17-CX-Part'
6-
CATENAX_PORTAL_DEFAULT_REALM: 'CX-Central'
75

86
ingress:
97
enabled: true

docs/authentication.md

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
## Authentication
22

3-
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.
45

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)
67

78
```bash
8-
http://localhost:4200/${REALM}
9+
http://localhost:4200/
910
```
1011

1112
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.
1315

1416
### App module provider
1517

@@ -28,36 +30,12 @@ That function retrieves the realm provided on the URL, which is used to set up t
2830
keycloak.init({
2931
config: {
3032
url: environment.keycloakUrl,
31-
realm,
32-
clientId: 'ui',
33+
realm: environment.defaultRealm,
34+
clientId: environment.clientId,
3335
},
3436
initOptions: {
3537
onLoad: 'login-required',
3638
checkLoginIframe: false,
3739
},
3840
});
3941
```
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-
export const environment = {
46-
defaultRealm: '${REALM}',
47-
...
48-
};
49-
```
50-
51-
> **Note:** For a deployed app those realms are already configured in the platform chart configurations:
52-
53-
```yaml
54-
ui:
55-
fullnameOverride: ui
56-
image: ${IMAGE}
57-
hosts:
58-
${REALM}: ui.${COMPANY-X}.test.catenax.partchain.dev
59-
nodeSelector:
60-
agentpool: application
61-
```
62-
63-
When a user navigates to that URL, the realm is mapped with the URL's company name.

docs/configuration.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ export const environment = {
154154
defaultRealm: 'mock',
155155
realmLogo: '/assets/images/logo.png',
156156
apiUrl: '/api', // specify where is placed backend API
157-
realmRegExp: '^https?://[^/]+/([-a-z-A-Z-0-9]+)',
158157
baseUrl: '/',
159158
mapStyles: 'mapbox://styles/mapbox/light-v10',
160159
};
@@ -288,8 +287,6 @@ Support environment variables are:
288287
const ENV_VARS_MAPPING = {
289288
CATENAX_PORTAL_KEYCLOAK_URL: 'keycloakUrl',
290289
CATENAX_PORTAL_CLIENT_ID: 'clientId',
291-
CATENAX_PORTAL_DEFAULT_REALM: 'defaultRealm',
292-
CATENAX_PORTAL_REALM_LOGO: 'realmLogo',
293290
CATENAX_PORTAL_API_URL: 'apiUrl',
294291
CATENAX_PORTAL_BASE_URL: 'baseUrl',
295292
};
@@ -301,12 +298,6 @@ This variable is used to set up and use keycloak
301298
`CATENAX_PORTAL_CLIENT_ID`
302299
This variable is used to identify the client on keycloak
303300

304-
`CATENAX_PORTAL_DEFAULT_REALM`
305-
This variable is used the set de default realm of the application
306-
307-
`CATENAX_PORTAL_REALM_LOGO`
308-
This variable is used to replace the logo on the application
309-
310301
`CATENAX_PORTAL_API_URL`
311302
This variable points to the desired api
312303

0 commit comments

Comments
 (0)