-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core-api): add instanceId getter to ICactusPlugin
This will enable us to differentiate between instances of the same plugin class at runtime which is a pre- requisite for having intra-node routing among plugins and also for better supporting fine grained dependency injection at runtime where a certain plugin wants to import another one and it's not enough to have the plugin aspect available or even the exact class that was instantiated. An example of the above situation would be where you have multiple different ledger connectors who all need their own keychain plugins that may be connecting to different underlying key management solutions because of some exotic deployment topology where let's say you keep your keys for your Fabric legder in a Vault instance but the Corda or Besu related private keys are in the built-in KMS of your cloud provider of choice. In this situation you might need two separate instances of the keychain plugin and the ledger connectors need to have the ability to import exactly the instance of them that they need otherwise they'll be talking to the wrong KMS backend and that is not just a security hole but but also just breaks everything in the Cactus node. Lots of files had to be changed for this one simple change in the interface because it's a new mandatory method prescribed for every single class that claims to implement a Cactus plugin. So because of that the diff is huge but you should be looking at this one in particular: ./packages/cactus-core-api/src/main/typescript/plugin/i-cactus-plugin.ts Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- Loading branch information
Showing
21 changed files
with
175 additions
and
18 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
packages/cactus-core-api/src/main/typescript/plugin/i-cactus-plugin.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 14 additions & 2 deletions
16
packages/cactus-plugin-keychain-memory/src/main/typescript/plugin-keychain-memory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 14 additions & 2 deletions
16
packages/cactus-plugin-kv-storage-memory/src/main/typescript/plugin-kv-storage-memory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.