-
Notifications
You must be signed in to change notification settings - Fork 6
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
[question]: accessing pre-signed s3 object urls created by workflow spec #190
Comments
@wesbragagt Can you clarify where you see this policy? Is it on the bucket or is it an IAM policy? |
@fullykubed It's one of the policies associated with the service account related to a |
Ok. Learned something new myself on this one. Its undocumented, but it appears that S3 presigned urls have the same permissions as the user which created them. Thus if the "user" is the service account which is only allowed to interact with resources from inside the Kubernetes cluster, then the link will also only work from inside the cluster (that is because the URL is actually generated using the credentials of the creator). This would actually also explain a bug that I have found in our velero implementation that uses presigned urls for logs as well. We currently do not have the ability to disable the IP blocks b/c we wanted to guarantee that credentials could never be compromised due to a misconfiguration issue. However, we can add support for an optional toggle that reduces the IP blocks for S3 actions specifically because we don't want to prevent you from using valid AWS functionality like presigned urls. Expect to see that in the next release. |
Nevermind, the presigned behavior is literally in the first paragraph of the AWS docs. |
Yeah, it took me some time debugging to realize the same thing. All good. Glad it's something helpful to the stack as well. |
@fullykubed my workaround this was to create an iam user with only the necessary permissions to read objects from the bucket and passing its access/secret key pair as an output secret to the runtime process that generates the pre-signed url. |
Thanks for the insight. We will also be adding some enhancements in the next release that should make this easier. |
More enhancements for this are still WIP, but this might be of interest for a more secure way to manage non-IRSA creds: https://panfactum.com/docs/edge/reference/infrastructure-modules/submodule/kubernetes/kube_aws_creds |
Prior Search
What is your question?
I have an Argo workflow that performs some data operations and dumps a file into a private s3 bucket. After that it generates a pre-signed url and publishes as a slack notification for our support team to download the file. Whenever the user lands on the pre-signed url link it shows as a denied "with an explicit deny in an identity-based policy".
After looking through the iam role assumed by this program, I noticed this deny policy:
After I deleted that policy, I was able to download the file.
I understand the intention in design here for blocking traffic outside the cluster. That said I'm looking for some guidance regarding how to enable such flow of exposing a temporary link to download an object that is generated by a workflow for which assumes that role.
What primary components of the stack does this relate to?
terraform
Code of Conduct
The text was updated successfully, but these errors were encountered: