Socket
Socket
Sign inDemoInstall

@google-cloud/kms

Package Overview
Dependencies
119
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0 to 1.0.0

src/v1/doc/google/type/doc_expr.js

21

CHANGELOG.md

@@ -7,2 +7,22 @@ # Changelog

## [1.0.0](https://www.github.com/googleapis/nodejs-kms/compare/v0.4.0...v1.0.0) (2019-05-20)
### ⚠ BREAKING CHANGES
* upgrade engines field to >=8.10.0 (#151)
### Bug Fixes
* **deps:** update dependency google-gax to ^0.26.0 ([#149](https://www.github.com/googleapis/nodejs-kms/issues/149)) ([b92c822](https://www.github.com/googleapis/nodejs-kms/commit/b92c822))
* DEADLINE_EXCEEDED is no longer retried ([5f4f9ff](https://www.github.com/googleapis/nodejs-kms/commit/5f4f9ff))
* DEADLINE_EXCEEDED retry code is idempotent ([#159](https://www.github.com/googleapis/nodejs-kms/issues/159)) ([a7e511a](https://www.github.com/googleapis/nodejs-kms/commit/a7e511a))
* indicate that Encrypt, Decrypt, AsymmetricDecrypt, AsymmetricSign are idempotent, such that they're retried ([122b3f8](https://www.github.com/googleapis/nodejs-kms/commit/122b3f8))
* **deps:** update dependency google-gax to v1 ([#158](https://www.github.com/googleapis/nodejs-kms/issues/158)) ([91fe078](https://www.github.com/googleapis/nodejs-kms/commit/91fe078))
### Build System
* upgrade engines field to >=8.10.0 ([#151](https://www.github.com/googleapis/nodejs-kms/issues/151)) ([45b2a9f](https://www.github.com/googleapis/nodejs-kms/commit/45b2a9f))
## v0.4.0

@@ -113,2 +133,1 @@

- Update CI config ([#27](https://github.com/googleapis/nodejs-kms/pull/27))

24

package.json
{
"name": "@google-cloud/kms",
"description": "Google Cloud Key Management Service (KMS) API client for Node.js",
"version": "0.4.0",
"version": "1.0.0",
"license": "Apache-2.0",
"author": "Google LLC",
"engines": {
"node": ">=6.0.0"
"node": ">=8.10.0"
},

@@ -32,8 +32,4 @@ "repository": "googleapis/nodejs-kms",

"scripts": {
"test": "npm run cover",
"generate-scaffolding": "repo-tools generate all",
"generate-scaffolding-samples": "repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json",
"cover": "nyc --reporter=lcov mocha test/*.js && nyc report",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"test-no-cover": "mocha test/ --timeout 600000",
"test": "nyc mocha",
"lint": "eslint '**/*.js'",

@@ -47,21 +43,19 @@ "docs": "jsdoc -c .jsdoc.js",

"dependencies": {
"google-gax": "^0.25.0",
"google-gax": "^1.0.0",
"lodash.merge": "^4.6.0"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"codecov": "^3.0.4",
"eslint": "^5.1.0",
"eslint-config-prettier": "^4.0.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-node": "^9.0.0",
"eslint-plugin-prettier": "^3.0.0",
"jsdoc": "^3.6.2",
"jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git",
"intelli-espower-loader": "^1.0.1",
"jsdoc": "^3.5.5",
"linkinator": "^1.1.2",
"mocha": "^6.0.0",
"nyc": "^13.0.0",
"nyc": "^14.0.0",
"power-assert": "^1.6.0",
"prettier": "^1.13.7",
"linkinator": "^1.1.2"
"prettier": "^1.13.7"
}
}
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `npm run generate-scaffolding`."
[//]: # "To regenerate it, use `python -m synthtool`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
# [Cloud Key Management Service: Node.js Client](https://github.com/googleapis/nodejs-kms)
# [Google Cloud Key Management Service: Node.js Client](https://github.com/googleapis/nodejs-kms)
[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style&#x3D;flat)](https://cloud.google.com/terms/launch-stages)
[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/kms.svg)](https://www.npmjs.org/package/@google-cloud/kms)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-kms/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-kms)
[Cloud KMS](https://cloud.google.com/kms/docs/) allows you to keep encryption keys in one central cloud service, for direct use by other cloud resources and applications. With Cloud KMS you are the ultimate custodian of your data, you can manage encryption in the cloud the same way you do on-premises, and you have a provable and monitorable root of trust over your data.
* [Using the client library](#using-the-client-library)
Google Cloud Key Management Service (KMS) API client for Node.js
* [Google Cloud Key Management Service Node.js Client API Reference][client-docs]
* [Google Cloud Key Management Service Documentation][product-docs]
* [github.com/googleapis/nodejs-kms](https://github.com/googleapis/nodejs-kms)
Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
**Table of contents:**
* [Quickstart](#quickstart)
* [Before you begin](#before-you-begin)
* [Installing the client library](#installing-the-client-library)
* [Using the client library](#using-the-client-library)
* [Samples](#samples)

@@ -20,19 +38,21 @@ * [Versioning](#versioning)

## Using the client library
## Quickstart
### Before you begin
1. [Select or create a Cloud Platform project][projects].
1. [Enable billing for your project][billing].
1. [Enable the Cloud Key Management Service API][enable_api].
1. [Enable the Google Cloud Key Management Service API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
API from your local workstation.
1. Install the client library:
### Installing the client library
npm install --save @google-cloud/kms
```bash
npm install @google-cloud/kms
```
1. Try an example:
### Using the client library
```javascript

@@ -63,4 +83,7 @@ async function quickstart(

}
```
## Samples

@@ -73,5 +96,28 @@

| --------------------------- | --------------------------------- | ------ |
| KMS | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
| Add Member To Crypto Key Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/addMemberToCryptoKeyPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/addMemberToCryptoKeyPolicy.js,samples/README.md) |
| Add Member To Key Ring Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/addMemberToKeyRingPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/addMemberToKeyRingPolicy.js,samples/README.md) |
| Create Crypto Key | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/createCryptoKey.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/createCryptoKey.js,samples/README.md) |
| Create Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/createCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/createCryptoKeyVersion.js,samples/README.md) |
| Create Keyring | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/createKeyring.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/createKeyring.js,samples/README.md) |
| Decrypt | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/decrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/decrypt.js,samples/README.md) |
| Destroy Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/destroyCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/destroyCryptoKeyVersion.js,samples/README.md) |
| Disable Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/disableCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/disableCryptoKeyVersion.js,samples/README.md) |
| Enable Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/enableCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/enableCryptoKeyVersion.js,samples/README.md) |
| Encrypt | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/encrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/encrypt.js,samples/README.md) |
| Get Crypto Key | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getCryptoKey.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getCryptoKey.js,samples/README.md) |
| Get Crypto Key Iam Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getCryptoKeyIamPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getCryptoKeyIamPolicy.js,samples/README.md) |
| Get Keyring | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getKeyring.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getKeyring.js,samples/README.md) |
| Get Keyring Iam Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getKeyringIamPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getKeyringIamPolicy.js,samples/README.md) |
| List Crypto Key Versions | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/listCryptoKeyVersions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/listCryptoKeyVersions.js,samples/README.md) |
| List Crypto Keys | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/listCryptoKeys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/listCryptoKeys.js,samples/README.md) |
| List Keyrings | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/listKeyrings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/listKeyrings.js,samples/README.md) |
| Quickstart | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
| Remove Member Crypto Key Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/removeMemberCryptoKeyPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/removeMemberCryptoKeyPolicy.js,samples/README.md) |
| Remove Member From Key Ring Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/removeMemberFromKeyRingPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/removeMemberFromKeyRingPolicy.js,samples/README.md) |
| Restore Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/restoreCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/restoreCryptoKeyVersion.js,samples/README.md) |
| Set Primary Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/setPrimaryCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/setPrimaryCryptoKeyVersion.js,samples/README.md) |
The [Cloud KMS Node.js Client API Reference][client-docs] documentation
The [Google Cloud Key Management Service Node.js Client API Reference][client-docs] documentation
also contains samples.

@@ -83,2 +129,4 @@

This library is considered to be in **beta**. This means it is expected to be

@@ -89,2 +137,5 @@ mostly stable while we work toward a general availability release; however,

More Information: [Google Cloud Platform Launch Stages][launch_stages]

@@ -104,19 +155,8 @@

## What's Next
* [Cloud KMS Documentation][product-docs]
* [Cloud KMS Node.js Client API Reference][client-docs]
* [github.com/googleapis/nodejs-kms](https://github.com/googleapis/nodejs-kms)
Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
[client-docs]: https://cloud.google.com/nodejs/docs/reference/kms/latest/
[product-docs]: https://cloud.google.com/kms/docs/
[product-docs]: https://cloud.google.com/kms
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudkms.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=kms.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started

@@ -87,17 +87,18 @@ // Copyright 2019 Google LLC

*
* If a repeated field is specified for an update operation, the existing
* repeated values in the target resource will be overwritten by the new values.
* Note that a repeated field is only allowed in the last position of a `paths`
* string.
* If a repeated field is specified for an update operation, new values will
* be appended to the existing repeated field in the target resource. Note that
* a repeated field is only allowed in the last position of a `paths` string.
*
* If a sub-message is specified in the last position of the field mask for an
* update operation, then the existing sub-message in the target resource is
* overwritten. Given the target message:
* update operation, then new value will be merged into the existing sub-message
* in the target resource.
*
* For example, given the target message:
*
* f {
* b {
* d : 1
* x : 2
* d: 1
* x: 2
* }
* c : 1
* c: [1]
* }

@@ -109,4 +110,5 @@ *

* b {
* d : 10
* d: 10
* }
* c: [2]
* }

@@ -116,3 +118,3 @@ *

*
* paths: "f.b"
* paths: ["f.b", "f.c"]
*

@@ -123,21 +125,11 @@ * then the result will be:

* b {
* d : 10
* d: 10
* x: 2
* }
* c : 1
* c: [1, 2]
* }
*
* However, if the update mask was:
* An implementation may provide options to override this default behavior for
* repeated and message fields.
*
* paths: "f.b.d"
*
* then the result would be:
*
* f {
* b {
* d : 10
* x : 2
* }
* c : 1
* }
*
* In order to reset a field's value to the default, the field must

@@ -144,0 +136,0 @@ * be in the mask and set to the default value in the provided resource.

@@ -19,14 +19,16 @@ // Copyright 2019 Google LLC

/**
* A Timestamp represents a point in time independent of any time zone
* or calendar, represented as seconds and fractions of seconds at
* nanosecond resolution in UTC Epoch time. It is encoded using the
* Proleptic Gregorian Calendar which extends the Gregorian calendar
* backwards to year one. It is encoded assuming all minutes are 60
* seconds long, i.e. leap seconds are "smeared" so that no leap second
* table is needed for interpretation. Range is from
* 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
* By restricting to that range, we ensure that we can convert to
* and from RFC 3339 date strings.
* See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
* A Timestamp represents a point in time independent of any time zone or local
* calendar, encoded as a count of seconds and fractions of seconds at
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
* January 1, 1970, in the proleptic Gregorian calendar which extends the
* Gregorian calendar backwards to year one.
*
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
* second table is needed for interpretation, using a [24-hour linear
* smear](https://developers.google.com/time/smear).
*
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
* restricting to that range, we ensure that we can convert to and from [RFC
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
*
* # Examples

@@ -95,3 +97,5 @@ *

* with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
* can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--) to obtain a formatter capable of generating timestamps in this format.
* can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com
* http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
* ) to obtain a formatter capable of generating timestamps in this format.
*

@@ -98,0 +102,0 @@ * @property {number} seconds

@@ -80,3 +80,3 @@ {

"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_codes_name": "idempotent",
"retry_params_name": "default"

@@ -86,3 +86,3 @@ },

"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_codes_name": "idempotent",
"retry_params_name": "default"

@@ -112,3 +112,3 @@ },

"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_codes_name": "idempotent",
"retry_params_name": "default"

@@ -118,3 +118,3 @@ },

"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_codes_name": "idempotent",
"retry_params_name": "default"

@@ -121,0 +121,0 @@ },

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc