-
Notifications
You must be signed in to change notification settings - Fork 124
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
Solution Design: CyberArk Conjur Provider for Secret Store CSI Driver #2836
base: master
Are you sure you want to change the base?
Conversation
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_poc/main.go
Show resolved
Hide resolved
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_poc/README.md
Show resolved
Hide resolved
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Outdated
Show resolved
Hide resolved
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Outdated
Show resolved
Hide resolved
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Outdated
Show resolved
Hide resolved
094b17c
to
ef5f736
Compare
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Outdated
Show resolved
Hide resolved
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Outdated
Show resolved
Hide resolved
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Show resolved
Hide resolved
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Show resolved
Hide resolved
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Show resolved
Hide resolved
Code Climate has analyzed commit ef5f736 and detected 164 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 87.0% (-1.2% change). View more on Code Climate. |
|
||
#### Implementation Tasks | ||
|
||
1. **Implement the Conjur Provider**: Develop a Go-based application that uses the CyberArk Conjur API to authenticate and fetch secrets. This application should implement the `CSIDriverProviderServer` interface, which includes the `Mount` and `Version` methods. These methods will need to communicate with the CyberArk Conjur API to fetch secrets and return them to the Secrets Store CSI Driver. |
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.
I think we identified during our Friday meeting or something that there's a pre-req task we need here to add authn-jwt capability to conjur-api-go.
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.
authn-jwt is present in conjur-api-go, albeit requiring an environment variable for the token
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Outdated
Show resolved
Hide resolved
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Outdated
Show resolved
Hide resolved
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Outdated
Show resolved
Hide resolved
|
||
2. **Create the Helm Charts**: Develop the necessary Kubernetes resource definitions (Deployment, Service, etc.) and values files to manage the deployment of the Conjur provider. This Helm chart will allow users to easily deploy and configure the Conjur provider in their Kubernetes clusters. | ||
|
||
3. **Integration with CyberArk Conjur**: The logic for the provider to authenticate with the Conjur API and fetch secrets needs to be developed. This will involve using the `authn-jwt` authenticator for authentication with the workload service account token and making API calls to fetch secrets. |
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.
Given that some of what we need to do here has been done before in Secrets Provider and the AuthnK8s client, how should we plan on using/repurposing that content?
We've talked before about Secrets Provider's packages being difficult to consume out-of-context - should we have a dev task to consider/address that?
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.
It's a good question. I think this is something we can figure out at implementation time, if we want to solve the issue across different packages or just use this project as a blank slate and an opportunity to create something easier to consume
design/providers/kubernetes_secrets_storage_csi/conjur_csi_provider_solution_design.md
Show resolved
Hide resolved
- What's the best way to configure things like CA certs for the provider etc. ? Perhaps allowing the `SecretProviderClass` to reference other Kubernetes resources such `ConfigMap` or `Secret` is the answer | ||
- What are our options for supporting authentication via authenticators other than authn-jwt ? | ||
- What is the upgrade strategy for the CyberArk Conjur provider deployed via Helm? | ||
- How to handle secret rotation in CyberArk Conjur? |
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.
Looks like the CSI Driver has alpha support for secret rotation
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.
Thanks, updated this
applianceUrl: https://conjur.some-org.com | ||
account: some-org | ||
authnLogin: path/to/some-policy/some-host | ||
policyPath: path/to/some-policy/with-secrets # defaults to / |
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.
Any chance we could have gotten the secret IDs to fetch from the workload itself? To leverage our existing annotations that Secrets Provider supports.
authnUrl: https://conjur-auth.some-org.com | ||
applianceUrl: https://conjur.some-org.com | ||
account: some-org | ||
authnLogin: path/to/some-policy/some-host |
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.
I think we should align the parameter names to what we have in Secrets Provider to reduce confusion.
I see that there we call it authnIdentity
(reference)
A couple of question and things I feel like are missing from this design:
|
@doodlesbykumbi, After reviewing the video, I have a much better sense of the approach of this work. That being said, I'd really like to see us expand this document to capture a fuller picture of the project intention and effort. The reason it's important we capture this in writing and not video is that by creating a full picture in a single design document, we provide an easy to find and reference resource for future engineers and product owners. I feel this is really missing a crisp High Level Design overview. This should include:
As you've done the extensive PoC, it would also be valuable to at least summarize that work in a Low-Level Design section. A quick summary of key components of the gRPC service (even just a Compnent Diagram will help other engineers understand the code organization at a glance instead of extensive code review. To know if your PoC should be taken as a base and expanded or re-written base on your learnings, and the gaps you're aware of in functionality will be helpful for effort estimation as we bring this to fruition. The high-level design is far more important than the low-level design (high level is limited to interfaces and interactions, low level is the code organization which implements those interfaces). The low level design makes more sense to document after feature completion rather than attempting guess exactly how the code should be organized. One final comment. A solution design is really a story of a feature to be, in that spirit, can we figure out how to answer the questions in the context of the design instead of in a list at the end? Many of my questions were answered by those questions, but it made reviewing the solution design much more confusing. Finally, writing is way harder than it looks (at least for me), if it's easier to just hop an a call and chat this through, let's do it! This is a great start, and to re-iterate, after reviewing the presentation, it's very obvious you have an excellent grasp of the scope and intricacies around this feature. This doc is an excellent start, and I just want to see more of those details reflected here. |
@doodlesbykumbi - adding questions here for visibility..
|
03057bf
to
3c12483
Compare
Hey @jvanderhoof .This is great! I appreciate you taking time to give this thorough feedback. I've been exploring Plant UML over the past week and it's such a great way to convey certain kinds of information. I've made some updates to the solution design to address the points you raised |
@adamouamani Thanks for posting these here
|
3c12483
to
cb71b07
Compare
cb71b07
to
fca8fa4
Compare
Desired Outcome
Please describe the desired outcome for this PR. Said another way, what was
the original request that resulted in these code changes? Feel free to copy
this information from the connected issue.
Implemented Changes
Describe how the desired outcome above has been achieved with this PR. In
particular, consider:
Connected Issue/Story
Resolves #[relevant GitHub issue(s), e.g. 76]
CyberArk internal issue ID: [insert issue ID]
Definition of Done
At least 1 todo must be completed in the sections below for the PR to be
merged.
Changelog
CHANGELOG update
Test coverage
changes, or
Documentation
README
s) were updated in this PRBehavior
Security