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

Chore/edc 0.7.0 iatp mock #101

Merged
merged 29 commits into from
Jul 30, 2024
Merged

Conversation

ds-jhartmann
Copy link
Contributor

@ds-jhartmann ds-jhartmann commented Jun 21, 2024

Description

  • Add iatp mock and helm chart
  • update tx-data-provider EDC to 0.7.1
  • switch to fixed key/cert for EDC which can be used for iatp mock
  • add bdrs memory service + seeding with BPN + DIDs

eclipse-tractusx/sig-release#710

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

Copy link

gitguardian bot commented Jun 21, 2024

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@ds-jhartmann ds-jhartmann changed the base branch from main to upgrade/24.05 June 24, 2024 09:22
@ds-jhartmann ds-jhartmann marked this pull request as ready for review June 28, 2024 14:56
Copy link
Contributor

@evegufy evegufy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good! Just some comments and when installing locally with dataexchange subset, I encounter the following issue:
Error: INSTALLATION FAILED: execution error at (umbrella/charts/tx-data-provider/charts/tractusx-connector/templates/deployment-controlplane.yaml:302:75): .Values.backendService.httpProxyTokenReceiverUrl is required

charts/umbrella/Chart.yaml Show resolved Hide resolved
charts/umbrella/Chart.yaml Show resolved Hide resolved
charts/umbrella/values.yaml Outdated Show resolved Hide resolved
iatp-mock/README.md Outdated Show resolved Hide resolved

in case of enabling `iatpmock` (e.g. by using [values-adopter-data-exchange.yaml](values-adopter-data-exchange.yaml)), the iatp-mock docker image must be built first:

`docker build iatp-mock/ -t tractusx/iatp-mock:testing --platform linux/amd64`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should discuss if it's not worth to also publish the image, for e2e testing maybe not necessary but from a local sandbox (easy entrance point for new developers) maybe beneficial

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's something I don't like either. The mock requires configuration in code which can change depending on the use-case. I did not manage to get this configurable via helm chart in a reasonable amount of time, so I decided to not publish the image.
I'm open for suggestions here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tom-rm-meyer-ISST could you please have a look if it's possible to make the mock more configurable?

@ds-jhartmann
Copy link
Contributor Author

Looks really good! Just some comments and when installing locally with dataexchange subset, I encounter the following issue: Error: INSTALLATION FAILED: execution error at (umbrella/charts/tx-data-provider/charts/tractusx-connector/templates/deployment-controlplane.yaml:302:75): .Values.backendService.httpProxyTokenReceiverUrl is required

Regarding the local installation:
I could not reproduce this on my machine. Did you update the depencencies of the tx-data-provider chart? Since the EDC version was updated, the charts have to be pulled first.
I could install it with

helm dep up .\charts\tx-data-provider\
helm dep up .\charts\umbrella\
helm install umbrella .\charts\umbrella\ -n umbrella --create-namespace -f .\charts\umbrella\values-adopter-data-exchange.yaml

@evegufy evegufy changed the title Chore/edc 0.7.0 iam mock Chore/edc 0.7.0 iatp mock Jul 10, 2024
@evegufy evegufy self-requested a review July 10, 2024 16:16
@evegufy
Copy link
Contributor

evegufy commented Jul 15, 2024

Looks really good! Just some comments and when installing locally with dataexchange subset, I encounter the following issue: Error: INSTALLATION FAILED: execution error at (umbrella/charts/tx-data-provider/charts/tractusx-connector/templates/deployment-controlplane.yaml:302:75): .Values.backendService.httpProxyTokenReceiverUrl is required

Regarding the local installation: I could not reproduce this on my machine. Did you update the depencencies of the tx-data-provider chart? Since the EDC version was updated, the charts have to be pulled first. I could install it with

helm dep up .\charts\tx-data-provider\
helm dep up .\charts\umbrella\
helm install umbrella .\charts\umbrella\ -n umbrella --create-namespace -f .\charts\umbrella\values-adopter-data-exchange.yaml

HI @ds-jhartmann thanks I was able to install it but the dataprovider testdata postinstall is failing, that's not the case for you?
logs-from-post-install-job-in-umbrella-dataprovider-post-install-testdata-rl89g.log

@evegufy
Copy link
Contributor

evegufy commented Jul 18, 2024

Looks really good! Just some comments and when installing locally with dataexchange subset, I encounter the following issue: Error: INSTALLATION FAILED: execution error at (umbrella/charts/tx-data-provider/charts/tractusx-connector/templates/deployment-controlplane.yaml:302:75): .Values.backendService.httpProxyTokenReceiverUrl is required

Regarding the local installation: I could not reproduce this on my machine. Did you update the depencencies of the tx-data-provider chart? Since the EDC version was updated, the charts have to be pulled first. I could install it with

helm dep up .\charts\tx-data-provider\
helm dep up .\charts\umbrella\
helm install umbrella .\charts\umbrella\ -n umbrella --create-namespace -f .\charts\umbrella\values-adopter-data-exchange.yaml

HI @ds-jhartmann thanks I was able to install it but the dataprovider testdata postinstall is failing, that's not the case for you? logs-from-post-install-job-in-umbrella-dataprovider-post-install-testdata-rl89g.log

as discussed, it was an issue on my local, install works 👍

@evegufy
Copy link
Contributor

evegufy commented Jul 18, 2024

