Skip to content

feat: adjust the provider to use the available service Account annotations instead of requiring it again in the SPC parameters #1443

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

Conversation

wenzel-felix
Copy link

@wenzel-felix wenzel-felix commented Feb 3, 2024

Reason for Change:

Currently if one wants to use workload identity with this CSI driver one has to add the clientID manually to the parameters even though usually the service account of the pod mounting has this set anyway in its annotations. Other Secrets Store CSI Driver's are also taking care of this to simplify the usage.

Is this a chart or deployment yaml update?

Yes, there is an additional cluster role and cluster role binding required to retrieve the service account annotations.

Requirements

  • squashed commits
  • included documentation
  • added unit tests and e2e tests (if applicable).

Issue Fixed:

none

Does this change contain code from or inspired by another project?

  • Yes
  • No

If "Yes," did you notify that project's maintainers and provide attribution?
No

Special Notes for Reviewers:

@wenzel-felix
Copy link
Author

@microsoft-github-policy-service agree

@wenzel-felix wenzel-felix changed the title adjust the provider to use the available service Account annotations instead of requiring it again in the SPC parameters feat: adjust the provider to use the available service Account annotations instead of requiring it again in the SPC parameters Feb 3, 2024
@wenzel-felix wenzel-felix force-pushed the feature/use_clientID_from_serviceAccount branch 2 times, most recently from 8c472e0 to 2a3335b Compare February 3, 2024 23:13
…instead of requiring it again in the SPC parameters
@wenzel-felix wenzel-felix force-pushed the feature/use_clientID_from_serviceAccount branch from 2a3335b to 0afa0ee Compare February 3, 2024 23:15
@wenzel-felix
Copy link
Author

@aramase @nilekhc, could you please provide feedback on this PR?

@wenzel-felix
Copy link
Author

@aramase @nilekhc, asking again to please review the PR

@aramase
Copy link
Member

aramase commented Feb 23, 2024

@aramase @nilekhc, asking again to please review the PR

thanks for the ping! I'll look at this next week.

@wenzel-felix
Copy link
Author

@aramase @nilekhc, asking again to please review the PR

thanks for the ping! I'll look at this next week.

Hi @aramase, any update on it?

@wenzel-felix
Copy link
Author

@aramase @nilekhc Please review the PR

@wenzel-felix
Copy link
Author

@aramase @nilekhc, please review

Copy link

This PR is stale because it has been open 14 days with no activity. Please comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Apr 12, 2024
@wenzel-felix
Copy link
Author

@aramase

@github-actions github-actions bot removed the stale label Jul 26, 2024
@wenzel-felix
Copy link
Author

@aramase

Copy link

This PR is stale because it has been open 14 days with no activity. Please comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Sep 26, 2024
@wenzel-felix
Copy link
Author

Please review the PR

@github-actions github-actions bot removed the stale label Sep 28, 2024
@wenzel-felix
Copy link
Author

wenzel-felix commented Nov 14, 2024

It would also solve the main concern for: #1316 as well as #1512 (which are kind of duplicates tbf)

@wenzel-felix
Copy link
Author

@nilekhc, could you please review the PR

@johnknutsonhc
Copy link

This feature would be very beneficial for us.

@aramase @nilekhc could you please review this?

@lebedevdsl
Copy link

We're also waiting for this to be merged.
@aramase @nilekhc

Copy link

This PR is stale because it has been open 14 days with no activity. Please comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Apr 14, 2025
@aramase aramase removed the stale label Apr 14, 2025
@aramase
Copy link
Member

aramase commented Apr 14, 2025

Apologies for the delay! I'll look at the PR this week.

@wenzel-felix wenzel-felix requested a review from enj as a code owner April 14, 2025 13:47
Copy link
Member

@enj enj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only looked at the RBAC changes.

{{ include "sscdpa.labels" . | indent 2 }}
rules:
- apiGroups: [""]
resources: ["serviceaccounts"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another (minor) node isolation violation since this means all nodes will be able to get SAs. Maybe an okay starting point, but looks like a good candidate for scheduled node impersonation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @enj, Thanks for the feedback. Do you have any suggestions for working around this?
Looking at other implementations, they also rely on these permissions:
https://github.com/aws/secrets-store-csi-driver-provider-aws/blob/e3b7e823d72e7fc9b43c117b41761c54c7cc67fa/charts/secrets-store-csi-driver-provider-aws/templates/rbac.yaml#L27

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only one I have in mind would be to put it behind a Chart feature flag. Would it be sufficient to make this an optional feature?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can do anything special here to avoid the permissions - in the future when upstream kube supports this better, we can update the code / RBAC to leverage that functionality. There is no need to make this optional.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets open an issue to track fixing this in the future.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So for now, we pause the feature as we don't want to introduce the security risk and can't work around it?

@wenzel-felix wenzel-felix requested a review from enj April 14, 2025 14:27
@wenzel-felix
Copy link
Author

For everyone interested in this functionality to be more efficient, consider using external-secrets as this or similar PRs seem unlikely to be merged anytime soon.

Copy link

This PR is stale because it has been open 14 days with no activity. Please comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Jun 22, 2025
Copy link

This PR was closed because it has been stalled for 21 days with no activity. Feel free to re-open if it is ready for review.

@github-actions github-actions bot closed this Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants