Skip to content

Commit

Permalink
Remove TODOs related to use of FIPS endpoints with DynamoDB
Browse files Browse the repository at this point in the history
Decided to keep the current code as-is, so removing the TODOs

aws/aws-sdk-go#5078 was landed upstream, so bump `aws-sdk-go` to pick up the change.
Note that this new functionality is not used, but would like to keep it updated
so it can possibly be used in the future without needing to bump the SDK version.
  • Loading branch information
reedloden committed Jan 2, 2024
1 parent 3d2e9ec commit 12ebad5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -37,7 +37,7 @@ require (
github.com/andybalholm/brotli v1.0.6
github.com/aquasecurity/libbpfgo v0.5.1-libbpf-1.2
github.com/armon/go-radix v1.0.0
github.com/aws/aws-sdk-go v1.49.4
github.com/aws/aws-sdk-go v1.49.13
github.com/aws/aws-sdk-go-v2 v1.24.0
github.com/aws/aws-sdk-go-v2/config v1.26.1
github.com/aws/aws-sdk-go-v2/credentials v1.16.12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -194,8 +194,8 @@ github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQ
github.com/aws/aws-sdk-go v1.17.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.49.4 h1:qiXsqEeLLhdLgUIyfr5ot+N/dGPWALmtM1SetRmbUlY=
github.com/aws/aws-sdk-go v1.49.4/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go v1.49.13 h1:f4mGztsgnx2dR9r8FQYa9YW/RsKb+N7bgef4UGrOW1Y=
github.com/aws/aws-sdk-go v1.49.13/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw=
github.com/aws/aws-sdk-go-v2 v1.24.0 h1:890+mqQ+hTpNuw0gGP6/4akolQkSToDJgHfQE7AwGuk=
Expand Down
4 changes: 1 addition & 3 deletions lib/backend/dynamo/dynamodbbk.go
Expand Up @@ -275,13 +275,11 @@ func New(ctx context.Context, params backend.Params) (*Backend, error) {
}
b.session.Config.HTTPClient = httpClient

// create DynamoDB service:
// Create DynamoDB service.
svc, err := dynamometrics.NewAPIMetrics(dynamometrics.Backend, dynamodb.New(b.session, &aws.Config{
// Setting this on the individual service instead of the session, as DynamoDB Streams
// and Application Auto Scaling do not yet have FIPS endpoints in non-GovCloud.
// See also: https://aws.amazon.com/compliance/fips/#FIPS_Endpoints_by_Service
// TODO(reed): This can be simplified once https://github.com/aws/aws-sdk-go/pull/5078
// is available (or whenever AWS adds the missing FIPS endpoints).
UseFIPSEndpoint: useFIPSEndpoint,
}))
if err != nil {
Expand Down
4 changes: 1 addition & 3 deletions lib/events/dynamoevents/dynamoevents.go
Expand Up @@ -287,13 +287,11 @@ func New(ctx context.Context, cfg Config) (*Log, error) {
return nil, trace.Wrap(err)
}

// create DynamoDB service:
// Create DynamoDB service.
svc, err := dynamometrics.NewAPIMetrics(dynamometrics.Events, dynamodb.New(b.session, &aws.Config{
// Setting this on the individual service instead of the session, as DynamoDB Streams
// and Application Auto Scaling do not yet have FIPS endpoints in non-GovCloud.
// See also: https://aws.amazon.com/compliance/fips/#FIPS_Endpoints_by_Service
// TODO(reed): This can be simplified once https://github.com/aws/aws-sdk-go/pull/5078
// is available (or whenever AWS adds the missing FIPS endpoints).
UseFIPSEndpoint: events.FIPSProtoStateToAWSState(cfg.UseFIPSEndpoint),
}))
if err != nil {
Expand Down

0 comments on commit 12ebad5

Please sign in to comment.