just commenting that I noticed the following warning as install

coalesce.go:289: warning: destination for tractusx-connector.vault.injector.webhook.objectSelector is a table. Ignoring non-table value (matchExpressions:
- key: app.kubernetes.io/name
  operator: NotIn
  values:
  - {{ template "vault.name" . }}-agent-injector
)
coalesce.go:289: warning: destination for tractusx-connector.vault.injector.webhook.objectSelector is a table. Ignoring non-table value (matchExpressions:
- key: app.kubernetes.io/name
  operator: NotIn
  values:
  - {{ template "vault.name" . }}-agent-injector
)

as discussed, they appear to be inherent to the new edc version in this install scenario

Copy link
Contributor

@evegufy evegufy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed in the last open meeting, it would be great to prepare for easy image override, I hope it's fine that I pushed the change cc5200e

@tom-rm-meyer-ISST
Copy link

For some reason my comment was still 'pending'.

@ds-jhartmann @evegufy I had a check on that as I've not yet done a configuration for python. I think I would be able to achieve a configuration in either of the two ways in around < 0.5PD. The options below only focus on the docker environment vars.

Sidenotes:

  • It may make sense to configure only one trusted issuer, as this should be sufficient. Further the ES256 keys need to be generated just once and are used for all partners.
  • One need to mount the key directory with their names accordingly and need to put the private + public keys into the vaults as the EDC accesses them.

As some time went by, do we need further configuration options? How should I contribute that? First in PURIS or directly with a branch forked from this branch so that you can merge? I maybe can manage to get this within this or latest by end of next week. I can also adapt it in the puris repo so that one of you can review it and see the delta easily.

Option A: configure participants and their key via json array in one environment var

PARTICIPANTS='[
       {
           "did": "did:web:mock-util-service/trusted-issuer",
           "bpnl": "NONE",
           "did_resolve_name": "trusted-issuer",
           "kid_vault": "",
           "private_key_path": "",
           "is_trusted_issuer": true
       },
       {
           "did": "did:web:mock-util-service/supplier",
           "bpnl": "BPNL1234567890ZZ",
           "did_resolve_name": "supplier",
           "kid_vault": "supplier-cert",
           "private_key_path": "keys/supplier.key",
           "is_trusted_issuer": false
       },
       {
           "did": "did:web:mock-util-service/customer",
           "bpnl": "BPNL4444444444XX",
           "did_resolve_name": "customer",
           "kid_vault": "customer-cert",
           "private_key_path": "keys/customer.key",
           "is_trusted_issuer": false
       }
   ]'

Option B: configure participants dynamically using prefix

PARTICIPANT_1_DID="did:web:mock-util-service/trusted-issuer"
PARTICIPANT_1_BPNL="NONE"
PARTICIPANT_1_DID_RESOLVE_NAME="trusted-issuer"
PARTICIPANT_1_KID_VAULT=""
PARTICIPANT_1_PRIVATE_KEY_PATH=""
PARTICIPANT_1_IS_TRUSTED_ISSUER=true

PARTICIPANT_2_DID="did:web:mock-util-service/supplier"
PARTICIPANT_2_BPNL="BPNL1234567890ZZ"
PARTICIPANT_2_DID_RESOLVE_NAME="supplier"
PARTICIPANT_2_KID_VAULT="supplier-cert"
PARTICIPANT_2_PRIVATE_KEY_PATH="keys/supplier.key"
PARTICIPANT_2_IS_TRUSTED_ISSUER=false

PARTICIPANT_3_DID="did:web:mock-util-service/customer"
PARTICIPANT_3_BPNL="BPNL4444444444XX"
PARTICIPANT_3_DID_RESOLVE_NAME="customer"
PARTICIPANT_3_KID_VAULT="customer-cert"
PARTICIPANT_3_PRIVATE_KEY_PATH="keys/customer.key"
PARTICIPANT_3_IS_TRUSTED_ISSUER=false

@ds-jhartmann
Copy link
Contributor Author

Hi @tom-rm-meyer-ISST thank you for the input.
I like Option A a bit better, I think it makes it a bit easier to add additional participants.
It would be great, if you could contribute this directly to the umbrella repo.

@tom-rm-meyer-ISST
Copy link

Hi @tom-rm-meyer-ISST thank you for the input. I like Option A a bit better, I think it makes it a bit easier to add additional participants. It would be great, if you could contribute this directly to the umbrella repo.

Will try to give it a shot after QGate / R24.08. Which branch should I use to fork from? this one or upgrade/24.05?

@ds-jhartmann
Copy link
Contributor Author

The IAPT mock is not yet available on upgrade/24.05, so I would recommend to fork from this branch

ds-jhartmann and others added 3 commits July 29, 2024 11:21
# Conflicts:
#	.github/workflows/helm-checks.yaml
#	charts/tx-data-provider/Chart.yaml
#	charts/umbrella/Chart.yaml
#	charts/values-test-shared-services-1.yaml
@ds-jhartmann ds-jhartmann merged commit 673f1da into upgrade/24.05 Jul 30, 2024
4 checks passed
@ds-jhartmann ds-jhartmann deleted the chore/edc-0.7.0-iam-mock branch July 30, 2024 11:44
@ds-jhartmann ds-jhartmann restored the chore/edc-0.7.0-iam-mock branch July 30, 2024 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants