Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let Vault modify dynamodb tables and use pay-per-request billing mode. #25115

Closed

Conversation

michael-diggin
Copy link
Contributor

Fixes Issue #25114.

This PR introduces support for creating the DynamoDB table that Vault would use with PAY_PER_REQUEST billing mode, and introduces support for allowing Vault to modify the billing mode and read/write capacity of the table if it already exists. This is done with new environment variables, and the current default behaviour is left unchanged (no-ops if the table already exists).

@michael-diggin michael-diggin requested a review from a team as a code owner January 29, 2024 10:11
@hashicorp-cla
Copy link

hashicorp-cla commented Jan 29, 2024

CLA assistant check
All committers have signed the CLA.

@schavis schavis added the content-lgtm Content changes approved. Merge depends on code review label Feb 22, 2024
@schavis schavis self-requested a review February 22, 2024 20:48
@schavis
Copy link
Contributor

schavis commented Feb 22, 2024

Content LGTM. Feel free to merge once ENG signs off on the code changes

@schavis schavis added the needs-eng-review Community PR waiting for ENG review label May 9, 2024
Copy link
Contributor

@VioletHynes VioletHynes left a comment

Choose a reason for hiding this comment

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

Hi there! Sorry it took us some time to get to this PR, but it broadly looks good. I appreciate all of the new tests for the functionality. There's some small changes I'd like to see before it gets merged, e.g. the typo in the changelog. Thank you for this contribution, and I'm eager to try and see this one to merge.

website/content/docs/configuration/storage/dynamodb.mdx Outdated Show resolved Hide resolved
changelog/25115.txt Outdated Show resolved Hide resolved
physical/dynamodb/dynamodb_test.go Outdated Show resolved Hide resolved
physical/dynamodb/dynamodb_test.go Show resolved Hide resolved
physical/dynamodb/dynamodb_test.go Outdated Show resolved Hide resolved
@VioletHynes VioletHynes requested a review from a team as a code owner January 20, 2025 18:11
Copy link
Contributor

@VioletHynes VioletHynes left a comment

Choose a reason for hiding this comment

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

Thank you! This looks great. Again, apologies it took us a while to get eyes on this. Appreciate your patience.

I'll wait for CI to finish on this PR and I need to get the 'requested changes' unflagged so it can be merged, but I'll try and get this merged as soon as everything's green.

@michael-diggin
Copy link
Contributor Author

michael-diggin commented Jan 20, 2025

Hi there! Sorry it took us some time to get to this PR, but it broadly looks good. I appreciate all of the new tests for the functionality. There's some small changes I'd like to see before it gets merged, e.g. the typo in the changelog. Thank you for this contribution, and I'm eager to try and see this one to merge.

No problem and thanks for the review! I've updated the PR based on your comments. There's a small annoying issue where some of my earlier commits had the incorrect commit author which the CLA check doesn't like (an old work account that has since been deactivated).

VioletHynes and others added 17 commits January 20, 2025 21:11
* Update vault-plugin-auth-azure to v0.19.2

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <[email protected]>
…ndbys (#28807)

* return 500 for RPC failures during perf standby logins

* godoc

* changelog
… latest (#28855)

* Pull versioned golang images in Zlint testsuite to avoid pulling with latest

 - Leverage the versioned golang images which should be more static avoiding
   issues we somtimes encounter pulling latest images from our docker mirror.
 - We use the golang runtime version to avoid having to update this test
   continuously.

* Fallback to latest if the version tag isn't a release tag
* Content conversion from tutorial to doc - seal

* Add AppRole best practices

* Clean up the reference list

* Updated the title

* match the titles

* Add namespaces best practices

* Update the table style
…28862)

* add fragment locks to GetActiveLocalFragment and GetActiveFragment

* update locks for all functions
Fix typo and text formatting
* changes then onto tests

* fix wif test failures

* changelog

* clean up

* address pr comments

* only test one wif engine for relevant tests

* add back engine loop for tests that depend on type
* initial changes need to add test coverage

* change icon

* replace original idea with hds::codeblock on kvv2 details view

* changelog

* fixing edit view by addressing viewportMargin

* fix failing test

* missedone

* Update 28808.txt

* Update json-editor.js

* test coverage

* update codeblock selector

* Update general-selectors.ts

* Update kv-data-fields.js

* Update ui/lib/core/addon/components/json-editor.js

Co-authored-by: claire bontempo <[email protected]>

* Update ui/lib/kv/addon/components/kv-data-fields.js

Co-authored-by: claire bontempo <[email protected]>

* update test name

* add default to modifier

---------

Co-authored-by: claire bontempo <[email protected]>
* chore: update reference consul-helm url to consul-k8s

* docs: add changelog

---------

Co-authored-by: Yoko Hyakuna <[email protected]>
* Make identity store loading and alias merging deterministic

* Add CHANGELOG

* Refactor our Ent-only logic from determinism test

* Use stub-maker

* Add test godoc
* Move helper funcs out of tests to fix build errors

* Rename identiy->identity
raskchanky and others added 20 commits January 20, 2025 21:11
* ce changes for vault-31750

* add changelog

* make proto

* refactor naming

* clarify error message

* update changelog

* one more time

* make proto AGAIN
* add api docs for pqc key types

* add pqc key types to docs

* remove slh-dsa and add hybrid
…29334)

