Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace keycloak config with ouath2 #288

Merged
merged 39 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
edca030
feat(impl):[TRI-244] keycloak removal
ds-ext-kmassalski Nov 2, 2023
c7c0a7c
feat(impl):[TRI-244] update
ds-ext-kmassalski Nov 6, 2023
718b4c7
Remove Scope from PolicyStoreController.java
mkanal Nov 7, 2023
ef33d32
Update PolicyStoreController.java
mkanal Nov 7, 2023
9370d33
chore(controller):[#] remove scope "profile email"
mkanal Nov 8, 2023
9858e70
fix(controller):[#] add empty scope
mkanal Nov 8, 2023
c2e963b
fix(api):[#] add array to oAuth2
mkanal Nov 8, 2023
7704103
feat(impl):[TRI-244] remove keycloak
ds-ext-kmassalski Nov 10, 2023
05e47b1
feat(impl):[TRI-203] ess building block docs
ds-ext-kmassalski Nov 13, 2023
61af3f1
feat(impl):[TRI-203] ess building block docs
ds-ext-kmassalski Nov 14, 2023
8b9c3ec
feat(impl):[TRI-203] ess building block docs
ds-ext-kmassalski Nov 14, 2023
2bf253f
feat(impl):[TRI-203] ess building block docs
ds-ext-kmassalski Nov 14, 2023
1546dc6
Merge branch 'main' into feature/TRI-244-remove-keycloak
ds-ext-kmassalski Nov 14, 2023
2cdd841
Merge pull request #635 from catenax-ng/feature/TRI-203-ess-building-…
ds-ext-kmassalski Nov 14, 2023
cce3460
feat(impl):[TRI-244] remove keycloak - new envs
ds-ext-kmassalski Nov 14, 2023
895b316
feat(impl):[TRI-270] fix build and tests
ds-ext-kmassalski Nov 14, 2023
8d0f467
Merge pull request #621 from catenax-ng/chore(controller)#]-remove-sc…
ds-ext-kmassalski Nov 14, 2023
5b0122c
feat(impl):[TRI-244] update changelogs
ds-ext-kmassalski Nov 14, 2023
c4115bd
chore(workflows): Execute documentation linting on PR
ds-jhartmann Nov 14, 2023
57fd430
chore(docs): Fix linting issues
ds-jhartmann Nov 14, 2023
3b66424
chore(workflows): Fix condition statement
ds-jhartmann Nov 14, 2023
ea2c2e8
chore(workflows): Add cache step to plantuml jar
ds-jhartmann Nov 14, 2023
33bce33
chore(workflows): Remove restore key
ds-jhartmann Nov 14, 2023
ce5a914
chore(workflows): Remove restore key
ds-jhartmann Nov 14, 2023
b5b60ef
Merge remote-tracking branch 'origin/chore/#282-improve-documentation…
ds-jhartmann Nov 14, 2023
6fadf19
chore(workflows): Remove restore key
ds-jhartmann Nov 14, 2023
b9da83f
feat(irs):[#209] Update IRS API Swagger documentation to match AAS 3.0.0
dsmf Nov 14, 2023
ca7407a
feat(irs):[#209] Update IRS API Swagger documentation to match AAS 3.…
dsmf Nov 15, 2023
e0219f6
feat(irs):[#209] Update IRS API Swagger documentation to match AAS 3.…
dsmf Nov 15, 2023
dea541d
Merge pull request #637 from catenax-ng/chore/#282-improve-documentat…
ds-jhartmann Nov 15, 2023
d8ff26b
Merge pull request #619 from catenax-ng/feature/TRI-244-remove-keycloak
ds-ext-kmassalski Nov 15, 2023
4bbf861
Merge pull request #638 from eclipse-tractusx/main
ds-jhartmann Nov 15, 2023
33ef88a
chore(release):[#000] Prepare release 4.1.0
ds-psosnowski Nov 15, 2023
8ae71ba
Merge branch 'main' into feature/#209-aas-3.0.0-is-implemented-in-irs…
dsmf Nov 15, 2023
320c8d0
Merge pull request #642 from catenax-ng/chor/prepare-release-4.1.0
ds-jhartmann Nov 15, 2023
28b1dac
Merge pull request #639 from catenax-ng/feature/#209-aas-3.0.0-is-imp…
dsmf Nov 15, 2023
7c9f660
Merge pull request #641 from eclipse-tractusx/main
ds-jhartmann Nov 15, 2023
eb3b44c
chore(release): Prepare release for Helm version 6.10.0
ds-psosnowski Nov 15, 2023
048849a
Merge pull request #643 from catenax-ng/chore/prepare-helm-release-6.…
ds-psosnowski Nov 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/BETA-xray-cucumber-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Build with Maven
if: ${{ steps.download.outputs.http_response == '200' }}
env:
KEYCLOAK_CLIENT_SECRET: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_SECRET_BETA }}
OAUTH2_CLIENT_SECRET: ${{ secrets.OAUTH2_CLIENT_SECRET_BETA }}
run: |
unzip -o features.zip -d irs-cucumber-tests/src/test/resources/features
mvn --batch-mode clean install -pl irs-cucumber-tests,irs-models -D"cucumber.filter.tags"="not @Ignore and @INTEGRATION_TEST"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/irs-load-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:

- name: Run Gatling tests
env:
KEYCLOAK_HOST: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_TOKEN_URI }}
KEYCLOAK_CLIENT_SECRET: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_ID }}
KEYCLOAK_CLIENT_ID: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_ID }}
OAUTH2_HOST: ${{ secrets.OAUTH2_CLIENT_TOKEN_URI }}
OAUTH2_CLIENT_SECRET: ${{ secrets.OAUTH2_CLIENT_SECRET }}
OAUTH2_CLIENT_ID: ${{ secrets.OAUTH2_CLIENT_ID }}
IRS_HOST: ${{ github.event.inputs.irs-host || 'https://irs-full.dev.demo.catena-x.net' }}
TEST_CYCLES: ${{ github.event.inputs.test-cycles || '20' }}
run: |
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/publish-documentation.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Publish documentation
name: Lint and Publish documentation

