Skip to content

Commit 138dd94

Browse files
authored
feat(aws-android-sdk-kms): update models to latest (#2901)
1 parent cc17c2a commit 138dd94

15 files changed

+1191
-338
lines changed

aws-android-sdk-kms/src/main/java/com/amazonaws/services/kms/AWSKMS.java

Lines changed: 150 additions & 37 deletions
Large diffs are not rendered by default.

aws-android-sdk-kms/src/main/java/com/amazonaws/services/kms/AWSKMSClient.java

Lines changed: 150 additions & 37 deletions
Large diffs are not rendered by default.

aws-android-sdk-kms/src/main/java/com/amazonaws/services/kms/model/CreateKeyRequest.java

Lines changed: 329 additions & 149 deletions
Large diffs are not rendered by default.

aws-android-sdk-kms/src/main/java/com/amazonaws/services/kms/model/DecryptRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
* <p>
6565
* The <code>Decrypt</code> operation also decrypts ciphertext that was
6666
* encrypted outside of KMS by the public key in an KMS asymmetric KMS key.
67-
* However, it cannot decrypt symmetric ciphertext produced by other libraries,
68-
* such as the <a
67+
* However, it cannot decrypt ciphertext produced by other libraries, such as
68+
* the <a
6969
* href="https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/"
7070
* >Amazon Web Services Encryption SDK</a> or <a href=
7171
* "https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html"

aws-android-sdk-kms/src/main/java/com/amazonaws/services/kms/model/DisableKeyRotationRequest.java

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,44 @@
2323
* <p>
2424
* Disables <a href=
2525
* "https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html"
26-
* >automatic rotation of the key material</a> for the specified symmetric
26+
* >automatic rotation of the key material</a> of the specified symmetric
2727
* encryption KMS key.
2828
* </p>
2929
* <p>
30-
* You cannot enable automatic rotation of <a href=
30+
* Automatic key rotation is supported only on symmetric encryption KMS keys.
31+
* You cannot enable or disable automatic rotation of <a href=
3132
* "https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html"
3233
* >asymmetric KMS keys</a>, <a
3334
* href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html">HMAC
3435
* KMS keys</a>, KMS keys with <a href=
3536
* "https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html"
3637
* >imported key material</a>, or KMS keys in a <a href=
3738
* "https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html"
38-
* >custom key store</a>. To enable or disable automatic rotation of a set of
39+
* >custom key store</a>. The key rotation status of these KMS keys is always
40+
* <code>false</code>. To enable or disable automatic rotation of a set of
3941
* related <a href=
4042
* "https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate"
4143
* >multi-Region keys</a>, set the property on the primary key.
4244
* </p>
4345
* <p>
46+
* You can enable (<a>EnableKeyRotation</a>) and disable automatic rotation of
47+
* the key material in <a href=
48+
* "https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk"
49+
* >customer managed KMS keys</a>. Key material rotation of <a href=
50+
* "https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk"
51+
* >Amazon Web Services managed KMS keys</a> is not configurable. KMS always
52+
* rotates the key material for every year. Rotation of <a href=
53+
* "https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk"
54+
* >Amazon Web Services owned KMS keys</a> varies.
55+
* </p>
56+
* <note>
57+
* <p>
58+
* In May 2022, KMS changed the rotation schedule for Amazon Web Services
59+
* managed keys from every three years to every year. For details, see
60+
* <a>EnableKeyRotation</a>.
61+
* </p>
62+
* </note>
63+
* <p>
4464
* The KMS key that you use for this operation must be in a compatible key
4565
* state. For details, see <a
4666
* href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html"

aws-android-sdk-kms/src/main/java/com/amazonaws/services/kms/model/EnableKeyRotationRequest.java

Lines changed: 72 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,60 @@
2323
* <p>
2424
* Enables <a href=
2525
* "https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html"
26-
* >automatic rotation of the key material</a> for the specified symmetric
26+
* >automatic rotation of the key material</a> of the specified symmetric
2727
* encryption KMS key.
2828
* </p>
2929
* <p>
30-
* You cannot enable automatic rotation of <a href=
30+
* When you enable automatic rotation of a<a href=
31+
* "https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk"
32+
* >customer managed KMS key</a>, KMS rotates the key material of the KMS key
33+
* one year (approximately 365 days) from the enable date and every year
34+
* thereafter. You can monitor rotation of the key material for your KMS keys in
35+
* CloudTrail and Amazon CloudWatch. To disable rotation of the key material in
36+
* a customer managed KMS key, use the <a>DisableKeyRotation</a> operation.
37+
* </p>
38+
* <p>
39+
* Automatic key rotation is supported only on <a href=
40+
* "https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks"
41+
* >symmetric encryption KMS keys</a>. You cannot enable or disable automatic
42+
* rotation of <a href=
3143
* "https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html"
3244
* >asymmetric KMS keys</a>, <a
3345
* href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html">HMAC
3446
* KMS keys</a>, KMS keys with <a href=
3547
* "https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html"
3648
* >imported key material</a>, or KMS keys in a <a href=
3749
* "https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html"
38-
* >custom key store</a>. To enable or disable automatic rotation of a set of
50+
* >custom key store</a>. The key rotation status of these KMS keys is always
51+
* <code>false</code>. To enable or disable automatic rotation of a set of
3952
* related <a href=
4053
* "https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate"
4154
* >multi-Region keys</a>, set the property on the primary key.
4255
* </p>
4356
* <p>
57+
* You cannot enable or disable automatic rotation <a href=
58+
* "https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk"
59+
* >Amazon Web Services managed KMS keys</a>. KMS always rotates the key
60+
* material of Amazon Web Services managed keys every year. Rotation of <a href=
61+
* "https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk"
62+
* >Amazon Web Services owned KMS keys</a> varies.
63+
* </p>
64+
* <note>
65+
* <p>
66+
* In May 2022, KMS changed the rotation schedule for Amazon Web Services
67+
* managed keys from every three years (approximately 1,095 days) to every year
68+
* (approximately 365 days).
69+
* </p>
70+
* <p>
71+
* New Amazon Web Services managed keys are automatically rotated one year after
72+
* they are created, and approximately every year thereafter.
73+
* </p>
74+
* <p>
75+
* Existing Amazon Web Services managed keys are automatically rotated one year
76+
* after their most recent rotation, and every year thereafter.
77+
* </p>
78+
* </note>
79+
* <p>
4480
* The KMS key that you use for this operation must be in a compatible key
4581
* state. For details, see <a
4682
* href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html"
@@ -75,17 +111,18 @@
75111
public class EnableKeyRotationRequest extends AmazonWebServiceRequest implements Serializable {
76112
/**
77113
* <p>
78-
* Identifies a symmetric encryption KMS key. You cannot enable automatic
79-
* rotation of <a href=
114+
* Identifies a symmetric encryption KMS key. You cannot enable or disable
115+
* automatic rotation of <a href=
80116
* "https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html"
81117
* >asymmetric KMS keys</a>, <a
82118
* href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html"
83119
* >HMAC KMS keys</a>, KMS keys with <a href=
84120
* "https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html"
85121
* >imported key material</a>, or KMS keys in a <a href=
86122
* "https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html"
87-
* >custom key store</a>. To enable or disable automatic rotation of a set
88-
* of related <a href=
123+
* >custom key store</a>. The key rotation status of these KMS keys is
124+
* always <code>false</code>. To enable or disable automatic rotation of a
125+
* set of related <a href=
89126
* "https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate"
90127
* >multi-Region keys</a>, set the property on the primary key.
91128
* </p>
@@ -120,17 +157,18 @@ public class EnableKeyRotationRequest extends AmazonWebServiceRequest implements
120157

121158
/**
122159
* <p>
123-
* Identifies a symmetric encryption KMS key. You cannot enable automatic
124-
* rotation of <a href=
160+
* Identifies a symmetric encryption KMS key. You cannot enable or disable
161+
* automatic rotation of <a href=
125162
* "https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html"
126163
* >asymmetric KMS keys</a>, <a
127164
* href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html"
128165
* >HMAC KMS keys</a>, KMS keys with <a href=
129166
* "https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html"
130167
* >imported key material</a>, or KMS keys in a <a href=
131168
* "https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html"
132-
* >custom key store</a>. To enable or disable automatic rotation of a set
133-
* of related <a href=
169+
* >custom key store</a>. The key rotation status of these KMS keys is
170+
* always <code>false</code>. To enable or disable automatic rotation of a
171+
* set of related <a href=
134172
* "https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate"
135173
* >multi-Region keys</a>, set the property on the primary key.
136174
* </p>
@@ -162,17 +200,18 @@ public class EnableKeyRotationRequest extends AmazonWebServiceRequest implements
162200
* <b>Length: </b>1 - 2048<br/>
163201
*
164202
* @return <p>
165-
* Identifies a symmetric encryption KMS key. You cannot enable
166-
* automatic rotation of <a href=
203+
* Identifies a symmetric encryption KMS key. You cannot enable or
204+
* disable automatic rotation of <a href=
167205
* "https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html"
168206
* >asymmetric KMS keys</a>, <a href=
169207
* "https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html"
170208
* >HMAC KMS keys</a>, KMS keys with <a href=
171209
* "https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html"
172210
* >imported key material</a>, or KMS keys in a <a href=
173211
* "https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html"
174-
* >custom key store</a>. To enable or disable automatic rotation of
175-
* a set of related <a href=
212+
* >custom key store</a>. The key rotation status of these KMS keys
213+
* is always <code>false</code>. To enable or disable automatic
214+
* rotation of a set of related <a href=
176215
* "https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate"
177216
* >multi-Region keys</a>, set the property on the primary key.
178217
* </p>
@@ -206,17 +245,18 @@ public String getKeyId() {
206245

207246
/**
208247
* <p>
209-
* Identifies a symmetric encryption KMS key. You cannot enable automatic
210-
* rotation of <a href=
248+
* Identifies a symmetric encryption KMS key. You cannot enable or disable
249+
* automatic rotation of <a href=
211250
* "https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html"
212251
* >asymmetric KMS keys</a>, <a
213252
* href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html"
214253
* >HMAC KMS keys</a>, KMS keys with <a href=
215254
* "https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html"
216255
* >imported key material</a>, or KMS keys in a <a href=
217256
* "https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html"
218-
* >custom key store</a>. To enable or disable automatic rotation of a set
219-
* of related <a href=
257+
* >custom key store</a>. The key rotation status of these KMS keys is
258+
* always <code>false</code>. To enable or disable automatic rotation of a
259+
* set of related <a href=
220260
* "https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate"
221261
* >multi-Region keys</a>, set the property on the primary key.
222262
* </p>
@@ -249,16 +289,17 @@ public String getKeyId() {
249289
*
250290
* @param keyId <p>
251291
* Identifies a symmetric encryption KMS key. You cannot enable
252-
* automatic rotation of <a href=
292+
* or disable automatic rotation of <a href=
253293
* "https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html"
254294
* >asymmetric KMS keys</a>, <a href=
255295
* "https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html"
256296
* >HMAC KMS keys</a>, KMS keys with <a href=
257297
* "https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html"
258298
* >imported key material</a>, or KMS keys in a <a href=
259299
* "https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html"
260-
* >custom key store</a>. To enable or disable automatic rotation
261-
* of a set of related <a href=
300+
* >custom key store</a>. The key rotation status of these KMS
301+
* keys is always <code>false</code>. To enable or disable
302+
* automatic rotation of a set of related <a href=
262303
* "https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate"
263304
* >multi-Region keys</a>, set the property on the primary key.
264305
* </p>
@@ -292,17 +333,18 @@ public void setKeyId(String keyId) {
292333

293334
/**
294335
* <p>
295-
* Identifies a symmetric encryption KMS key. You cannot enable automatic
296-
* rotation of <a href=
336+
* Identifies a symmetric encryption KMS key. You cannot enable or disable
337+
* automatic rotation of <a href=
297338
* "https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html"
298339
* >asymmetric KMS keys</a>, <a
299340
* href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html"
300341
* >HMAC KMS keys</a>, KMS keys with <a href=
301342
* "https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html"
302343
* >imported key material</a>, or KMS keys in a <a href=
303344
* "https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html"
304-
* >custom key store</a>. To enable or disable automatic rotation of a set
305-
* of related <a href=
345+
* >custom key store</a>. The key rotation status of these KMS keys is
346+
* always <code>false</code>. To enable or disable automatic rotation of a
347+
* set of related <a href=
306348
* "https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate"
307349
* >multi-Region keys</a>, set the property on the primary key.
308350
* </p>
@@ -338,16 +380,17 @@ public void setKeyId(String keyId) {
338380
*
339381
* @param keyId <p>
340382
* Identifies a symmetric encryption KMS key. You cannot enable
341-
* automatic rotation of <a href=
383+
* or disable automatic rotation of <a href=
342384
* "https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html"
343385
* >asymmetric KMS keys</a>, <a href=
344386
* "https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html"
345387
* >HMAC KMS keys</a>, KMS keys with <a href=
346388
* "https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html"
347389
* >imported key material</a>, or KMS keys in a <a href=
348390
* "https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html"
349-
* >custom key store</a>. To enable or disable automatic rotation
350-
* of a set of related <a href=
391+
* >custom key store</a>. The key rotation status of these KMS
392+
* keys is always <code>false</code>. To enable or disable
393+
* automatic rotation of a set of related <a href=
351394
* "https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate"
352395
* >multi-Region keys</a>, set the property on the primary key.
353396
* </p>

aws-android-sdk-kms/src/main/java/com/amazonaws/services/kms/model/GenerateDataKeyWithoutPlaintextRequest.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,17 @@
3434
* <p>
3535
* This operation is useful for systems that need to encrypt data at some point,
3636
* but not immediately. When you need to encrypt the data, you call the
37-
* <a>Decrypt</a> operation on the encrypted copy of the key. It's also useful
38-
* in distributed systems with different levels of trust. For example, you might
39-
* store encrypted data in containers. One component of your system creates new
40-
* containers and stores an encrypted data key with each container. Then, a
41-
* different component puts the data into the containers. That component first
42-
* decrypts the data key, uses the plaintext data key to encrypt data, puts the
43-
* encrypted data into the container, and then destroys the plaintext data key.
44-
* In this system, the component that creates the containers never sees the
45-
* plaintext data key.
37+
* <a>Decrypt</a> operation on the encrypted copy of the key.
38+
* </p>
39+
* <p>
40+
* It's also useful in distributed systems with different levels of trust. For
41+
* example, you might store encrypted data in containers. One component of your
42+
* system creates new containers and stores an encrypted data key with each
43+
* container. Then, a different component puts the data into the containers.
44+
* That component first decrypts the data key, uses the plaintext data key to
45+
* encrypt data, puts the encrypted data into the container, and then destroys
46+
* the plaintext data key. In this system, the component that creates the
47+
* containers never sees the plaintext data key.
4648
* </p>
4749
* <p>
4850
* To request an asymmetric data key pair, use the <a>GenerateDataKeyPair</a> or

aws-android-sdk-kms/src/main/java/com/amazonaws/services/kms/model/GenerateMacRequest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@
3636
* keys in KMS</a> in the <i> <i>Key Management Service Developer Guide</i>
3737
* </i>.
3838
* </p>
39+
* <note>
40+
* <p>
41+
* Best practices recommend that you limit the time during which any signing
42+
* mechanism, including an HMAC, is effective. This deters an attack where the
43+
* actor uses a signed message to establish validity repeatedly or long after
44+
* the message is superseded. HMAC tags do not include a timestamp, but you can
45+
* include a timestamp in the token or message to help you detect when its time
46+
* to refresh the HMAC.
47+
* </p>
48+
* </note>
3949
* <p>
4050
* The KMS key that you use for this operation must be in a compatible key
4151
* state. For details, see <a

0 commit comments

Comments
 (0)