Skip to content

feat: Add an escape hatch for non-FIPS DynamoDB on FIPS binaries#51883

Closed
codingllama wants to merge 1 commit intomasterfrom
codingllama/aws-dynamo-fips
Closed

feat: Add an escape hatch for non-FIPS DynamoDB on FIPS binaries#51883
codingllama wants to merge 1 commit intomasterfrom
codingllama/aws-dynamo-fips

Conversation

@codingllama
Copy link
Copy Markdown
Contributor

Add the "TELEPORT_UNSTABLE_DISABLE_DYNAMODB_FIPS" environment variable as an escape hatch for FIPS binaries that want to use non-FIPS DynamoDB endpoints.

FIPS DynamoDB is not available in all AWS regions. Nevertheless, this may be acceptable for certain use-cases.

Without the env varible:

$ teleport start --fips
> 2025-02-05T13:55:48.665-03:00 INFO [DYNAMODB]  resolved endpoint for aws service service.id:DynamoDB service.api_version:2012-08-10 uri:https://dynamodb-fips.sa-east-1.amazonaws.com endpoint/resolver.go:71
>
> ERROR REPORT:
> User Message: initialization failed
> 	operation error DynamoDB: DescribeTable, https response error StatusCode: 0, RequestID: , request send failed, Post "https://dynamodb-fips.sa-east-1.amazonaws.com/": dial tcp: lookup dynamodb-fips.sa-east-1.amazonaws.com on 127.0.0.53:53: no such host

Using the env variable:

$ TELEPORT_UNSTABLE_DISABLE_DYNAMODB_FIPS=yes teleport start --fips
# backend
> 2025-02-05T14:05:51.828-03:00 INFO [DYNAMODB]  resolved endpoint for aws service service.id:DynamoDB service.api_version:2012-08-10 uri:https://dynamodb.sa-east-1.amazonaws.com endpoint/resolver.go:71
> 2025-02-05T14:05:51.996-03:00 INFO [DYNAMODB]  resolved endpoint for aws service service.id:DynamoDB Streams service.api_version:2012-08-10 uri:https://streams.dynamodb.sa-east-1.amazonaws.com endpoint/resolver.go:71
# events
> 2025-02-05T14:05:52.238-03:00 INFO [DYNAMODB]  resolved endpoint for aws service service.id:DynamoDB service.api_version:2012-08-10 uri:https://dynamodb.sa-east-1.amazonaws.com endpoint/resolver.go:71

Partially retracts #34170 via the added env variable.

@codingllama codingllama added no-changelog Indicates that a PR does not require a changelog entry backport/branch/v15 backport/branch/v17 labels Feb 5, 2025
@github-actions github-actions Bot added audit-log Issues related to Teleports Audit Log size/md labels Feb 5, 2025
Comment thread lib/events/dynamoevents/dynamoevents.go
@codingllama
Copy link
Copy Markdown
Contributor Author

@zmb3 this is all that is needed to support DynamoDB. #34170 touches lines that I didn't touch here, but I also didn't want to lower requirements more than we absolutely have to.

I'm skipping the changelog, as I'm unsure whether we want an _UNSTABLE variable documented that way. (Tim suggested an _UNSTABLE variable, happy to change if you prefer.)

Finally, let me know how far this should be backported. (I've added all active releases.)

Let me know what you think.

@codingllama
Copy link
Copy Markdown
Contributor Author

It looks like we should consider both S3 and STS in here as well, so let me move this to draft while I chase those. Will ping everyone once we are ready to go again.

@codingllama codingllama marked this pull request as draft February 6, 2025 14:08
@codingllama
Copy link
Copy Markdown
Contributor Author

Re S3:

S3 obeys the teleport start --fips flag - if the flag is set it attempts to use FIPS S3, otherwise it does not (it doesn't matter if the binary is "boring"). S3 can also be controlled via its URL: setting "region" or "use_fips_endpoint" will override the Teleport config and --fips flag.

TL;DR: S3 is already configurable through other means and needs no additional escape hatch flag.

@codingllama codingllama force-pushed the codingllama/aws-dynamo-fips branch from ab6639d to 8354aa6 Compare February 6, 2025 15:02
@codingllama
Copy link
Copy Markdown
Contributor Author

Closing in favor of #51924.

@codingllama codingllama deleted the codingllama/aws-dynamo-fips branch February 10, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit-log Issues related to Teleports Audit Log backport/branch/v17 no-changelog Indicates that a PR does not require a changelog entry size/md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants