Skip to content

Commit 1a6f7d0

Browse files
committed
fix: update client configuration to be handled correctly by ory hydra
1 parent bb9e708 commit 1a6f7d0

File tree

12 files changed

+719
-86
lines changed

12 files changed

+719
-86
lines changed

charts/management-portal/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ A Helm chart for RADAR-Base Management Portal to manage projects and participant
8888
| startupProbe.failureThreshold | int | `30` | Failure threshold for startupProbe |
8989
| networkpolicy | object | check `values.yaml` | Network policy defines who can access this application and who this applications has access to |
9090
| keystore | string | `""` | base 64 encoded binary p12 keystore containing a ECDSA certificate with alias `radarbase-managementportal-ec` and a RSA certificate with alias `selfsigned`. |
91+
| public_jwks | string | `""` | |
9192
| postgres.host | string | `nil` | host name of the postgres db |
9293
| postgres.port | string | `nil` | post of the postgres db |
9394
| postgres.database | string | `nil` | database name |
@@ -108,6 +109,7 @@ A Helm chart for RADAR-Base Management Portal to manage projects and participant
108109
| authserver.server_url | string | `"http://radar-hydra-public:4444"` | The publicly accessible server URL for the authserver; needed when deviating from http(s)://server_name/auth |
109110
| authserver.server_admin_url | string | `"http://radar-hydra-admin:4445"` | The admin server URL for the authserver used for service-to-service requests. Only needs to be accessible from inside the cluster where the managementportal resides |
110111
| authserver.login_url | string | `"{{ .Values.advertised_protocol }}://{{ .Values.server_name }}/hydra"` | The publicly accessible login URL for the authserver; needed when deviating from http(s)://server_name/auth/login |
112+
| authserver.client_secret | string | `"secret"` | |
111113
| managementportal.catalogue_server_enable_auto_import | bool | `false` | set to true, if automatic source-type import from catalogue server should be enabled |
112114
| managementportal.common_privacy_policy_url | string | `"http://info.thehyve.nl/radar-cns-privacy-policy"` | Override with a publicly resolvable url of the privacy-policy url for your set-up. This can be overridden on a project basis as well. |
113115
| managementportal.oauth_checking_key_aliases_0 | string | `"radarbase-managementportal-ec"` | Keystore alias to sign JWT tokens from Management Portal |

charts/management-portal/templates/deployment.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,21 @@ spec:
8282
value: {{ printf "%s://%s" .Values.advertised_protocol .Values.server_name }}
8383
- name: MANAGEMENTPORTAL_COMMON_MANAGEMENT_PORTAL_BASE_URL
8484
value: {{ printf "%s://%s/managementportal" .Values.advertised_protocol .Values.server_name }}
85+
{{/* TODO for now secret with client_id and client_secret replaced with job creating clients with fixed client names*/}}
86+
{{/* - name: MANAGEMENTPORTAL_FRONTEND_CLIENTID*/}}
87+
{{/* valueFrom:*/}}
88+
{{/* secretKeyRef:*/}}
89+
{{/* name: managementportalapp-oauth-client*/}}
90+
{{/* key: CLIENT_ID*/}}
91+
{{/* - name: MANAGEMENTPORTAL_FRONTEND_CLIENT_SECRET*/}}
92+
{{/* valueFrom:*/}}
93+
{{/* secretKeyRef:*/}}
94+
{{/* name: managementportalapp-oauth-client*/}}
95+
{{/* key: CLIENT_SECRET*/}}
8596
- name: MANAGEMENTPORTAL_FRONTEND_CLIENTID
86-
valueFrom:
87-
secretKeyRef:
88-
name: managementportal-oauth-client
89-
key: CLIENT_ID
97+
value: "ManagementPortalapp"
9098
- name: MANAGEMENTPORTAL_FRONTEND_CLIENT_SECRET
91-
valueFrom:
92-
secretKeyRef:
93-
name: managementportal-oauth-client
94-
key: CLIENT_SECRET
99+
value: "{{ .Values.authserver.client_secret }}"
95100
- name: MANAGEMENTPORTAL_CATALOGUE_SERVER_ENABLE_AUTO_IMPORT
96101
value: "{{ .Values.managementportal.catalogue_server_enable_auto_import }}"
97102
- name: MANAGEMENTPORTAL_OAUTH_CLIENTS_FILE

