forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(google-sm): added keychain plugin for google secret manager
Primary Change --- 1. Added new package cactus-plugin-keychain-google-sm under packages/ 2. Added PluginKeychainGoogleSmMock class to mock the functions of SecretManagerServiceClient under packages/cactus-plugin-keychain-google-sm/src/test/typescript/mock/ Resolves hyperledger-cacti#983 Signed-off-by: jagpreetsinghsaan <[email protected]>
- Loading branch information
1 parent
23c179b
commit d7e2317
Showing
24 changed files
with
4,298 additions
and
2,887 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# `@hyperledger/cactus-plugin-keychain-google-sm` | ||
|
||
# TO-DO |
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,7 @@ | ||
{ | ||
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", | ||
"spaces": 2, | ||
"generator-cli": { | ||
"version": "5.2.0" | ||
} | ||
} |
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,92 @@ | ||
{ | ||
"name": "@hyperledger/cactus-plugin-keychain-google-sm", | ||
"version": "0.6.0", | ||
"description": "A keychain implementation storing its entries in Azure key vault.", | ||
"main": "dist/lib/main/typescript/index.js", | ||
"mainMinified": "dist/cactus-plugin-keychain-google-sm.node.umd.min.js", | ||
"browser": "dist/cactus-plugin-keychain-google-sm.web.umd.js", | ||
"browserMinified": "dist/cactus-plugin-keychain-google-sm.web.umd.min.js", | ||
"module": "dist/lib/main/typescript/index.js", | ||
"types": "dist/types/main/typescript/index.d.ts", | ||
"files": [ | ||
"dist/*" | ||
], | ||
"scripts": { | ||
"generate-sdk": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/", | ||
"codegen:openapi": "npm run generate-sdk", | ||
"codegen": "run-p 'codegen:*'", | ||
"watch": "npm-watch", | ||
"pretsc": "npm run generate-sdk", | ||
"webpack": "npm-run-all webpack:dev webpack:prod", | ||
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", | ||
"webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js", | ||
"webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", | ||
"webpack:prod": "npm-run-all webpack:prod:node webpack:prod:web", | ||
"webpack:prod:web": "webpack --env=prod --target=web --config ../../webpack.config.js", | ||
"webpack:prod:node": "webpack --env=prod --target=node --config ../../webpack.config.js" | ||
}, | ||
"watch": { | ||
"codegen:openapi": { | ||
"patterns": [ | ||
"./src/main/json/openapi.json" | ||
] | ||
} | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"engines": { | ||
"node": ">=10", | ||
"npm": ">=6" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/hyperledger/cactus.git" | ||
}, | ||
"keywords": [ | ||
"Hyperledger", | ||
"Cactus", | ||
"Integration", | ||
"Blockchain", | ||
"Distributed Ledger Technology" | ||
], | ||
"author": { | ||
"name": "Hyperledger Cactus Contributors", | ||
"email": "[email protected]", | ||
"url": "https://www.hyperledger.org/use/cactus" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Please add yourself to the list of contributors", | ||
"email": "[email protected]", | ||
"url": "https://example.com" | ||
}, | ||
{ | ||
"name": "Peter Somogyvari", | ||
"email": "[email protected]", | ||
"url": "https://accenture.com" | ||
} | ||
], | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/hyperledger/cactus/issues" | ||
}, | ||
"homepage": "https://github.com/hyperledger/cactus#readme", | ||
"dependencies": { | ||
"@google-cloud/secret-manager": "3.7.1", | ||
"@hyperledger/cactus-common": "0.6.0", | ||
"@hyperledger/cactus-core": "0.6.0", | ||
"@hyperledger/cactus-core-api": "0.6.0", | ||
"axios": "0.21.1", | ||
"http-status-codes": "2.1.4", | ||
"typescript-optional": "2.0.1" | ||
}, | ||
"devDependencies": { | ||
"@hyperledger/cactus-test-tooling": "0.6.0", | ||
"@types/express": "4.17.8", | ||
"@types/request": "2.48.5", | ||
"express": "4.17.1", | ||
"internal-ip": "6.2.0", | ||
"openapi-types": "7.2.2" | ||
} | ||
} |
81 changes: 81 additions & 0 deletions
81
packages/cactus-plugin-keychain-google-sm/src/main/json/openapi.json
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,81 @@ | ||
{ | ||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "Hyperledger Cactus - Keychain API", | ||
"description": "Contains/describes the Keychain API types/paths for Hyperledger Cactus.", | ||
"version": "0.3.0", | ||
"license": { | ||
"name": "Apache 2.0", | ||
"url": "https://www.apache.org/licenses/LICENSE-2.0.html" | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
} | ||
}, | ||
"paths": { | ||
"/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry": { | ||
"post": { | ||
"x-hyperledger-cactus": { | ||
"http": { | ||
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry", | ||
"verbLowerCase": "post" | ||
} | ||
}, | ||
"operationId": "getKeychainEntryV1", | ||
"summary": "Retrieves the contents of a keychain entry from the backend.", | ||
"parameters": [], | ||
"requestBody": { | ||
"$ref": "../../../../cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body" | ||
}, | ||
"responses": { | ||
"200": { | ||
"$ref": "../../../../cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200" | ||
}, | ||
"400": { | ||
"$ref": "../../../../cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400" | ||
}, | ||
"401": { | ||
"$ref": "../../../../cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401" | ||
}, | ||
"404": { | ||
"$ref": "../../../../cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404" | ||
}, | ||
"500": { | ||
"$ref": "../../../../cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500" | ||
} | ||
} | ||
} | ||
}, | ||
"/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry": { | ||
"post": { | ||
"x-hyperledger-cactus": { | ||
"http": { | ||
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry", | ||
"verbLowerCase": "post" | ||
} | ||
}, | ||
"operationId": "setKeychainEntryV1", | ||
"summary": "Sets a value under a key on the keychain backend.", | ||
"parameters": [], | ||
"requestBody": { | ||
"$ref": "../../../../cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body" | ||
}, | ||
"responses": { | ||
"200": { | ||
"$ref": "../../../../cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200" | ||
}, | ||
"400": { | ||
"$ref": "../../../../cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400" | ||
}, | ||
"401": { | ||
"$ref": "../../../../cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401" | ||
}, | ||
"500": { | ||
"$ref": "../../../../cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...oogle-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore
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,27 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md | ||
|
||
.npmignore | ||
.gitignore | ||
git_push.sh |
5 changes: 5 additions & 0 deletions
5
...google-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES
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,5 @@ | ||
api.ts | ||
base.ts | ||
common.ts | ||
configuration.ts | ||
index.ts |
1 change: 1 addition & 0 deletions
1
...ogle-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION
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 @@ | ||
5.2.0 |
Oops, something went wrong.