Skip to content

Only apply dynamic AWS settings to dynamic AWS dbs#50970

Merged
GavinFrazar merged 2 commits intomasterfrom
gavinfrazar/fix-db-assume-role-arn
Jan 14, 2025
Merged

Only apply dynamic AWS settings to dynamic AWS dbs#50970
GavinFrazar merged 2 commits intomasterfrom
gavinfrazar/fix-db-assume-role-arn

Conversation

@GavinFrazar
Copy link
Copy Markdown
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/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
Comment thread lib/srv/db/watcher.go Outdated
Comment thread lib/srv/db/server.go Outdated
Comment thread lib/srv/db/watcher.go Outdated
@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
@GavinFrazar GavinFrazar deleted the gavinfrazar/fix-db-assume-role-arn branch January 14, 2025 03:09
@public-teleport-github-review-bot
Copy link
Copy Markdown

@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
carloscastrojumo pushed a commit to carloscastrojumo/teleport that referenced this pull request Feb 19, 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/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