-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
AWS OIDC: List Deployed Database Services - implementation #49331
AWS OIDC: List Deployed Database Services - implementation #49331
Conversation
6dc7b65
to
d5e82f0
Compare
46744e1
to
f131a9f
Compare
d5e82f0
to
c20b1dd
Compare
f131a9f
to
696d356
Compare
c20b1dd
to
7db738c
Compare
696d356
to
b7237e5
Compare
7db738c
to
4e7bb9c
Compare
b7237e5
to
6cd29f8
Compare
@nklaassen @tcsc Can you please take a look when you get a chance? |
6cd29f8
to
557241b
Compare
@nklaassen @tcsc Friendly ping :) |
aef905d
to
c4f7b14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry marco, don't know how I missed this for so long, feel free to nag me on slack if I'm not reviewing your PRs
return nil, trace.Wrap(err) | ||
} | ||
|
||
if err := authCtx.CheckAccessToKind(types.KindIntegration, types.VerbUse); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we have an authz check on kind db_service or anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinion on that.
We don't require any other authz check for deploying.
We have been requiring only integration.use
check for those methods, but we can easily add more.
If we add it here, then I think we should add it to the deployment call.
The most sensitive part of this listing is the teleport.yaml
configuration, but even that only has the IAM Token Name, which we don't consider to be a secret.
I'm in favor of keeping it as is, but let me know what you think.
func serviceDashboardURL(region, clusterName, serviceName string) string { | ||
return fmt.Sprintf("https://%s.console.aws.amazon.com/ecs/v2/clusters/%s/services/%s", region, clusterName, serviceName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make 100% sure that region, clusterName, and serviceName are validated before building a URL like this to avoid SSRF? Maybe they already are but it's not extremely clear to me where these are all coming from
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This happens in two places:
- after deploying a service
- when creating the list of already deployed services
So, it's always after those values were used to call the AWS API.
I'm pretty confident that invalid values do not reach this method given its current usage.
Anyway, I'll add checks ensuring that the host part is valid (region) so that future usage of this method is also not prone to SSRF.
c4f7b14
to
6da2178
Compare
6da2178
to
0bfa0b8
Compare
@tcsc @nklaassen Can you please take another look? |
0bfa0b8
to
5634a35
Compare
5634a35
to
1916b75
Compare
This PR implements the List Deployed Database Services. This will be used to let the user know which deployed database services were deployed during the Enroll New Resource / RDS flows.
1916b75
to
087cbbd
Compare
@marcoandredinis See the table below for backport results.
|
This PR implements the List Deployed Database Services.
This will be used to let the user know which deployed database services were deployed during the Enroll New Resource / RDS flows.