on:
workflow_dispatch: # Trigger manually
pull_request:
paths:
- 'docs/**'
push:
branches:
- main
paths:
- 'docs/**'

jobs:
publish:
lint-and-publish:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
Expand All @@ -22,7 +25,7 @@
fetch-depth: 0

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1

Check warning on line 28 in .github/workflows/publish-documentation.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Unpinned Actions Full Length Commit SHA

Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. When selecting a SHA, you should verify it is from the action's repository and not a repository fork.

- name: Set up JDK 17
uses: actions/setup-java@v3
Expand Down Expand Up @@ -64,6 +67,12 @@
asciidoctor-reducer -o docs/target/adminguide.adoc docs/src/docs/administration/administration-guide.adoc
asciidoctor-reducer -o docs/target/arc42.adoc docs/src/docs/arc42/full.adoc

- name: Cache plantuml jar
uses: actions/cache@v3
with:
path: plantuml.jar
key: ${{ runner.os }}-file-${{ hashFiles('plantuml.jar') }}

- name: Download PlantUML jar
run: |
wget -O plantuml.jar https://sourceforge.net/projects/plantuml/files/plantuml.jar/download
Expand Down Expand Up @@ -103,7 +112,8 @@
run: |
mv docs/src/diagram-replacer/assets/ docs/target/generated-docs/assets/

