-
Notifications
You must be signed in to change notification settings - Fork 311
ADR about security-responder #9006
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
Open
manuelbuil
wants to merge
2
commits into
rancher:master
Choose a base branch
from
manuelbuil:adr-metrics-responder
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+100
−0
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| # security-responder client | ||
|
|
||
| Date: 2025-10-27 | ||
|
|
||
| ## Status | ||
|
|
||
| Proposed | ||
|
|
||
| ## Context | ||
|
|
||
| ### Background | ||
|
|
||
| RKE2 currently lacks two critical capabilities essential for its maintainability and user security. Firstly, there is no structured mechanism for users to voluntarily share cluster metadata (such as Kubernetes version or CNI plugins). This data is vital for maintainers to understand real-world adoption, correctly prioritize future development or testing efforts. | ||
|
|
||
| Secondly, users lack a rapid, in-cluster method to learn about security threats. This includes an immediate list of CVEs impacting their current components and a recommended, secure version they can upgrade to. | ||
|
|
||
|
|
||
| ### Current State | ||
|
|
||
| - No telemetry collection exists in rke2. The team lack insights into deployment patterns, version adoption or selected configurations | ||
| - Difficult for users to learn about existing CVEs impacting their current RKE2 version | ||
|
|
||
| ### Requirements | ||
|
|
||
| - Collect only non-personally identifiable cluster metadata | ||
| - Opt-out mechanism with clear documentation | ||
| - Minimal resource overhead | ||
| - Fails gracefully in disconnected environments | ||
| - There is no need for retry mechanisms or a persistent daemon; the data is non-critical and loss of a few data points harmless. Resource savings on the nodes are more important. | ||
| - Work well in rke2 | ||
| - Provides useful information to users | ||
|
|
||
| ## Decision | ||
|
|
||
| Implement a `security-responder` client at `github.com/rancher/rke2-security-responder` (similar to existing components) as a separate, optional component deployed via the rke2 manifest system that is triggered periodically. | ||
|
|
||
| ### Architecture | ||
|
|
||
| - **Deployment Method**: `CronJob` in `kube-system` namespace | ||
| - **Location**: `/var/lib/rancher/rke2/server/manifests/security-responder.yaml` | ||
| - **Scheduling**: CronJob running thrice daily (`0 */8 * * *`) | ||
| - **Configuration**: ConfigMap-based with environment variable override | ||
| - **Default State**: Enabled by default (opt-out well documented) | ||
|
|
||
| ### Data Collection | ||
|
|
||
| The collected data will include the following information: | ||
| - Kubernetes version | ||
| - clusteruuid | ||
| - serverNodeCount | ||
| - agentNodeCount | ||
| - cni-plugin | ||
| - ingress-controller | ||
| - os | ||
| - selinux | ||
|
|
||
| Example payload structure: | ||
| ```json | ||
| { | ||
| "appVersion": "v1.31.6+rke2r1", | ||
| "extraTagInfo": { | ||
| "kubernetesVersion": "v1.31.6", | ||
| "clusteruuid": "53741f60-f208-48fc-ae81-8a969510a598" | ||
| }, | ||
| "extraFieldInfo": { | ||
| "serverNodeCount": 3, | ||
| "agentNodeCount": 2, | ||
| "cni-plugin": "flannel", | ||
dereknola marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "ingress-controller": "rke2-ingress-nginx", | ||
| "os": "ubuntu", | ||
| "selinux": "enabled" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| The `clusteruuid` is needed to differentiate between different deployments (the UUID of `kube-system`). It is completely random and does not expose privacy considerations. We could even consider hashing it to increase the obfuscation. | ||
|
|
||
| ### Configuration Interface Example | ||
|
|
||
| The security-responder is packaged using a helm chart. We can interact with it as we do with other helm charts. For example, to disable it: | ||
|
|
||
| ```yaml | ||
| # /etc/rancher/rke2/config.yaml | ||
| disable: | ||
| - rke2-security-responder | ||
| ``` | ||
|
|
||
| ## Alternatives Considered | ||
|
|
||
| ### Agent-based Implementation | ||
|
|
||
| Would require agents on all nodes. Periodic CronJob is more efficient for cluster-level metadata collection. | ||
|
|
||
| ### Instrumenting/leveraging update.rke2.io | ||
|
|
||
| No easy access to CDN logs, no insights into deployed versions, not as privacy-preserving. | ||
|
|
||
| ## Consequences | ||
|
|
||
| Basic telemetry coverage and analytics to improve project decisions and project visibility. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.