@ibm-cloud/secrets-manager 0.1.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{readme.md → README.md} +6 -8
- package/auth/index.d.ts +1 -1
- package/lib/common.js +1 -1
- package/lib/common.js.map +1 -1
- package/package.json +19 -18
- package/secrets-manager/v1.d.ts +1420 -376
- package/secrets-manager/v1.js +783 -341
- package/secrets-manager/v1.js.map +1 -1
package/{readme.md → README.md}
RENAMED
|
@@ -76,7 +76,6 @@ const authenticator = new IamAuthenticator({
|
|
|
76
76
|
import { getAuthenticatorFromEnvironment } from '@ibm-cloud/secrets-manager/auth';
|
|
77
77
|
|
|
78
78
|
// env vars
|
|
79
|
-
// SECRETS_MANAGER_API_AUTH_TYPE=iam
|
|
80
79
|
// SECRETS_MANAGER_API_APIKEY==<apikey>
|
|
81
80
|
const iamAuthenticator = getAuthenticatorFromEnvironment('SECRETS_MANAGER_API');
|
|
82
81
|
```
|
|
@@ -156,7 +155,7 @@ secretsManagerSdkExample();
|
|
|
156
155
|
To delete a secret, specify the `secretType` and its `id`.
|
|
157
156
|
|
|
158
157
|
```js
|
|
159
|
-
res = await
|
|
158
|
+
res = await secretsManager.deleteSecret({
|
|
160
159
|
secretType: 'username_password',
|
|
161
160
|
id: secretId,
|
|
162
161
|
});
|
|
@@ -177,11 +176,11 @@ Create a secret group, and then add a new secret to this group.
|
|
|
177
176
|
resources: [{ name: 'Test Group', description: 'Group my test secrets' }],
|
|
178
177
|
};
|
|
179
178
|
|
|
180
|
-
let res = await
|
|
179
|
+
let res = await secretsManager.createSecretGroup(createGroupParams);
|
|
181
180
|
const secretGroupId = res.result.resources[0].id;
|
|
182
181
|
|
|
183
182
|
// Create a secret and associate it with your secret group
|
|
184
|
-
res = await
|
|
183
|
+
res = await secretsManager.createSecret({
|
|
185
184
|
metadata: {
|
|
186
185
|
collection_type: 'application/vnd.ibm.secrets-manager.secret+json',
|
|
187
186
|
collection_total: 1,
|
|
@@ -204,7 +203,7 @@ Create a secret group, and then add a new secret to this group.
|
|
|
204
203
|
Create a rotation policy of one month for a secret.
|
|
205
204
|
|
|
206
205
|
```js
|
|
207
|
-
let res = await
|
|
206
|
+
let res = await secretsManager.putPolicy({
|
|
208
207
|
metadata: {
|
|
209
208
|
collection_type: 'application/vnd.ibm.secrets-manager.secret.policy+json',
|
|
210
209
|
collection_total: 1,
|
|
@@ -234,7 +233,6 @@ The integration tests are run against an actual Secrets Manager instance and req
|
|
|
234
233
|
to be set:
|
|
235
234
|
|
|
236
235
|
```
|
|
237
|
-
SECRETS_MANAGER_API_AUTH_TYPE=iam;
|
|
238
236
|
SECRETS_MANAGER_API_APIKEY=<API_KEY>
|
|
239
237
|
SERVICE_URL=<SECRETS_MANAGER_ENDPOINT_URL>
|
|
240
238
|
```
|
|
@@ -248,8 +246,8 @@ npm test
|
|
|
248
246
|
## Questions
|
|
249
247
|
|
|
250
248
|
If you're having difficulties using this SDK, you can ask questions about this project by
|
|
251
|
-
using [Stack Overflow](https://stackoverflow.com/questions/tagged/ibm-
|
|
252
|
-
the `ibm-cloud` and `secrets-manager` tags.
|
|
249
|
+
using [Stack Overflow](https://stackoverflow.com/questions/tagged/ibm-secrets-manager). Be sure to include
|
|
250
|
+
the `ibm-cloud` and `ibm-secrets-manager` tags.
|
|
253
251
|
|
|
254
252
|
You can also check out the [Secrets Manager documentation](https://cloud.ibm.com/docs/secrets-manager)
|
|
255
253
|
and [API reference](https://cloud.ibm.com/apidocs/secrets-manager) for more information about the service.
|
package/auth/index.d.ts
CHANGED
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export { NoAuthAuthenticator, BasicAuthenticator, BearerTokenAuthenticator, IamAuthenticator, CloudPakForDataAuthenticator, IamTokenManager, Cp4dTokenManager, getAuthenticatorFromEnvironment } from 'ibm-cloud-sdk-core';
|
|
16
|
+
export { NoAuthAuthenticator, BasicAuthenticator, BearerTokenAuthenticator, IamAuthenticator, CloudPakForDataAuthenticator, IamTokenManager, Cp4dTokenManager, getAuthenticatorFromEnvironment, } from 'ibm-cloud-sdk-core';
|
package/lib/common.js
CHANGED
|
@@ -29,7 +29,7 @@ function getSdkHeaders(serviceName, serviceVersion, operationId) {
|
|
|
29
29
|
var osVersion = os.release();
|
|
30
30
|
var nodeVersion = process.version;
|
|
31
31
|
var headers = {
|
|
32
|
-
'User-Agent': sdkName + "/" + sdkVersion + " (lang=node.js; os.name=" + osName + " os.version=" + osVersion + " node.version=" + nodeVersion + ")"
|
|
32
|
+
'User-Agent': sdkName + "/" + sdkVersion + " (lang=node.js; os.name=" + osName + " os.version=" + osVersion + " node.version=" + nodeVersion + ")",
|
|
33
33
|
};
|
|
34
34
|
return headers;
|
|
35
35
|
}
|
package/lib/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../lib/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uBAA0B;AAE1B,2CAA2C;AAC3C,IAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAMvC;;GAEG;AACH,SAAgB,aAAa,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../lib/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uBAA0B;AAE1B,2CAA2C;AAC3C,IAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAMvC;;GAEG;AACH,SAAgB,aAAa,CAC3B,WAAmB,EACnB,cAAsB,EACtB,WAAmB;IAEnB,IAAM,OAAO,GAAG,4BAA4B,CAAC;IAC7C,IAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC;IAC/B,IAAM,MAAM,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC7B,IAAM,SAAS,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IAC/B,IAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAEpC,IAAM,OAAO,GAAG;QACd,YAAY,EAAK,OAAO,SAAI,UAAU,gCAA2B,MAAM,oBAAe,SAAS,sBAAiB,WAAW,MAAG;KAC/H,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC;AAhBD,sCAgBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibm-cloud/secrets-manager",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Client library for IBM Cloud Secrets Manager",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,14 +14,11 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"eslint:fix": "eslint . --fix",
|
|
16
16
|
"eslint:check": "eslint . --cache",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"lint-fix": "npm run eslint:fix && npm run tslint:fix",
|
|
21
|
-
"build": "tsc",
|
|
22
|
-
"prepublishOnly": "npm run build",
|
|
17
|
+
"lint": "npm run eslint:check",
|
|
18
|
+
"lint-fix": "npm run eslint:fix",
|
|
19
|
+
"build": "tsc && cp package.json dist/ && cp README.md dist/",
|
|
23
20
|
"postversion": "tsc-publish --no-checks --dry-run",
|
|
24
|
-
"publishDist": "
|
|
21
|
+
"publishDist": "npm run build && cd dist && npm publish --access public",
|
|
25
22
|
"jest": "jest",
|
|
26
23
|
"test": "npm run build && npm run lint && jest test/",
|
|
27
24
|
"test-unit": "npm run build && jest test/unit/",
|
|
@@ -40,27 +37,31 @@
|
|
|
40
37
|
"dependencies": {
|
|
41
38
|
"@types/node": "^12.0.8",
|
|
42
39
|
"extend": "^3.0.2",
|
|
43
|
-
"ibm-cloud-sdk-core": "^2.
|
|
40
|
+
"ibm-cloud-sdk-core": "^2.14.2"
|
|
44
41
|
},
|
|
45
42
|
"devDependencies": {
|
|
46
43
|
"@semantic-release/changelog": "5.0.1",
|
|
47
44
|
"@semantic-release/git": "9.0.0",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^4.24.0",
|
|
46
|
+
"@typescript-eslint/parser": "^4.24.0",
|
|
48
47
|
"axios": "^0.21.1",
|
|
49
48
|
"codecov": "^3.7.0",
|
|
50
49
|
"dotenv": "^8.2.0",
|
|
51
|
-
"eslint": "^
|
|
52
|
-
"eslint-config-
|
|
53
|
-
"eslint-config-
|
|
50
|
+
"eslint": "^7.26.0",
|
|
51
|
+
"eslint-config-airbnb-base": "^14.2.1",
|
|
52
|
+
"eslint-config-airbnb-typescript": "^12.3.1",
|
|
53
|
+
"eslint-config-prettier": "^8.3.0",
|
|
54
|
+
"eslint-plugin-import": "^2.23.2",
|
|
55
|
+
"eslint-plugin-jest": "^24.3.6",
|
|
56
|
+
"eslint-plugin-jsdoc": "^34.6.3",
|
|
54
57
|
"eslint-plugin-node": "^9.0.0",
|
|
55
58
|
"eslint-plugin-prettier": "^3.0.1",
|
|
56
59
|
"installed-check": "^2.2.0",
|
|
57
|
-
"jest": "^
|
|
58
|
-
"prettier": "^
|
|
60
|
+
"jest": "^26.6.3",
|
|
61
|
+
"prettier": "^2.3.0",
|
|
62
|
+
"semantic-release": "17.4.2",
|
|
59
63
|
"tsc-publish": "^0.5.2",
|
|
60
|
-
"
|
|
61
|
-
"tslint-config-prettier": "^1.18.0",
|
|
62
|
-
"tslint-eslint-rules": "^5.4.0",
|
|
63
|
-
"typedoc": "^0.15.0",
|
|
64
|
+
"typedoc": "^0.20.36",
|
|
64
65
|
"typescript": "^3.8.3"
|
|
65
66
|
},
|
|
66
67
|
"jest": {
|