Datacollection Module
Datacollection is installed from the regulator chart. The chart also runs MDM (Master Data Management), which keeps the reporting entities and entity groups. MDM registers with IAM as MDM-Module, next to DataCollection-Module.
The installation of Datacollection itself, including its sizing, databases and backups, is described in the Datacollection documentation. This page lists the values that connect it to the RSH platform.
Boundaries and install order
Datacollection serves both boundaries: the supervision centre on the internal boundary and the portal on the external one. It registers with both IAM instances, so install it after <INTERNAL_RELEASE> and <EXTERNAL_RELEASE>.
Values
Set the values below so that Datacollection and MDM sign in through IAM, register with both IAM instances, and reach NATS. Other keys stay at the chart default. Print the chart’s own values with helm show values <DATACOLLECTION_CHART> --version <DATACOLLECTION_VERSION>.
The file has these blocks:
globalandkeycloakturn off the user management and the Keycloak of the chart, so that users sign in through IAM.regulator-platformsets the supervision-centre hosts, the registration with IAM underrsh, and the NATS address.regulator-portalsets the portal host and the registration of the portal.platform-apiconnects the bundled Platform API to NATS.
<DATACOLLECTION_RELEASE>-values.yaml:
global:
keycloak:
confidentialClientId: rsh-datacollection-confidential-client
userManagement:
enabled: false
keycloak:
enabled: false
regulator-platform:
frontend:
ingress:
hostname: <HUB_HOST>
relayGateway:
ingress:
hostname: <RELAY_GATEWAY_HOST>
rsh:
enabled: true
rshModuleName: DataCollection-Module
rshKeycloakClient: rsh-datacollection-api
hubHostUrl: https://<HUB_HOST>
portalHostUrl: https://<PORTAL_HOST>
mdmModuleName: MDM-Module
mdmKeycloakClient: rsh-mdm-api
hubMdmUrl: https://<HUB_HOST>
portalMdmUrl: https://<PORTAL_HOST>
hubGetEntitiesUrl: https://<HUB_HOST>/api/v1/rsh/entities/hub
portalGetEntitiesUrl: https://<PORTAL_HOST>/api/v1/rsh/entities/portal
natsUrl: <NATS_URL>
regulator-portal:
portal:
ingress:
hostname: <PORTAL_HOST>
relayGateway:
url: https://<RELAY_GATEWAY_HOST>
rsh:
enabled: true
rshModuleName: DataCollection-Module
mdmModuleName: MDM-Module
platform-api:
enabled: true
global:
imageRegistry: <IMAGE_REGISTRY>
api:
messaging:
url: <NATS_URL>Configure sign-in in two more blocks of the same values file, under global. Each block tells Datacollection which issuer to accept tokens from, which client the browser signs in with, and where to fetch the keys that validate the tokens.
global.hubExternalOidcpoints the supervision centre at the internal IAM.global.portalExternalOidcpoints the portal at the external IAM.- Both blocks set
enabled: true. - Both blocks set
confidentialClientId: rsh-datacollection-confidential-client. - Both blocks set
userPath: preferred_username. - Both blocks set
disableJwksSecurity: false.
The table lists the keys whose values differ between the two blocks:
| Key | Internal, hubExternalOidc | External, portalExternalOidc |
|---|---|---|
issuer | <INTERNAL_ISSUER> | <EXTERNAL_ISSUER> |
frontendClientId | rsh-datacollection-supervisioncenter | rsh-datacollection-portal |
oidcJwksUri | <INTERNAL_ISSUER>/ | <EXTERNAL_ISSUER>/ |
keycloak., keycloak. | https://, <INTERNAL_REALM> | https://, <EXTERNAL_REALM> |
scope, endSessionEndpoint, enableStrictDiscoveryValidation | openid, <INTERNAL_ISSUER>/, true | Not set |
These points apply to the values above:
keycloak.enabled: falseandglobal.userManagement.enabled: falsehand sign-in to IAM.- The chart defaults of
rsh.rshKeycloakClientandrsh.mdmKeycloakClientaredata-collection-module-clientandmdm-module-client, so both are set. - An endpoint whose URL is empty is not registered.
Also set these values, because their chart defaults break the installation:
analytics-init.databaseConnectionsis empty. Theregulatorandmdmconnections are required, and they read the Secretsregulator-appandmdm-app. Thefactconnection reaches Trino through<TRINO_HOST>.global.storage.bucketdefaults to the release namespace, and the chart does not create the bucket. The login can come fromglobal.storage.existingSecret(keysusernameandpassword).global.image.userandglobal.image.passwordcreate the Secretdocker-credentials, which pods use only when it is also listed inglobal.image.pullSecrets.platform-api.api.storage.urlstays an in-cluster MinIO address until it is set. An installation that uses module file exchange sets the URL and bucket of the shared storage; the login comes fromapi.storage.existingSecret, or fromapi.storage.usernameandapi.storage.password.
Also set the content repository, mail and the remaining hosts in the same file:
global.gitlab.hostnameis<CONTENT_GIT_HOST>andglobal.gitlab.contentGroupis<CONTENT_GROUP>, with the token inglobal.gitlab.apiTokenor in the Secretglobal.gitlab.existingSecret(keyapiToken); see Module content.regulator-platform.smtp.useris<SMTP_USER>.smtp.passwordandregulator-platform.xbrlProcessor.abra.licenceare values only.- The other hosts (
<MOBILE_HOST>,<SUPERSET_HOST>,<JUPYTER_HOST>,<WORKFLOW_HOST>,<SCHEMA_GENERATOR_HOST>,<TRINO_HOST>) are ingress hostnames; see Hosts and certificates.
Installation
Install the release with the values file from the previous section:
helm upgrade -i <DATACOLLECTION_RELEASE> <DATACOLLECTION_CHART> \
--version <DATACOLLECTION_VERSION> \
-n <INTERNAL_NAMESPACE> \
-f <DATACOLLECTION_RELEASE>-values.yaml \
--set-file global.caCert=<CA_BUNDLE_FILE> \
--wait --wait-for-jobs --timeout 10m--wait-for-jobs waits until rsh-init has registered the module. --set-file global.caCert is needed only when the ingress certificates are signed by a CA that is not publicly trusted.
Registration
The chart registers Datacollection with both IAM instances in the Job rsh-init-<appVersion>. The Job runs only when regulator-platform.rsh.enabled is true. It fails when one of the IAM instances does not answer.
- The credentials of the registration clients are stored in
<DATACOLLECTION_RELEASE>-rsh-client-credentials. - The secrets of the confidential clients are stored in
hub-keycloak-client-secretsandportal-keycloak-client-secrets. rsh-initcreates only clients that do not exist yet. Change an existing client in IAM.
After the installation, check in both IAM instances:
| Item | Value |
|---|---|
| Application IDs | DataCollection-Module (rsh.) and MDM-Module (rsh.) |
| Registration clients | rsh-datacollection-api (rsh.) and rsh-mdm-api (rsh.) |
| Platform API instance | data-collection. The chart sets this name, and rsh-init calls http://, so one release runs per namespace with that name. |
Datacollection sends its registrations through that Platform API instance and reads IAM’s answers from JetStream through rsh.natsUrl.
platform-api.global.imageRegistryis the registry of the Platform API image, which is published with the RSH platform, so its path can differ fromglobal.image.registry.- Its pull Secret is
platform-api.global.imagePullSecrets.global.image.pullSecretsdoes not apply to this subchart.
IAM calls the endpoints below to read the roles, entities and entity groups of Datacollection. The chart builds each address from the values set above: the endpoint path is appended to the base URL of its boundary, and only the boundaries in rsh.boundaries are registered.
| Application ID | Capability | Base URL | Endpoint |
|---|---|---|---|
DataCollection-Module | getRoles | rsh. (internal), rsh. (external) | / (internal), / (external) |
MDM-Module | getRoles | rsh. (internal), rsh. (external) | / (internal), / (external) |
| Both | getEntities | None; the value is the full URL | rsh. (internal), rsh. (external) |
| Both | getEntityGroups | rsh. (internal), rsh. (external) | / |
| Both | getEntityGroupMemberships | rsh. (internal), rsh. (external) | / |
entityEndpointsEnabled: falsestops the registration ofgetEntitiesandgetEntityGroups.getEntityGroupMembershipsis still registered.- With the default
true, both registrations offer the entity endpoints, so MDM provides the global entities context; see Global entities. - MDM receives the entities that Licensing publishes on
hub.entity.
IAM clients
rsh-init creates these clients in IAM so that the supervision centre, the portal and the module itself can sign in. The chart’s default clients are not used.
rsh.iamClientsConfig replaces the chart default.
- The chart default is
abacus360,confidential-client,supersetandform-editoron the internal boundary, andabacus360andconfidential-clienton the external one. - Its client IDs match
global.hubExternalOidc.frontendClientId,global.portalExternalOidc.frontendClientIdandglobal.keycloak.confidentialClientId.
Set rsh.iamClientsConfig to the full definition:
regulator-platform:
rsh:
iamClientsConfig:
hub-clients.yaml: |
clients:
- clientId: "rsh-datacollection-supervisioncenter"
name: "RSH DCS - Supervision Center"
publicClient: true
protocol: openid-connect
directAccessGrantsEnabled: true
enabled: true
serviceAccountsEnabled: false
standardFlowEnabled: true
implicitFlowEnabled: false
bearerOnly: false
consentRequired: false
redirectUris:
- "*"
webOrigins:
- "*"
protocolMappers:
- name: "confidential-client-audience"
protocol: "openid-connect"
protocolMapper: "oidc-audience-mapper"
consentRequired: false
config:
included.client.audience: "rsh-datacollection-confidential-client"
id.token.claim: "true"
lightweight.claim: "false"
access.token.claim: "true"
introspection.token.claim: "true"
- name: "Audience Mapper"
protocol: "openid-connect"
protocolMapper: "oidc-audience-mapper"
consentRequired: false
config:
included.client.audience: "rsh-datacollection-supervisioncenter"
id.token.claim: "false"
access.token.claim: "true"
- name: "Impersonator Username"
protocol: "openid-connect"
protocolMapper: "oidc-usersessionmodel-note-mapper"
consentRequired: false
config:
user.session.note: "IMPERSONATOR_USERNAME"
id.token.claim: "true"
access.token.claim: "true"
claim.name: "impersonator.username"
jsonType.label: "String"
- name: "Impersonator User ID"
protocol: "openid-connect"
protocolMapper: "oidc-usersessionmodel-note-mapper"
consentRequired: false
config:
user.session.note: "IMPERSONATOR_ID"
id.token.claim: "true"
access.token.claim: "true"
claim.name: "impersonator.id"
jsonType.label: "String"
defaultClientScopes:
- "web-origins"
- "acr"
- "phone"
- "roles"
- "profile"
- "basic"
- "email"
- "custom-permissions_token-exchange"
optionalClientScopes:
- "address"
- "organization"
- "offline_access"
- "groups"
- "custom-permissions_instant"
- "microprofile-jwt"
access:
view: true
configure: true
manage: true
- clientId: "rsh-datacollection-confidential-client"
name: "RSH DCS - Operaton"
publicClient: false
protocol: openid-connect
directAccessGrantsEnabled: true
serviceAccountsEnabled: true
enabled: true
standardFlowEnabled: true
implicitFlowEnabled: false
bearerOnly: false
consentRequired: false
redirectUris:
- "*"
attributes:
client_credentials.use_refresh_token: "true"
standard.token.exchange.enabled: "true"
- clientId: "rsh-datacollection-form-editor"
name: "RSH DCS - Supervision Center - Form Editor"
publicClient: true
protocol: openid-connect
directAccessGrantsEnabled: true
enabled: true
serviceAccountsEnabled: false
standardFlowEnabled: true
implicitFlowEnabled: false
bearerOnly: false
consentRequired: false
redirectUris:
- "*"
webOrigins:
- "*"
users:
- serviceAccountClientId: "rsh-datacollection-confidential-client"
clientRoles:
realm-management:
- "query-groups"
- "query-users"
- "view-users"
portal-clients.yaml: |
clients:
- clientId: "rsh-datacollection-portal"
name: "RSH DCS - Portal"
publicClient: true
protocol: openid-connect
directAccessGrantsEnabled: true
enabled: true
serviceAccountsEnabled: false
standardFlowEnabled: true
implicitFlowEnabled: false
bearerOnly: false
consentRequired: false
redirectUris:
- "*"
webOrigins:
- "*"
protocolMappers:
- name: "confidential-client-audience"
protocol: "openid-connect"
protocolMapper: "oidc-audience-mapper"
consentRequired: false
config:
included.client.audience: "rsh-datacollection-confidential-client"
id.token.claim: "true"
lightweight.claim: "false"
access.token.claim: "true"
introspection.token.claim: "true"
- name: "Audience Mapper"
protocol: "openid-connect"
protocolMapper: "oidc-audience-mapper"
consentRequired: false
config:
included.client.audience: "rsh-datacollection-portal"
id.token.claim: "false"
access.token.claim: "true"
- name: "Impersonator Username"
protocol: "openid-connect"
protocolMapper: "oidc-usersessionmodel-note-mapper"
consentRequired: false
config:
user.session.note: "IMPERSONATOR_USERNAME"
id.token.claim: "true"
access.token.claim: "true"
claim.name: "impersonator.username"
jsonType.label: "String"
- name: "Impersonator User ID"
protocol: "openid-connect"
protocolMapper: "oidc-usersessionmodel-note-mapper"
consentRequired: false
config:
user.session.note: "IMPERSONATOR_ID"
id.token.claim: "true"
access.token.claim: "true"
claim.name: "impersonator.id"
jsonType.label: "String"
defaultClientScopes:
- "web-origins"
- "acr"
- "phone"
- "roles"
- "profile"
- "basic"
- "email"
- "custom-permissions_token-exchange"
optionalClientScopes:
- "address"
- "organization"
- "offline_access"
- "groups"
- "custom-permissions_instant"
- "microprofile-jwt"
access:
view: true
configure: true
manage: true
- clientId: "rsh-datacollection-confidential-client"
name: "RSH DCS - gateway"
publicClient: false
protocol: openid-connect
directAccessGrantsEnabled: true
serviceAccountsEnabled: true
enabled: true
standardFlowEnabled: true
implicitFlowEnabled: false
bearerOnly: false
consentRequired: false
redirectUris:
- "*"
attributes:
client_credentials.use_refresh_token: "true"
standard.token.exchange.enabled: "true"
users:
- serviceAccountClientId: "rsh-datacollection-confidential-client"
clientRoles:
realm-management:
- "query-groups"
- "query-users"
- "view-users"Redirect URIs and web origins
The definitions above allow every redirect URI and web origin ("*"). A production environment restricts redirectUris and webOrigins to the hosts that sign in through each client, for example https://<HUB_HOST>/* and https://<HUB_HOST> for rsh-datacollection-supervisioncenter. rsh-init does not update existing clients, so set the restriction before the first installation, or make it in IAM afterwards.
Hosts and certificates
Give each host below a DNS name and a certificate, and publish it to the portal users or keep it on the internal network:
<PORTAL_HOST>is published to the portal users.<HUB_HOST>and the hosts behind the platform proxy (<SUPERSET_HOST>,<JUPYTER_HOST>,<WORKFLOW_HOST>) are reached from the internal network only.<MOBILE_HOST>,<RELAY_GATEWAY_HOST>,<SCHEMA_GENERATOR_HOST>and<TRINO_HOST>are further ingress hostnames. Environment Parameters names each host.- Each ingress takes its certificate from cert-manager through the
cert-manager.io/cluster-issuerannotation, or fromglobal.ingress.tlsSecretName. WithtlsSecretName: "", each ingress uses<ingress-name>.<DATACOLLECTION_DOMAIN>-application-tls. - On OpenShift the ingresses have no TLS section; see OpenShift Differences.
Storage and database
Datacollection keeps its own files in the bucket of global.storage. The databases are the CloudNativePG clusters regulator and mdm, which the chart creates on global.storageClass unless global.externalDatabases points at existing databases.