* replace keyring dependency to address zombie dbus-daemons processes

* changelog
* docs/vault-k8s: updates for v1.6.0 release

* Apply suggestions from code review

Co-authored-by: Sarah Chavis <[email protected]>

* updating whitespace and an extra "injector"

---------

Co-authored-by: Sarah Chavis <[email protected]>
* check if not initialized

* add comment and fix flake
* string-to-camel helper

* fix:

* Update string-to-camel-test.js

* update comment

* rename and clarify comment

* welp, forgot to update test
* Add 'how to run' instructions for each scenario
* initial things without helper changes

* adjust test for clean up of secret-engine-helper

* remove added line thats better in next pr

* remove extra check

* 🧹

* replace return with continue within loops
* docs: DB skip auto import rotation

* add usage section

* add password field; mark self_managed_password as deprecated
This PR introduces a new type of conflict resolution for duplicate
Entities and Groups. Renaming provides a way of preventing Vault from
entering case-sensitive mode, which is the current behavior for any kind
of duplicate.

Renames append the conflicting identity artifact's UUID to its name and
updates a metadata field to indicate the pre-existing artifact's UUID.

The feature is gated by the force-identity-deduplication activation flag.

In order to maintain consistent behavior between the reporting resolver
and the rename operation, we need to adjust the behavior of generated
reports. Previously, they intentionally preserved existing Group merge
determinism, wherein the last MemDB update would win and all others
would be renamed. This approach is more complicated for the rename
resolver, since we would need to update any duplicated entity in the
cache while inserting the new duplicate (resulting in two MemDB
operations). Though we can ensure atomic updates of the two identity
artifacts with transactions (which we could get for groups with a minor
adjustment, and we will get along with batching of Entity upserts on 
load), it's far simpler to just rename all but the first insert as proposed
in the current PR.

Since the feature is gated by an activation flag with appropriate 
warnings of potential changes via the reporting resolver, we opt
for simplicity over maintaining pre-existing behavior. We can revisit
this assumption later if we think alignment with existing behavior
outweighs any potential complexity in the rename operation.

Entity alias resolution is left alone as a destructive merge operation
to prevent a potentially high-impact change in existing behavior.
Typo in client count references.
* Updated the PostgreSQL database creation command to ensure the static role name is consistent.

The role name specified in allowed_roles="my-role" under the section "Rootless Configuration and Password Rotation for Static Roles" should align with the static role name in step #3. Previously, the command incorrectly used "my-static-role"; it should be "my-role" to match the earlier step.

The same role name should also be used when reading the static credentials in step #4

* Added the file changelog/29138.txt

* Delete changelog/29138.txt

---------

Co-authored-by: Yoko Hyakuna <[email protected]>
Co-authored-by: akshya96 <[email protected]>
Co-authored-by: Violet Hynes <[email protected]>
@michael-diggin michael-diggin force-pushed the let-vault-modify-dynamodb-tables branch from 229d3ad to ecd9d7c Compare January 20, 2025 21:12
@michael-diggin michael-diggin requested review from a team as code owners January 20, 2025 21:12
@michael-diggin
Copy link
Contributor Author

michael-diggin commented Jan 20, 2025

Ah I've made a mess of this trying to sort out those commits - let me close it and create a new one to save a huge headache, sorry!

@VioletHynes
Copy link
Contributor

Hehe, it seems so! No matter, feel free to tag me (and @schavis) in the next one you open and I'll re-review.

@michael-diggin michael-diggin deleted the let-vault-modify-dynamodb-tables branch January 22, 2025 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content-lgtm Content changes approved. Merge depends on code review needs-eng-review Community PR waiting for ENG review storage/dynamodb
Projects
None yet
Development

Successfully merging this pull request may close these issues.