Provide Artifact

Providing artifacts is the default IDS way of interaction between two connectors. Following the general process of:

  1. uploading an artifact to your local connector including metadata and optionally a contract offer,
  2. publishing the metadata of the artifact to the metadata broker,
  3. perform (automatic) policy negotiation on receival of contract requests,
  4. providing the artifact.

The test connector deployed at https://test-connector.playground.dataspac.es/ui/ can be used as consumer for the artifact that is deployed on your connector.

Configuration

  • Download templates
  • Create IDS Identity secret
    Create an Kubernetes secret containing the certificates that you’ve created in the Request Playground Identities step.
    kubectl create secret generic ids-identity-secret --from-file=ids.crt=./component.crt --from-file=ids.key=./component.key --from-file=ca.crt=./cachain.crt
    
    • Modify ids.info.idsid, ids.info.curator, ids.info.maintainer in the values.local.yaml file to the corresponding identifiers that you filled in during creation of the certificates. ids.info.idsid should be the Connector ID, and ids.info.curator, ids.info.maintainer should be the Participant ID.
  • Change Admin User credentials
    The default password is playground but this can be changed to a more secure password, which is especially needed for public Kubernetes deployments.
  • Make the connector accessible for others
    To make the connector available for other connectors Ingresses are used.
    • Modify host to the domain name you configured with the ingress controller
    • (Optionally) Set useNewIngress to false in case you’re using an older version of Kubernetes (<=v1.21)
    • (Optionally) Modify coreContainer.ingress.clusterIssuer, coreContainer.ingress.secretName, and/or coreContainer.ingress.annotations to change the behaviour of the main Ingress
    • (Optionally) Modify adminUi.ingress.clusterIssuer, adminUi.ingress.secretName, and/or adminUi.ingress.annotations to change the behaviour of the admin UI Ingress

Deployment

For this the Helm repository must be added:

helm repo add tsg https://nexus.dataspac.es/repository/tsg-helm
helm repo update

After that the Helm chart must be installed, for the public Kubernetes version:

helm upgrade --install playground tsg/tsg-connector --version 3.0.0-master -f values.public.yaml

The user interface of the TSG Core Container will be available at the hostname you’ve configured, on the path /ui/ (e.g. https://domain.name/ui/)

To view the deployment and show the logs of the TSG Core Container, either Lens or kubectl can be used. For Lens, the main view will be Workloads > Pods. For kubectl the following commands can be used to view information of the deployment:

kubectl get pods
kubectl logs -f deployment/playground-tsg-connector-core-container

Providing artifact

To provide an artifact that can be retrieved by other connectors only a single form is required to be filled in.

  1. Navigate to https://domain.name/ui/#/artifacts/provider
  2. Create a Title and Description for your artifact
  3. Select the file you want to provide
  4. Leave the Artifact ID empty
  5. Click on Generic read access to generate a contract offer that allows read access to consumers that do perform the contract negotiation process

Consume provider artifact

Retrieve metadata of the artifact

Navigate to https://test-connector.playground.dataspac.es/ui/#/selfdescription/request and login with the following credentials:

  • Username: consumer
  • Password: TNOTSGPlayground

Fill in the form with the relevant information:

  • Connector ID: The connector ID of the connector that you’ve deployed
  • Agent ID: The participant ID that you’ve created
  • Access URL: The publicly available access URL of your connector, e.g. https://domain.name/selfdescription
  • Requested Element: leave empty

And click Request description.

When the self description of the connector is retrieved successfully, the details are shown in a tabular form.

Click the urn:playground:tsg:connectors:TestConsumer:resources to show the available resources.

Click on the lock icon under Actions to go the next step directly.

Perform the contract negotiation process to establish a contract agreement

If you’ve clicked the lock icon in the previous step, the values in the form are filled in automatically. Otherwise, navigate to https://test-connector.playground.dataspac.es/ui/#/artifacts/consumer and fill in the Request Contract form:

  • Connector ID: The connector ID of the connector that you’ve deployed
  • Agent ID: The participant ID that you’ve created
  • Access URL: The publicly available artifact access URL of your connector, e.g. https://domain.name/router/artifacts
  • Contract Offer: Copy the contract offer as provided in the metadata of the artifact

Click Request Contract to perform the contract negotiation process.

If the process is successfully completed, the Transfer Contract field in the Request Artifact form should be filled with an URL similar to https://w3id.org/idsa/autogen/contractAgreement/00000000-0000-0000-0000-000000000000.

The consumer user does not have permission to list the contracts that are created on his behalf, so note down the contract identifier if you will perform the last step at a later moment.

Retrieve the artifact

If you’ve just executed the contract negotiation process, the Request Artifact is filled in automatically. Otherwise, navigate to https://test-connector.playground.dataspac.es/ui/#/artifacts/consumer and use the following values:

  • Artifact ID: urn:playground:tsg:connectors:TestConsumer:artifacts:9ff5d13e-bab3-4660-bedc-efc01dfaeaad
  • Connector ID: urn:playground:tsg:connectors:TestConsumer
  • Agent ID: urn:playground:tsg:TNO
  • AccessURL: https://test-connector.playground.dataspac.es/router/artifacts/urn:playground:tsg:connectors:TestConsumer:resources:c2212225-a86e-4438-abf3-a6758e0ce689
  • Transfer Contract: Copy the contract agreement ID of the previous step, if it is not filled in yet.

Click Request Artifact to actually download the artifact to your local system.

Clean-up

If you do not want to proceed with other tutorials, you can remove the resources used.

To remove all of the used Kubernetes resources execute:

helm uninstall playground
kubectl delete secret/ids-identity-secret

Didn't find what you were looking for?