- name: GitHub Pages action
- name: Update documentation on GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tavern-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ jobs:
env:
IRS_HOST: ${{ 'https://irs.int.demo.catena-x.net' }}
IRS_ESS_HOST: ${{ github.event.inputs.irs-ess-host || 'https://irs-ess.int.demo.catena-x.net' }}
KEYCLOAK_HOST: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_TOKEN_URI }}
KEYCLOAK_CLIENT_ID: ${{ secrets.ORG_IRS_OAUTH2_CLIENT_ID_INT }}
KEYCLOAK_CLIENT_SECRET: ${{ secrets.ORG_IRS_OAUTH2_CLIENT_SECRET_INT }}
OAUTH2_HOST: ${{ secrets.OAUTH2_CLIENT_TOKEN_URI }}
OAUTH2_CLIENT_ID: ${{ secrets.ORG_IRS_OAUTH2_CLIENT_ID_INT }}
OAUTH2_CLIENT_SECRET: ${{ secrets.ORG_IRS_OAUTH2_CLIENT_SECRET_INT }}
GLOBAL_ASSET_ID_AS_PLANNED: ${{ github.event.inputs.global-asset-id-asPlanned || 'urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e' }}
BPN_AS_PLANNED: ${{ github.event.inputs.bpn-asPlanned || 'BPNL00000003AYRE' }}
GLOBAL_ASSET_ID_AS_BUILT: ${{ github.event.inputs.global-asset-id-asBuilt || 'urn:uuid:1b17682e-5e2a-4913-aa1b-7d59a072a3cb' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tavern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ jobs:
env:
IRS_HOST: ${{ 'https://irs.dev.demo.catena-x.net' }}
IRS_ESS_HOST: ${{ github.event.inputs.irs-ess-host || 'https://irs-ess.int.demo.catena-x.net' }}
KEYCLOAK_HOST: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_TOKEN_URI }}
KEYCLOAK_CLIENT_ID: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_ID }}
KEYCLOAK_CLIENT_SECRET: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_SECRET }}
OAUTH2_HOST: ${{ secrets.OAUTH2_CLIENT_TOKEN_URI }}
OAUTH2_CLIENT_ID: ${{ secrets.OAUTH2_CLIENT_ID }}
OAUTH2_CLIENT_SECRET: ${{ secrets.OAUTH2_CLIENT_SECRET }}
GLOBAL_ASSET_ID_AS_PLANNED: ${{ github.event.inputs.global-asset-id-asPlanned || 'urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e' }}
BPN_AS_PLANNED: ${{ github.event.inputs.bpn-asPlanned || 'BPNL00000003AYRE' }}
GLOBAL_ASSET_ID_AS_BUILT: ${{ github.event.inputs.global-asset-id-asBuilt || 'urn:uuid:6d505432-8b31-4966-9514-4b753372683f' }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/xray-cucumber-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: IRS Cucumber Integration test Xray execution
on:
workflow_call: # Trigger by another workflow
secrets:
keycloakTokenUrl:
oauth2TokenUrl:
required: true
clientId:
required: true
Expand Down Expand Up @@ -57,9 +57,9 @@ jobs:
- name: Build with Maven
if: ${{ steps.download.outputs.http_response == '200' }}
env:
KEYCLOAK_HOST: ${{ secrets.keycloakTokenUrl }}
KEYCLOAK_CLIENT_ID: ${{ secrets.clientId }}
KEYCLOAK_CLIENT_SECRET: ${{ secrets.clientSecret }}
OAUTH2_HOST: ${{ secrets.oauth2TokenUrl }}
OAUTH2_CLIENT_ID: ${{ secrets.clientId }}
OAUTH2_CLIENT_SECRET: ${{ secrets.clientSecret }}
ISSUE_FILTER: ${{ inputs.executionFilter }}
run: |
unzip -o features.zip -d irs-cucumber-tests/src/test/resources/features
Expand Down
4 changes: 3 additions & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ The following people have contributed to this repository:
- Michael Schlacher, doubleSlash Net-Business GmbH, https://github.com/michaelschlacher2
- Sebastian Bezold, Mercedes Benz AG, https://github.com/SebastianBezold
- Zied Belkhiria, MHP, https://github.com/Zied-Belkhiria-Mhp
- Adam Bugajewski, doubleSlash Net-Business GmbH, https://github.com/ds-ext-abugajewski
- Adam Bugajewski, doubleSlash Net-Business GmbH, https://github.com/ds-ext-abugajewski
- Matthias Fischer, doubleSlash Net-Business GmbH, https://github.com/dsmf

40 changes: 38 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,44 @@ 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]

## [4.1.0] - 2023-11-15
### Added
- IRS can now check the readiness of external services. Use the new ``management.health.dependencies.enabled`` config entry to determine if external dependencies health checks should be checked (false by default).
- The map of external services healthcheck endpoints can be configured with ``management.health.dependencies.urls`` property, eg. ``service_name: http://service_name_host/health``

### Changed
- Changed name of spring's OAuth2 client registration from 'keycloak' to 'common' like below:
```
spring:
security:
oauth2:
client:
registration:
keycloak:
authorization-grant-type: client_credentials
client-id:
client-secret:
provider:
keycloak:
token-uri:
```
to:
```
spring:
security:
oauth2:
client:
registration:
common:
authorization-grant-type: client_credentials
client-id:
client-secret:
provider:
common:
token-uri:
```
- Update IRS API Swagger documentation to match AAS 3.0.0

## [4.0.1] - 2023-11-10
### Changed
Expand Down Expand Up @@ -408,7 +443,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Unresolved
- **Select Aspects you need** You are able to select the needed aspects for which you want to collect the correct endpoint information.

