Skip to content

fix(security): warn on root tenant workloads - #230

Merged
GatewayJ merged 2 commits into
rustfs:mainfrom
GatewayJ:agent/fix-1093-reject-root-workloads
Aug 22, 2026
Merged

fix(security): warn on root tenant workloads#230
GatewayJ merged 2 commits into
rustfs:mainfrom
GatewayJ:agent/fix-1093-reject-root-workloads

Conversation

@GatewayJ

@GatewayJ GatewayJ commented Aug 18, 2026

Copy link
Copy Markdown
Member

Type of Change

  • New Feature
  • Bug Fix
  • Documentation
  • Performance Improvement
  • Test/CI
  • Refactor
  • Other:

Related Issues

Closes rustfs/backlog#1093

Summary of Changes

  • Preserve backward compatibility for workloads with an effective runAsUser: 0 and runAsNonRoot: false.
  • Emit a structured Operator warning containing the Tenant and Pool whenever a workload resolves to UID 0, with guidance to migrate to a non-zero UID.
  • Keep the existing rejection for the contradictory runAsUser: 0 and runAsNonRoot: true combination.
  • Add Console compatibility coverage and document the warning and migration recommendation in the English and Chinese user guides.

The secure defaults already render non-root workloads, but explicit overrides can opt into UID 0. Hard rejection would invalidate previously accepted Tenant resources, so this revision uses the warning option described in the issue and leaves the CRD/API compatibility unchanged.

Checklist

  • I have read and followed the CONTRIBUTING.md guidelines
  • Passed make pre-commit (fmt-check + clippy + test + console-lint + console-fmt-check)
  • Added/updated necessary tests
  • Documentation updated
  • CHANGELOG.md updated under [Unreleased] (N/A: no changelog file exists in the repository)
  • CI/CD passed (pending upstream CI)

Impact

  • Breaking change (CRD/API compatibility)
  • Requires doc/config/deployment update
  • Other impact: existing root workloads continue to reconcile and now produce a warning recommending migration.

Verification

make pre-commit

Additional Notes

Default-generated workloads remain non-root. The CRD continues to accept Kubernetes UID 0 for backward compatibility, and runAsGroup/fsGroup behavior is unchanged.


Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md) and sign the CLA if this is your first contribution.

@GatewayJ GatewayJ changed the title fix(security): reject root tenant workloads fix(security): warn on root tenant workloads Aug 18, 2026
@GatewayJ
GatewayJ marked this pull request as ready for review August 22, 2026 10:26
@GatewayJ

Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: fac8c06e3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@GatewayJ
GatewayJ added this pull request to the merge queue Aug 22, 2026
Merged via the queue into rustfs:main with commit 3d7aae7 Aug 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant