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

Only apply dynamic AWS settings to dynamic AWS dbs #50970

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

GavinFrazar
Copy link
Contributor

Changelog: Fixed a database service bug where db_service.resources.aws.assume_role_arn settings could affect non-AWS dynamic databases or incorrectly override db_service.aws.assume_role_arn settings.

Dynamic database resource matchers can include AWS settings to assume an AWS IAM role when they match a database.
The settings should only be applied to dynamic AWS databases.

The db service will no longer apply these settings to non-AWS databases.

It will also no longer apply these settings to databases discovered by the legacy cloud watchers in db_service.aws - the cloud watchers have an assume_role_arn setting that should not be overridden by dynamic database matcher settings.

@GavinFrazar GavinFrazar added aws Used for AWS Related Issues. database-access Database access related issues and PRs backport/branch/v15 backport/branch/v16 backport/branch/v17 labels Jan 11, 2025
@GavinFrazar GavinFrazar requested a review from greedy52 January 11, 2025 01:54
@github-actions github-actions bot requested a review from r0mant January 11, 2025 01:54
Dynamic database resource matchers can include AWS settings to assume an
AWS IAM role when they match a database.
The settings should only be applied to dynamic AWS databases.

The db service will no longer apply these settings to non-AWS databases.

It will also no longer apply these settings to databases discovered by
the legacy cloud watchers in db_service.aws - the cloud watchers have an
assume_role_arn setting that should not be overridden by dynamic
database matcher settings.
@GavinFrazar GavinFrazar force-pushed the gavinfrazar/fix-db-assume-role-arn branch 2 times, most recently from 1be37ec to 13f9f97 Compare January 13, 2025 20:47
lib/srv/db/watcher.go Outdated Show resolved Hide resolved
lib/srv/db/server.go Outdated Show resolved Hide resolved
lib/srv/db/watcher.go Outdated Show resolved Hide resolved
@GavinFrazar GavinFrazar force-pushed the gavinfrazar/fix-db-assume-role-arn branch from 13f9f97 to d91942d Compare January 14, 2025 02:30
@GavinFrazar GavinFrazar enabled auto-merge January 14, 2025 02:31
@GavinFrazar GavinFrazar added this pull request to the merge queue Jan 14, 2025
Merged via the queue into master with commit 7d38f13 Jan 14, 2025
41 checks passed
@GavinFrazar GavinFrazar deleted the gavinfrazar/fix-db-assume-role-arn branch January 14, 2025 03:09
@public-teleport-github-review-bot

@GavinFrazar See the table below for backport results.

Branch Result
branch/v15 Failed
branch/v16 Failed
branch/v17 Failed

mvbrock pushed a commit that referenced this pull request Jan 18, 2025
* Only apply dynamic AWS settings to dynamic AWS dbs

Dynamic database resource matchers can include AWS settings to assume an
AWS IAM role when they match a database.
The settings should only be applied to dynamic AWS databases.

The db service will no longer apply these settings to non-AWS databases.

It will also no longer apply these settings to databases discovered by
the legacy cloud watchers in db_service.aws - the cloud watchers have an
assume_role_arn setting that should not be overridden by dynamic
database matcher settings.

* fix reconcilitation race
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws Used for AWS Related Issues. backport/branch/v15 backport/branch/v16 backport/branch/v17 database-access Database access related issues and PRs size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants