Skip to content

Commit 90a9a16

Browse files
author
awstools
committed
feat(client-kms): Adds support for KMS keys and APIs that generate and verify HMAC codes
1 parent 67d79bf commit 90a9a16

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1760
-647
lines changed

clients/client-kms/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ retrying requests automatically. For more information about the Amazon Web Servi
2424
download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web
2525
Services</a>.</p>
2626
</note>
27-
<p>We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS.</p>
27+
<p>We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS. </p>
28+
<p>If you need to use FIPS 140-2 validated cryptographic modules when communicating with
29+
Amazon Web Services, use the FIPS endpoint in your preferred Amazon Web Services Region. For more information about the
30+
available FIPS endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region">Service endpoints</a> in the Key Management Service topic of the <i>Amazon Web Services General Reference</i>.</p>
2831
<p>Clients must support TLS (Transport Layer Security) 1.0. We recommend TLS 1.2. Clients
2932
must also support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral
3033
Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems

clients/client-kms/src/KMS.ts

Lines changed: 294 additions & 217 deletions
Large diffs are not rendered by default.

clients/client-kms/src/KMSClient.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ import {
100100
GenerateDataKeyWithoutPlaintextCommandInput,
101101
GenerateDataKeyWithoutPlaintextCommandOutput,
102102
} from "./commands/GenerateDataKeyWithoutPlaintextCommand";
103+
import { GenerateMacCommandInput, GenerateMacCommandOutput } from "./commands/GenerateMacCommand";
103104
import { GenerateRandomCommandInput, GenerateRandomCommandOutput } from "./commands/GenerateRandomCommand";
104105
import { GetKeyPolicyCommandInput, GetKeyPolicyCommandOutput } from "./commands/GetKeyPolicyCommand";
105106
import {
@@ -147,6 +148,7 @@ import {
147148
UpdatePrimaryRegionCommandOutput,
148149
} from "./commands/UpdatePrimaryRegionCommand";
149150
import { VerifyCommandInput, VerifyCommandOutput } from "./commands/VerifyCommand";
151+
import { VerifyMacCommandInput, VerifyMacCommandOutput } from "./commands/VerifyMacCommand";
150152
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
151153

152154
export type ServiceInputTypes =
@@ -172,6 +174,7 @@ export type ServiceInputTypes =
172174
| GenerateDataKeyPairCommandInput
173175
| GenerateDataKeyPairWithoutPlaintextCommandInput
174176
| GenerateDataKeyWithoutPlaintextCommandInput
177+
| GenerateMacCommandInput
175178
| GenerateRandomCommandInput
176179
| GetKeyPolicyCommandInput
177180
| GetKeyRotationStatusCommandInput
@@ -197,7 +200,8 @@ export type ServiceInputTypes =
197200
| UpdateCustomKeyStoreCommandInput
198201
| UpdateKeyDescriptionCommandInput
199202
| UpdatePrimaryRegionCommandInput
200-
| VerifyCommandInput;
203+
| VerifyCommandInput
204+
| VerifyMacCommandInput;
201205

202206
export type ServiceOutputTypes =
203207
| CancelKeyDeletionCommandOutput
@@ -222,6 +226,7 @@ export type ServiceOutputTypes =
222226
| GenerateDataKeyPairCommandOutput
223227
| GenerateDataKeyPairWithoutPlaintextCommandOutput
224228
| GenerateDataKeyWithoutPlaintextCommandOutput
229+
| GenerateMacCommandOutput
225230
| GenerateRandomCommandOutput
226231
| GetKeyPolicyCommandOutput
227232
| GetKeyRotationStatusCommandOutput
@@ -247,7 +252,8 @@ export type ServiceOutputTypes =
247252
| UpdateCustomKeyStoreCommandOutput
248253
| UpdateKeyDescriptionCommandOutput
249254
| UpdatePrimaryRegionCommandOutput
250-
| VerifyCommandOutput;
255+
| VerifyCommandOutput
256+
| VerifyMacCommandOutput;
251257

252258
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
253259
/**
@@ -419,7 +425,10 @@ export interface KMSClientResolvedConfig extends KMSClientResolvedConfigType {}
419425
* download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web
420426
* Services</a>.</p>
421427
* </note>
422-
* <p>We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS.</p>
428+
* <p>We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS. </p>
429+
* <p>If you need to use FIPS 140-2 validated cryptographic modules when communicating with
430+
* Amazon Web Services, use the FIPS endpoint in your preferred Amazon Web Services Region. For more information about the
431+
* available FIPS endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region">Service endpoints</a> in the Key Management Service topic of the <i>Amazon Web Services General Reference</i>.</p>
423432
* <p>Clients must support TLS (Transport Layer Security) 1.0. We recommend TLS 1.2. Clients
424433
* must also support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral
425434
* Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems

clients/client-kms/src/commands/CancelKeyDeletionCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface CancelKeyDeletionCommandOutput extends CancelKeyDeletionRespons
2727
* <p>For more information about scheduling and canceling deletion of a KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html">Deleting KMS keys</a> in the
2828
* <i>Key Management Service Developer Guide</i>.</p>
2929
* <p>The KMS key that you use for this operation must be in a compatible key state. For
30-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
30+
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
3131
* <p>
3232
* <b>Cross-account
3333
* use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>

clients/client-kms/src/commands/CreateAliasCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface CreateAliasCommandOutput extends __MetadataBearer {}
2424
/**
2525
* <p>Creates a friendly name for a KMS key. </p>
2626
* <note>
27-
* <p>Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">Using ABAC in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
27+
* <p>Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">ABAC in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
2828
* </note>
2929
* <p>You can use an alias to identify a KMS key in the KMS console, in the <a>DescribeKey</a> operation and in <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a>, such as <a>Encrypt</a> and
3030
* <a>GenerateDataKey</a>. You can also change the KMS key that's associated with
@@ -39,7 +39,7 @@ export interface CreateAliasCommandOutput extends __MetadataBearer {}
3939
* <p>This operation does not return a response. To get the alias that you created, use the
4040
* <a>ListAliases</a> operation.</p>
4141
* <p>The KMS key that you use for this operation must be in a compatible key state. For
42-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
42+
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
4343
* <p>
4444
* <b>Cross-account use</b>: No. You cannot perform this operation on an alias in a different Amazon Web Services account.</p>
4545
*

clients/client-kms/src/commands/CreateGrantCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface CreateGrantCommandOutput extends CreateGrantResponse, __Metadat
2828
* grants are considered along with key policies and IAM policies. Grants are often used for
2929
* temporary permissions because you can create one, use its permissions, and delete it without
3030
* changing your key policies or IAM policies. </p>
31-
* <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Using grants</a> in the
31+
* <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Grants in KMS</a> in the
3232
* <i>
3333
* <i>Key Management Service Developer Guide</i>
3434
* </i>. For examples of working with grants in several
@@ -53,7 +53,7 @@ export interface CreateGrantCommandOutput extends CreateGrantResponse, __Metadat
5353
* </li>
5454
* </ul>
5555
* <p>The KMS key that you use for this operation must be in a compatible key state. For
56-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
56+
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
5757
* <p>
5858
* <b>Cross-account use</b>: Yes.
5959
* To perform this operation on a KMS key in a different Amazon Web Services account, specify the key

0 commit comments

Comments
 (0)