Skip to content

Commit

Permalink
KMS: Makes samples consistent across languages. (#461)
Browse files Browse the repository at this point in the history
This change, in particular:

* Consistently names variables with the API (locationId, keyRingId,
  cryptoKeyId).
* Displays the function name in the region tag.
* Correctly writes decoded base64 to disk  and encodes file contents
  before calling KMS.
* Correctly loads decoded base64 from disk.
* Labels parameters as plaintextFileName and ciphertextFileName, rather
  than inFile and outFile where applicable.
* Makes test failure messages more readable.
  • Loading branch information
jmdobry authored and Ace Nassri committed Aug 29, 2017
1 parent 00e405f commit 74b2f86
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 208 deletions.
24 changes: 13 additions & 11 deletions kms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,19 @@ __Usage:__ `node keys.js --help`

```
Commands:
create <keyRingName> <keyName> Creates a crypto key.
decrypt <keyRingName> <keyName> <infile> <outfile> Decrypts a file.
encrypt <keyRingName> <keyName> <infile> <outfile> Encrypts a file.
get <keyRingName> <keyName> Gets a crypto key.
get-policy <keyRingName> <keyName> Gets a crypto key's IAM policy.
grant-access <keyRingName> <keyName> <member> <role> Adds a members to a crypto key's IAM policy.
keyrings <command> Access key rings subcommands.
list <keyRingName> Lists crypto keys.
revoke-access <keyRingName> <keyName> <member> <role> Removes a member from a crypto key's IAM policy.
set-primary <keyRingName> <keyName> <version> Sets a crypto key's primary version.
versions <command> Access crypto key versions subcommands.
create <keyRing> <cryptoKey> Creates a crypto key.
decrypt <keyRing> <cryptoKey> <ciphertextFileName> Decrypts a file.
<plaintextFileName>
encrypt <keyRing> <cryptoKey> <plaintextFileName> Encrypts a file.
<ciphertextFileName>
get <keyRing> <cryptoKey> Gets a crypto key.
get-policy <keyRing> <cryptoKey> Gets a crypto key's IAM policy.
grant-access <keyRing> <cryptoKey> <member> <role> Adds a members to a crypto key's IAM policy.
keyrings <command> Access key rings subcommands.
list <keyRing> Lists crypto keys.
revoke-access <keyRing> <cryptoKey> <member> <role> Removes a member from a crypto key's IAM policy.
set-primary <keyRing> <cryptoKey> <version> Sets a crypto key's primary version.
versions <command> Access crypto key versions subcommands.
Options:
--help Show help [boolean]
Expand Down
Loading

0 comments on commit 74b2f86

Please sign in to comment.