-
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
Add solution design for Authn-K8s namespace label constraint #2603
Conversation
aa3deda
to
e7cb9fb
Compare
|
||
| **Subject** | **Description** | **Issue Mitigation** | | ||
|-------------|-----------------|----------------------| | ||
| **Many Similarly-Labeled Namespaces** | Using Kubernetes' native label selector implementation would mean receiving a list of all similarly-labeled namespaces, and limiting those results further based on a request's origin namespace. For a cluster with many similarly-labeled namespaces, this operation could be costly. | Instead of querying the Kubernetes API for a list of all similarly-labeled namespaces, we can get only the request's origin namespace, and then validate its labels against the configured selector locally. This means Conjur is only ever querying for a single resource instead of a open-ended multitude. | |
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.
Worth mentioning that from a performance standpoint, it's still one more call than all our other types of authentications? (service account, controller, namespace and so on)
Because in others, we query the Pod and we get all the relevant information we need from that object. Here we will need to perform one more call, on the Namespace object of the Pod to get its labels.
|
||
| **Security Issue** | **Description** | **Resolution** | | ||
|--------------------|-----------------|----------------| | ||
| **Added Permissions** | The Authenticator identity needs a new permission to get any namespace in a cluster. | This is necessary, and an improvement over requiring permission to list all namespaces in a cluster. List permission means the identity can discover unknown resources, but get permission requires knowledge of existing resources. | |
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.
The permission is required only in the namespaces in which Conjur needs to provide service.
Since we currently already provide permissions on a per namespace level (as a guideline we don't recommend cluster wide permission to Conjur), then this new permission will be on these namespaces only as well.
e7cb9fb
to
344c792
Compare
design/authenticators/authn_k8s/namespace_label_authenticator.md
Outdated
Show resolved
Hide resolved
design/authenticators/authn_k8s/namespace_label_authenticator.md
Outdated
Show resolved
Hide resolved
design/authenticators/authn_k8s/namespace_label_authenticator.md
Outdated
Show resolved
Hide resolved
design/authenticators/authn_k8s/namespace_label_authenticator.md
Outdated
Show resolved
Hide resolved
design/authenticators/authn_k8s/namespace_label_authenticator.md
Outdated
Show resolved
Hide resolved
344c792
to
b0f8978
Compare
a good way to justify this scope of identity privilege, but it also means | ||
that workloads across namespace groups either: | ||
|
||
- must use the same type of authentication sidecar (`authenticator`, |
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.
Inconsistent indentation for list items at the same level
|
||
- must use the same type of authentication sidecar (`authenticator`, | ||
`secrets-provider-for-k8s`) | ||
- must use a standard, and possibly misrepresentative, container name for all |
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.
Inconsistent indentation for list items at the same level
a good way to justify this scope of identity privilege, but it also means | ||
that workloads across namespace groups either: | ||
|
||
- must use the same type of authentication sidecar (`authenticator`, |
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.
Unordered list indentation
- !host | ||
id: test-app | ||
annotations: | ||
authn-k8s/namespace-label: "key1=value1" |
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.
Trailing spaces
|
||
## Definition of Done | ||
|
||
- Solution designed is approved |
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.
Trailing spaces
Code Climate has analyzed commit b0f8978 and detected 80 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 90.0% (-1.5% change). View more on Code Climate. |
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.
LGTM!
Desired Outcome
Add solution design for Authn-K8s namespace label constraint
Implemented Changes
N/A
Connected Issue/Story
CyberArk internal issue link: ONYX-21265
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