Skip to content
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

ASCP assumes IAM role from its own SA #201

Open
JiayangZhou opened this issue Mar 8, 2023 · 2 comments
Open

ASCP assumes IAM role from its own SA #201

JiayangZhou opened this issue Mar 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@JiayangZhou
Copy link

As described in the Usage section in this repo, we need to create an AWS IAM role with proper access to the secret manager or parameter store and have that IAM role attached to a SA, used by a pod. Then ASCP would come to retrieve the pod identity and exchange it for the IAM role. ASCP assumes the IAM role of the pod.

Could we have a feature to attach the IAM role to the SA of ASCP so that ASCP could assume the IAM role of its own SA and have enough access to a secret manager? This does not really sound secure enough, as its SA will have to contain all IAM permission required to access different sercert managers for a cluster. but it would help eliminate the redundant SA creation for each pod, nginx-deployment-sa in this example

More onto it, as SecretProviderClass is per namespace object, could we specify a name of SA, in SecretProviderClass's yaml file for instance. ASCP could be smarter enough to assume IAM role from that SA instead. The SA is attached to an IAM role with all necessary permission required for one namespace to access its secret managers. It goes somewhat against the less privileged principle but it would help tremendously for the use case, such as: we have many Deployment in a namespace but only need to access one secret manager. We already use SA in Deployment, repetitive modification in each SA feels really unnecessary. Plus, that seems to be how Azure is implementing their CSI.

@JiayangZhou JiayangZhou added the enhancement New feature or request label Mar 8, 2023
@rverma-dev
Copy link

This would also helpful in the cases where we want to create a kubernetes secret to sync with AWS secrets manager for tools which doesn't support CSI secret driver like Flux

@jbct
Copy link

jbct commented Apr 29, 2024

Thank you for the report - we will look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants