-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(connector-fabric): add support for vault transit secret engine
Signed-off-by: Pritam Singh <pkspritam16@gmail.com>
- Loading branch information
Showing
22 changed files
with
1,833 additions
and
42 deletions.
There are no files selected for viewing
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
Binary file added
BIN
+71.3 KB
...r-connector-fabric/docs/architecture/images/run-transaction-endpoint-enroll.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions
42
...tus-plugin-ledger-connector-fabric/docs/architecture/run-transaction-endpoint-enroll.puml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@startuml | ||
title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\enroll() method | ||
|
||
skinparam sequenceArrowThickness 2 | ||
skinparam roundcorner 20 | ||
skinparam maxmessagesize 300 | ||
skinparam sequenceParticipant underline | ||
|
||
actor "Caller" as caller | ||
participant "PluginLedgerConnectorFabric" as t << (C,#ADD1B2) class >> | ||
|
||
autoactivate on | ||
|
||
activate caller | ||
caller -> t : enroll(signer: FabricSigningCredential,\nreq: FabricEnrollmentRequest) | ||
t->t: {\n\tenrollmentID: string,\n\tenrollmentSecret: string,\n\tcaId: string,\n\tmspId: string\n} | ||
|
||
alt #LightBlue this.activatedSinger.includes(singer.type) === false | ||
t-->caller: throw Error(`singer.type not activated`) | ||
end | ||
|
||
t->t : ca = this.createCaClient(caId) | ||
t->t : enrollmentRequest = {enrollmentID,enrollmentSecret} | ||
|
||
group #LightBlue if singer.type == FabricSigningCredentialType.DeafultX509 | ||
else #LightYellow if singer.type == FabricSigningCredentialType.VaulttX509 | ||
t->t : enrollmentRequest.csr = await (this.activatedSinger[VaulttX509] as VaultX509Provider)\n\t.getKey(singer.vaultTransitKey)\n\t.generateCSR(enrollmentID) | ||
else #LightCoral default | ||
t -> caller: throw Error('unknown SingerType') | ||
end | ||
|
||
t->t: resp = await ca.enroll(enrollmentRequest) | ||
t->t: certData = {singer.type,mspId,certificate} | ||
|
||
alt if resp.key !== undefined | ||
t->t: resp.credentials.privateKey = resp.key.toBytes(); | ||
end | ||
|
||
t->t : await certDatastore.put(singer.keychainref,certData) | ||
|
||
deactivate caller | ||
@enduml |
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.