[Unreleased]: https://github.com/eclipse-tractusx/item-relationship-service/compare/4.0.1...HEAD
[Unreleased]: https://github.com/eclipse-tractusx/item-relationship-service/compare/4.1.0...HEAD
[4.1.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/4.0.1...4.1.0
[4.0.1]: https://github.com/eclipse-tractusx/item-relationship-service/compare/4.0.0...4.0.1
[4.0.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/3.5.4...4.0.0
[3.5.4]: https://github.com/eclipse-tractusx/item-relationship-service/compare/3.5.3...3.5.4
Expand Down Expand Up @@ -450,4 +486,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[1.1.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/v0.9.1...v1.0.0
[0.9.1]: https://github.com/eclipse-tractusx/item-relationship-service/commits/v0.9.1
[0.9.0]: https://github.com/eclipse-tractusx/item-relationship-service/commits/v0.9.0
[0.9.0]: https://github.com/eclipse-tractusx/item-relationship-service/commits/v0.9.0
21 changes: 21 additions & 0 deletions charts/irs-helm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [6.10.0]
### Changed
- Update IRS version to 4.1.0
- Changed configuration for OAuth2 client from:
```
keycloak:
oauth2:
clientId:
clientSecret:
clientTokenUri:
jwkSetUri:
```
to:
```
oauth2:
clientId:
clientSecret:
clientTokenUri:
jwkSetUri:
```

## [6.9.1]
### Changed
- Update IRS version to 4.0.1
Expand Down
4 changes: 2 additions & 2 deletions charts/irs-helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 6.9.1
version: 6.10.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "4.0.1"
appVersion: "4.1.0"
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
Expand Down
14 changes: 7 additions & 7 deletions charts/irs-helm/templates/configmap-spring-app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ data:
oauth2:
client:
registration:
keycloak:
client-id: "${KEYCLOAK_OAUTH2_CLIENT_ID}" # taken from secret ENV
client-secret: "${KEYCLOAK_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:
keycloak:
token-uri: {{ tpl (.Values.keycloak.oauth2.clientTokenUri | default "http://localhost") . | quote }}
common:
token-uri: {{ tpl (.Values.oauth2.clientTokenUri | default "http://localhost") . | quote }}
portal:
token-uri: {{ tpl (.Values.keycloak.oauth2.clientTokenUri | default "http://localhost") . | quote }}
token-uri: {{ tpl (.Values.oauth2.clientTokenUri | default "http://localhost") . | quote }}
resourceserver:
jwt:
jwk-set-uri: {{ tpl (.Values.keycloak.oauth2.jwkSetUri | default "http://localhost") . | quote }}
jwk-set-uri: {{ tpl (.Values.oauth2.jwkSetUri | default "http://localhost") . | quote }}

digitalTwinRegistry:
descriptorEndpoint: {{ tpl (.Values.digitalTwinRegistry.descriptorEndpoint | default "") . | quote }}
Expand Down
8 changes: 4 additions & 4 deletions charts/irs-helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ spec:
secretKeyRef:
name: {{ template "irs.secretName" . }}
key: minioPassword
- name: KEYCLOAK_OAUTH2_CLIENT_ID
- name: OAUTH2_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ template "irs.secretName" . }}
key: keycloakClientId
- name: KEYCLOAK_OAUTH2_CLIENT_SECRET
key: clientId
- name: OAUTH2_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "irs.secretName" . }}
key: keycloakClientSecret
key: clientSecret
- name: PORTAL_OAUTH2_CLIENT_ID
valueFrom:
secretKeyRef:
Expand Down
4 changes: 2 additions & 2 deletions charts/irs-helm/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ type: Opaque
data:
minioUser: {{ .Values.minioUser | default "minio" | b64enc | quote }}
minioPassword: {{ .Values.minioPassword | default "minioPass" | b64enc | quote }}
keycloakClientId: {{ .Values.keycloak.oauth2.clientId | default "keycloakClientId" | b64enc | quote }}
keycloakClientSecret: {{ .Values.keycloak.oauth2.clientSecret | default "keycloakClientSecret" | 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 }}
Expand Down
11 changes: 5 additions & 6 deletions charts/irs-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,11 @@ bpdm:
minioUser: "minio" # <minio-username>
minioPassword: # <minio-password>
minioUrl: "http://{{ .Release.Name }}-minio:9000"
keycloak:
oauth2:
clientId: # <keycloak-client-id>
clientSecret: # <keycloak-client-secret>
clientTokenUri: # <keycloak-token-uri>
jwkSetUri: # <keycloak-jwkset-uri>
oauth2:
clientId: # <oauth2-client-id>
clientSecret: # <oauth2-client-secret>
clientTokenUri: # <oauth2-token-uri>
jwkSetUri: # <oauth2-jwkset-uri>
portal:
oauth2:
clientId: # <portal-client-id>
Expand Down
Loading
Loading