Skip to content

Commit

Permalink
Merge pull request #758 from catenax-ng/revert-742-revert-741-revert-…
Browse files Browse the repository at this point in the history
…737-feature/378-separate-credentials-config

Revert "Revert "Revert "feat(impl):[#378] separate credentials config"""
  • Loading branch information
ds-jhartmann authored Feb 6, 2024
2 parents 2d7ad3f + 4c28b29 commit d7bfe06
Show file tree
Hide file tree
Showing 18 changed files with 118 additions and 166 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated license header to "Copyright (c) 2021,2024 Contributors to the Eclipse Foundation"
- Changed lookupGlobalAssetIds to lookupShellsByBPN, which provides full object.
- Suppressed CVE-2024-20932 from graal-sdk-21.2.0.jar because this is not applicable for IRS.
- Updated configuration of `DISCOVERY_REST_TEMPLATE` from `ess.discovery.*` to `digitalTwinRegistry.discovery.*` and discovery finder URL from `digitalTwinRegistry.discoveryFinderUrl` to `digitalTwinRegistry.discovery.discoveryFinderUrl`
- Redesigned Shell object - wrapped payload and added "contractAgreementId" field
- Changed structure of Policy creation to match EDC format

Expand Down
8 changes: 0 additions & 8 deletions charts/irs-helm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Added configuration parameters `oauth2.semantics.clientId`,`oauth2.semantics.clientSecret`, `oauth2.discovery.clientId`,`oauth2.discovery.clientSecret`, `oauth2.bpdm.clientId`,`oauth2.bpdm.clientSecret`

### Removed
- Removed configuration parameters `oauth2.clientId`,`oauth2.clientSecret`, `portal.oauth2.clientId`,`portal.oauth2.clientSecret`

### Changed
- Changed configuration for discovery finder url from `digitalTwinRegistry.discoveryFinderUrl` to `discovery.discoveryFinderUrl`

