Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(azure-kv): added keychain plugin for azure keyvault #991

Merged
merged 2 commits into from
Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/cactus-plugin-keychain-aws-sm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
},
"devDependencies": {
"@hyperledger/cactus-test-tooling": "0.6.0",
"@types/express-serve-static-core": "4.17.17",
"@types/request": "2.48.5",
"@types/express": "4.17.8",
"internal-ip": "6.2.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/cactus-plugin-keychain-azure-kv/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@hyperledger/cactus-plugin-keychain-azure-kv`

# TO-DO
7 changes: 7 additions & 0 deletions packages/cactus-plugin-keychain-azure-kv/openapitools.json
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"
}
}
92 changes: 92 additions & 0 deletions packages/cactus-plugin-keychain-azure-kv/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"name": "@hyperledger/cactus-plugin-keychain-azure-kv",
"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-azure-kv.node.umd.min.js",
"browser": "dist/cactus-plugin-keychain-azure-kv.web.umd.js",
"browserMinified": "dist/cactus-plugin-keychain-azure-kv.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",
"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": "cactus@lists.hyperledger.org",
"url": "https://www.hyperledger.org/use/cactus"
},
"contributors": [
{
"name": "Please add yourself to the list of contributors",
"email": "your.name@example.com",
"url": "https://example.com"
},
{
"name": "Peter Somogyvari",
"email": "peter.somogyvari@accenture.com",
"url": "https://accenture.com"
}
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/hyperledger/cactus/issues"
},
"homepage": "https://github.com/hyperledger/cactus#readme",
"dependencies": {
"@azure/identity": "1.3.0",
"@azure/keyvault-secrets": "4.1.0",
"@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",
"internal-ip": "6.2.0",
"express": "4.17.1",
"openapi-types": "7.2.2"
}
}
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-azure-kv/get-keychain-entry": {
"post": {
"x-hyperledger-cactus": {
"http": {
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/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"
petermetz marked this conversation as resolved.
Show resolved Hide resolved
},
"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-azure-kv/set-keychain-entry": {
"post": {
"x-hyperledger-cactus": {
"http": {
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/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"
}
}
}
}
}
}
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
api.ts
base.ts
common.ts
configuration.ts
index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.2.0
Loading