The Runtime of enmeshed has recently been updated from version 6 to version 7. Accordingly, a new version of the Connector has also been released to make the updated Runtime available to Integrators of Connectors. The version update has resulted in some breaking changes. To support the migration of existing systems to the new version, the breaking changes made are listed and explained in this migration guide.

Step-by-Step Instructions

The step-by-step instructions can be consulted to start the migration to version 7 as an Integrator of a Connector directly. Runtime-specific breaking changes that do not need to be taken into account when updating the Connector from version 6 to version 7 can be found below.

Connector Setup

  • Data persisted in the database by a previous version of the Connector is not compatible with version 7. For this reason, the old data must be deleted. Alternatively, the database can be deleted as a whole and set up again.
  • The image used to run the Connector must be updated to version 7.
  • Some changes must be made to the configuration of the Connector.
    • The database.dbNamePrefix field of the database configuration was removed. Before, it defaulted to acc-. If a database called acc-connector is to be accessed, the value of the database.dbName field must be set to acc-connector instead of connector only.
    • To support additional authentication methods beyond API key authentication, the apiKey field was replaced by the authentication.apiKey.keys.<key-id>.key parameter of the authentication configuration. The authentication.apiKey.keys.<key-id>.scopes field provides a convenient way to configure the permissions that apply when the API key identified by <key-id> is used.
    • Additionally, the support for the API_KEY environment variable has been removed, that could be used to define an API key using a short environment variable. As an alternative, the authentication.apiKey.keys.<key-id>.key configuration property can be set using an environment variable.
  • It must be ensured that a Backbone is used which is compatible with version 7 of the Connector. Even though a Backbone of version 6 can still be used, it is recommended to update to version 7 of the Backbone due to the new features and bug fixes provided. Appropriate Backbone credentials can be specified in the fields transportLibrary.baseUrl, transportLibrary.platformClientId and transportLibrary.platformClientSecret of the Backbone configuration. The URL <baseUrl of Backbone>/api/v2/version can be accessed to validate the version of the Backbone. Please note that version 7 of the Backbone only supports version 2 of its API and no longer version 1.

Removed and Changed Data Structures

Changed Behavior of Known Features

  • Stricter validation of tags of IdentityAttributes and Files have been added as documented in their description in the data model overview. An error with error code error.consumption.attributes.invalidTags will be thrown if an attempt is made to use invalid tags.
  • For Attribute values, a character set is introduced. An error with error code error.consumption.attributes.forbiddenCharactersInAttribute will be thrown if an attempt is made to use characters outside of that character set in an Attribute value.

Removed and Changed Connector Routes

  • For every Connector route originating from the Core HTTP API Module, the prefix has been changed from /api/v2 to /api/core/v1 to reflect its origin. The prefix syntax change led to the version being reset.
  • The GET /api/v2/Attributes/Valid Connector route and its underlying use case for getting valid Attributes were removed, because the properties validFrom and validTo have been removed from the Attributes.
  • For the same reason, the onlyValid parameter was removed from the use cases Get Attributes, Get own shared Attributes and Get peer shared Attributes. Accordingly, it was removed from the associated Connector routes as well.

TypeScript SDK Changes

With every version of the Connector, we ship a matching TypeScript SDK. With version 7 of the SDK, the deprecated field apiKey was removed. To access the Connector using an API key, you can configure the SDK now as follows:

import { ApiKeyAuthenticator, ConnectorClient } from "@nmshd/connector-sdk";

const connectorClient = ConnectorClient.create({
  baseUrl: "<insert-the-base-URL-of-your-Connector-here>",
  authenticator: new ApiKeyAuthenticator("<insert-your-valid-API-key-here>")
});

Removed and Changed Error Codes

An overview of the Error codes that may occur is given on the corresponding documentation page. The most important changes regarding the error codes due to the update from version 6 to version 7 are:

  • With the new LocalAttribute concept, an Attribute copy is no longer created when an Attribute is shared. Therefore, there are no Attribute copies and source Attributes anymore. The error.consumption.attributes.successorSourceContentIsNotEqualToCopyContent error code and similar error codes could thus be removed.
  • The error.consumption.attributes.successionMustNotChangePeer error code has been removed as the new LocalAttribute concept prevents some errors from occurring. Similarly, other error codes are no longer needed. However, a few new error codes, such as error.consumption.attributes.wrongTypeOfAttribute, had to be introduced.
  • The error.runtime.attributes.isNotRepositoryAttribute error code has been renamed to error.runtime.attributes.isNotOwnIdentityAttribute as OwnIdentityAttributes now present those LocalAttributes that were previously known as RepositoryAttributes. Similarly, other error codes have been renamed.
  • The error.consumption.attributes.cannotSucceedChildOfComplexAttribute error code has been removed as there is no child Attribute feature anymore.
  • By renaming an IdentityDeletionProcess status from "Approved" to "Active", the error code error.runtime.identityDeletionProcess.noApprovedIdentityDeletionProcess has been replaced by error.runtime.identityDeletionProcess.noActiveIdentityDeletionProcess.

Runtime-Specific Breaking Changes

As an Integrator of a Connector, the following changes do not need to be taken into account during migration to version 7, as they are Runtime-specific breaking changes handled internally by the Connector.

Removed Use Cases

Some use cases of the Runtime that were previously marked as deprecated and replaced by new ones have now been removed. However, the Connector routes associated with these use cases are not affected by these replacements and can still be used.

  • The nomenclature of ThirdPartyRelationshipAttributes has already changed in version 6. In particular, the term third party owned RelationshipAttribute has become obsolete. For this reason, the Delete a ThirdPartyRelationshipAttribute and notify peer use case was already added in version 6 and the use case of deleting a third party owned RelationshipAttribute and notifying the peer was marked as deprecated. It has now been deleted with the update to version 7.
  • It will be possible to load items not only from truncated references, but also from other references. For this reason, the Load item from reference use case was already added in version 6 and the use case of loading an item from a truncated reference was marked as deprecated. It has now been deleted with the update to version 7.