## [6.13.0] - 2024-01-15
- Update IRS version to 4.4.0
Expand Down
30 changes: 10 additions & 20 deletions charts/irs-helm/templates/configmap-spring-app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,46 +56,36 @@ data:
oauth2:
client:
registration:
semantics:
client-id: "${SEMANTICS_OAUTH2_CLIENT_ID}" # taken from secret ENV
client-secret: "${SEMANTICS_OAUTH2_CLIENT_SECRET}" # taken from secret ENV
discovery:
client-id: ${DISCOVERY_OAUTH2_CLIENT_ID} # taken from secret ENV
client-secret: ${DISCOVERY_OAUTH2_CLIENT_SECRET} # taken from secret ENV
bpdm:
client-id: ${BPDM_OAUTH2_CLIENT_ID} # taken from secret ENV
client-secret: ${BPDM_OAUTH2_CLIENT_SECRET} # taken from secret ENV
common:
client-id: "${OAUTH2_CLIENT_ID}" # taken from secret ENV
client-secret: "${OAUTH2_CLIENT_SECRET}" # taken from secret ENV
portal:
client-id: ${PORTAL_OAUTH2_CLIENT_ID} # taken from secret ENV
client-secret: ${PORTAL_OAUTH2_CLIENT_SECRET} # taken from secret ENV
provider:
semantics:
common:
token-uri: {{ tpl (.Values.oauth2.clientTokenUri | default "http://localhost") . | quote }}
discovery:
token-uri: {{ tpl (.Values.oauth2.clientTokenUri | default "http://localhost") . | quote }}
bpdm:
portal:
token-uri: {{ tpl (.Values.oauth2.clientTokenUri | default "http://localhost") . | quote }}
digitalTwinRegistry:
descriptorEndpoint: {{ tpl (.Values.digitalTwinRegistry.descriptorEndpoint | default "") . | quote }}
shellLookupEndpoint: {{ tpl (.Values.digitalTwinRegistry.shellLookupEndpoint | default "") . | quote }}
discoveryFinderUrl: {{ tpl (.Values.digitalTwinRegistry.discoveryFinderUrl | default "") . | quote }}
shellDescriptorTemplate: {{ .Values.digitalTwinRegistry.shellDescriptorTemplate | default "" | quote }}
lookupShellsTemplate: {{ .Values.digitalTwinRegistry.lookupShellsTemplate | default "" | quote }}
type: {{ tpl (.Values.digitalTwinRegistry.type | default "") . | quote }}
oAuthClientId: {{ .Values.digitalTwinRegistry.oAuthClientId | default "discovery" }}
discovery:
oAuthClientId: {{ .Values.discovery.oAuthClientId | default "discovery" }} # ID of the OAuth2 client registration to use, see config spring.security.oauth2.client
discoveryFinderUrl: {{ tpl (.Values.discovery.discoveryFinderUrl | default "") . | quote }} # The endpoint to discover EDC endpoints to a particular BPN.
semanticshub:
url: {{ tpl (.Values.semanticshub.url | default "") . | quote }}
pageSize: {{ tpl (.Values.semanticshub.pageSize | default "100") . }}
modelJsonSchemaEndpoint: {{ tpl (.Values.semanticshub.modelJsonSchemaEndpoint | default "") . | quote }}
defaultUrns: {{ tpl (.Values.semanticshub.defaultUrns | default "") . | quote }}
oAuthClientId: {{ .Values.semanticshub.oAuthClientId | default "semantics" }}
{{- if .Values.semanticshub.localModels }}
localModelDirectory: /app/semantic-models
{{- end }}
bpdm:
oAuthClientId: {{ .Values.bpdm.oAuthClientId | default "bpdm" }}
bpnEndpoint: {{ tpl (.Values.bpdm.bpnEndpoint | default "") . | quote }}
irs-edc-client:
Expand Down Expand Up @@ -139,7 +129,7 @@ data:
irs:
url: {{ tpl (.Values.irsUrl | default "") . | quote }}
discovery:
oAuthClientId: {{ .Values.discovery.oAuthClientId | default "discovery" }}
oAuthClientId: {{ .Values.discovery.oAuthClientId | default "portal" }}
{{- if .Values.ess.mockEdcResult }}
mockEdcResult:
{{- tpl (toYaml .Values.ess.mockEdcResult) . | nindent 10 }}
Expand Down
26 changes: 8 additions & 18 deletions charts/irs-helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,36 +81,26 @@ spec:
secretKeyRef:
name: {{ template "irs.secretName" . }}
key: minioPassword
- name: SEMANTICS_OAUTH2_CLIENT_ID
- name: OAUTH2_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ template "irs.secretName" . }}
key: semanticsId
- name: SEMANTICS_OAUTH2_CLIENT_SECRET
key: clientId
- name: OAUTH2_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "irs.secretName" . }}
key: semanticsSecret
- name: DISCOVERY_OAUTH2_CLIENT_ID
key: clientSecret
- name: PORTAL_OAUTH2_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ template "irs.secretName" . }}
key: discoveryClientId
- name: DISCOVERY_OAUTH2_CLIENT_SECRET
key: portalClientId
- name: PORTAL_OAUTH2_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "irs.secretName" . }}
key: discoveryClientSecret
- name: BPDM_OAUTH2_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ template "irs.secretName" . }}
key: bpdmClientId
- name: BPDM_OAUTH2_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "irs.secretName" . }}
key: bpdmClientSecret
key: portalClientSecret
- name: EDC_API_KEY_SECRET
valueFrom:
secretKeyRef:
Expand Down
10 changes: 4 additions & 6 deletions charts/irs-helm/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ type: Opaque
data:
minioUser: {{ .Values.minioUser | default "minio" | b64enc | quote }}
minioPassword: {{ .Values.minioPassword | default "minioPass" | b64enc | quote }}
semanticsId: {{ .Values.oauth2.semantics.clientId | default "semanticsId" | b64enc | quote }}
semanticsSecret: {{ .Values.oauth2.semantics.clientSecret | default "semanticsSecret" | b64enc | quote }}
discoveryClientId: {{ .Values.oauth2.discovery.clientId | default "discoveryClientId" | b64enc | quote }}
discoveryClientSecret: {{ .Values.oauth2.discovery.clientSecret | default "discoveryClientSecret" | b64enc | quote }}
bpdmClientId: {{ .Values.oauth2.bpdm.clientId | default "bpdmClientId" | b64enc | quote }}
bpdmClientSecret: {{ .Values.oauth2.bpdm.clientSecret | default "bpdmClientSecret" | b64enc | quote }}
clientId: {{ .Values.oauth2.clientId | default "clientId" | b64enc | quote }}
clientSecret: {{ .Values.oauth2.clientSecret | default "clientSecret" | b64enc | quote }}
portalClientId: {{ .Values.portal.oauth2.clientId | default "portalClientId" | b64enc | quote }}
portalClientSecret: {{ .Values.portal.oauth2.clientSecret | default "portalClientSecret" | b64enc | quote }}
edcApiSecret: {{ .Values.edc.controlplane.apikey.secret | toString | default "" | b64enc | quote }}
{{- if .Values.grafana.enabled }}
grafanaUser: {{ .Values.grafana.user | default "grafana" | b64enc | quote }}
Expand Down
Loading

0 comments on commit d7bfe06

Please sign in to comment.