charts/management-portal/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ authserver:
348348
server_admin_url: http://radar-hydra-admin:4445
349349
# -- The publicly accessible login URL for the authserver; needed when deviating from http(s)://server_name/auth/login
350350
login_url: '{{ .Values.advertised_protocol }}://{{ .Values.server_name }}/hydra'
351+
client_secret: secret
351352

352353
managementportal:
353354
# -- set to true, if automatic source-type import from catalogue server should be enabled

charts/radar-fitbit-connector/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ A Helm chart for RADAR-base fitbit connector. This application collects data fro
9393
| fitbit_api_url | string | `"https://api.fitbit.com"` | Fitbit API URL. |
9494
| fitbit_api_client | string | `""` | Fitbit API client id. |
9595
| fitbit_api_secret | string | `""` | Fitbit API client secret. |
96-
| oauthClientId | string | `"radar_fitbit_connector"` | OAuth2 client id from Management Portal |
97-
| oauthClientSecret | string | `"secret"` | OAuth2 client secret from Management Portal |
98-
| auth_url | string | `"http://management-portal:8080/managementportal/oauth/token"` | OAuth2 Auth URL for connector client to get access tokens |
96+
| oauthClientId | string | `"radar_fitbit_connector"` | OAuth2 client id from Hydra |
97+
| oauthClientSecret | string | `"secret"` | OAuth2 client secret from Hydra |
98+
| auth_url | string | `"http://radar-hydra-public:4444/oauth2/token"` | OAuth2 Auth URL for connector client to get access tokens |
9999
| managementportal_url | string | `"http://management-portal:8080/managementportal"` | URL of Management Portal. This will be used to create URLs to access Management Portal |
100100
| includeIntradayData | bool | `true` | Set to true, if intraday access data should be collected by the connector. This will be set in connector.properties. |
101-
| user_repository_class | string | `"ServiceUserRepositoryLegacy"` | Class of the user repository to use. This should be a class that implements the UserRepository interface. |
101+
| user_repository_class | string | `"ServiceUserRepository"` | Class of the user repository to use. This should be a class that implements the UserRepository interface. |
102102
| rest_source_poll_interval_ms | int | `60000` | How often to poll the source URL. Only use to speed up processing times during e2e testing. |
103103
| fitbit_user_poll_interval | int | `5000` | Polling interval per Fitbit user per request route in seconds. Only use to speed up processing times during e2e testing. |
104104
| application_loop_interval_ms | int | `300000` | How often to perform the main application loop (only controls how often to poll for new user registrations). Only use to speed up processing times during e2e testing. |

charts/radar-fitbit-connector/values.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ networkpolicy:
197197
podSelector:
198198
matchLabels:
199199
app.kubernetes.io/name: 'management-portal'
200+
- namespaceSelector:
201+
matchLabels:
202+
kubernetes.io/metadata.name: '{{ .Release.Namespace }}'
203+
podSelector:
204+
matchLabels:
205+
app.kubernetes.io/name: 'radar-hydra'
200206
- to:
201207
- namespaceSelector:
202208
matchLabels:
@@ -238,19 +244,19 @@ fitbit_api_client: ""
238244
# -- Fitbit API client secret.
239245
fitbit_api_secret: ""
240246

241-
# -- OAuth2 client id from Management Portal
247+
# -- OAuth2 client id from Hydra
242248
oauthClientId: radar_fitbit_connector
243-
# -- OAuth2 client secret from Management Portal
249+
# -- OAuth2 client secret from Hydra
244250
oauthClientSecret: secret
245251
# -- OAuth2 Auth URL for connector client to get access tokens
246-
auth_url: http://management-portal:8080/managementportal/oauth/token
252+
auth_url: http://radar-hydra-public:4444/oauth2/token
247253
# -- URL of Management Portal. This will be used to create URLs to access Management Portal
248254
managementportal_url: http://management-portal:8080/managementportal
249255
# -- Set to true, if intraday access data should be collected by the connector. This will be set in connector.properties.
250256
includeIntradayData: true
251257

252258
# -- Class of the user repository to use. This should be a class that implements the UserRepository interface.
253-
user_repository_class: ServiceUserRepositoryLegacy
259+
user_repository_class: ServiceUserRepository
254260

255261
# -- How often to poll the source URL.
256262
# Only use to speed up processing times during e2e testing.

0 commit comments

Comments
 (0)