Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

KMS: Add list-key-rotations flag#12853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
demaj wants to merge4 commits intolocalstack:main
base:main
Choose a base branch
Loading
fromdemaj:kms-add-list-key-rotations

Conversation

demaj
Copy link

@demajdemaj commentedJul 11, 2025
edited
Loading

Motivation

Adding support forListKeyRotations. Mentioned in#12342.

Changes

Implementation oflist-key-rotations feature for keys that may have multiple key materials associated with them.

As per AWS's, list-key-rotation is only allowed for:

  • symmetric keys
  • Imported keys from single-region-only

TODO

What's left to do:

  • Add support for imported EXTERNAL origin single-region keys

Copy link
Contributor

@localstack-botlocalstack-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Welcome to LocalStack! Thanks for raising your first Pull Request and landing in your contributions. Our team will reach out with any reviews or feedbacks that we have shortly. We recommend joining ourSlack Community and share your PR on the#community channel to share your contributions with us. Please make sure you are following ourcontributing guidelines and ourCode of Conduct.

@localstack-bot
Copy link
Contributor

localstack-bot commentedJul 11, 2025
edited
Loading

All contributors have signed the CLA ✍️ ✅
Posted by theCLA Assistant Lite bot.

@demaj
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

localstack-bot added a commit that referenced this pull requestJul 11, 2025
@viren-nadkarniviren-nadkarni added the semver: minorNon-breaking changes which can be included in minor releases, but not in patch releases labelJul 14, 2025
@viren-nadkarniviren-nadkarni self-assigned thisJul 14, 2025
@demajdemajforce-pushed thekms-add-list-key-rotations branch from6570477 tofd7df95CompareJuly 17, 2025 02:57
@demajdemaj marked this pull request as ready for reviewJuly 17, 2025 02:58
f"failed to satisfy constraint: Member must satisfy enum value set: [ALL_KEY_MATERIAL, ROTATIONS_ONLY]"
)

if key.metadata["KeySpec"] != KeySpec.SYMMETRIC_DEFAULT:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

As per AWS docs, for asymmetric keys whenIncludeKeyMaterial is not provided we simply return theRotations as empty[].
See here:https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-compare.html#key-type-table

if include_key_material == IncludeKeyMaterial.ALL_KEY_MATERIAL:
rotation_history.append(rotation_entry)
else: # Default ROTATIONS_ONLY
if rotation.rotation_type in ["AUTOMATIC", "ON_DEMAND"]:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

A KMS key on its creation doesn't have any rotation_type.

sannya-singal reacted with thumbs up emoji
initial_rotation = KeyRotationEntry(
key_id=self.metadata["Arn"],
key_material_state="CURRENT",
key_material_id=long_uid(), # FIXME: a more appropriate KMS output
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Currently relying on uuid, open to suggestions.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm getting"Truncated": false here. Not entirely sure why it's being included, I do not see it on my awscli output; there is a discrepancy between AWS Docs and AWS CLI.
Removed them manually from this file (I know we're not supposed to manually edit it). Let me know if I should re-add it and make changes on the function's response payload.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@localstack-botlocalstack-botlocalstack-bot left review comments

@sannya-singalsannya-singalAwaiting requested review from sannya-singalsannya-singal is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

@viren-nadkarniviren-nadkarni

Labels
semver: minorNon-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@demaj@localstack-bot@viren-nadkarni

[8]ページ先頭

©2009-2025 Movatter.jp