Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: populate RoleArn and ExternalId fields for AWS RDS IAM authentication (#18008)

Vincent Huang825f53473790
diff --git a/backend/api/v1/instance_service.go b/backend/api/v1/instance_service.go
index 35cbbffdeb..6e8aaea317 100644
--- a/backend/api/v1/instance_service.go
+++ b/backend/api/v1/instance_service.go
@@ -792,6 +792,8 @@ func (s *InstanceService) UpdateDataSource(ctx context.Context, req *connect.Req
AccessKeyId: awsCredential.AccessKeyId,
SecretAccessKey: awsCredential.SecretAccessKey,
SessionToken: awsCredential.SessionToken,
+ RoleArn: awsCredential.RoleArn,
+ ExternalId: awsCredential.ExternalId,
},
}
} else {
diff --git a/backend/api/v1/instance_service_converter.go b/backend/api/v1/instance_service_converter.go
index 396cd2ded3..ec0729a012 100644
--- a/backend/api/v1/instance_service_converter.go
+++ b/backend/api/v1/instance_service_converter.go
@@ -228,7 +228,10 @@ func convertDataSources(dataSources []*storepb.DataSource) []*v1pb.DataSource {
case v1pb.DataSource_AWS_RDS_IAM:
if awsCredential := ds.GetAwsCredential(); awsCredential != nil {
dataSource.IamExtension = &v1pb.DataSource_AwsCredential{
- AwsCredential: &v1pb.DataSource_AWSCredential{},
+ AwsCredential: &v1pb.DataSource_AWSCredential{
+ RoleArn: awsCredential.RoleArn,
+ ExternalId: awsCredential.ExternalId,
+ },
}
}
case v1pb.DataSource_GOOGLE_CLOUD_SQL_IAM:
@@ -496,6 +499,8 @@ func convertV1DataSource(dataSource *v1pb.DataSource) (*storepb.DataSource, erro
AccessKeyId: awsCredential.AccessKeyId,
SecretAccessKey: awsCredential.SecretAccessKey,
SessionToken: awsCredential.SessionToken,
+ RoleArn: awsCredential.RoleArn,
+ ExternalId: awsCredential.ExternalId,
},
}
}