Skip to content

EDM-3284: "root" stays the default user for applications#469

Merged
celdrake merged 1 commit intoflightctl:mainfrom
celdrake:default-run-as
Feb 4, 2026
Merged

EDM-3284: "root" stays the default user for applications#469
celdrake merged 1 commit intoflightctl:mainfrom
celdrake:default-run-as

Conversation

@celdrake
Copy link
Collaborator

@celdrake celdrake commented Feb 3, 2026

After some discussions, the Backend won't make flightctl the default user for the runAs field.

So we must treat unset "runAs" values as "root", though we want to promote the user choosing "flightctl" by default when creating new applicatoins, and having the UI explicitly setting the value even when it's the default (root).

Summary by CodeRabbit

  • Updates
    • Clarified messaging: changed wording to present a recommended user identity rather than a "default" label.
    • Unified user-identity behavior across the app: run-as handling now consistently favors an explicit root recommendation where appropriate.
    • UI text and help copy updated to better guide configuration of application user identities and integrity settings.

@celdrake celdrake marked this pull request as draft February 3, 2026 11:46
@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

Walkthrough

Replace the single RUN_AS_DEFAULT_USER constant with two explicit constants (RUN_AS_ROOT_USER and RUN_AS_FLIGHTCTL_USER), update code paths and UI components to use the new constants, and rename one localization key from "By default, workloads run as..." to "The recommended user identity is...".

Changes

Cohort / File(s) Summary
Type definition
libs/ui-components/src/types/deviceSpec.ts
Removed RUN_AS_DEFAULT_USER; added RUN_AS_ROOT_USER = 'root' and RUN_AS_FLIGHTCTL_USER = 'flightctl' (with comment about root being the system default).
Device spec utilities
libs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts
Replaced usages of RUN_AS_DEFAULT_USER with RUN_AS_ROOT_USER/RUN_AS_FLIGHTCTL_USER; added hasRunAsChanged and getRunAsUser helpers; updated form ↔ API conversion paths to apply new defaulting rules.
Edit device UI
libs/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationIntegritySettings.tsx
Import switched to RUN_AS_FLIGHTCTL_USER and RUN_AS_ROOT_USER; system-integrity toggle, placeholder, and helper text now reference the new constants and "recommended" wording.
Applications table UI
libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx
Changed default fallback for the "Run as user" column from RUN_AS_DEFAULT_USER to RUN_AS_ROOT_USER.
Localization
libs/i18n/locales/en/translation.json
Renamed translation key from "By default, workloads run as the '{{ runAsUser }}' user..." to "The recommended user identity is '{{ runAsUser }}'..." (message text unchanged).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: ensuring 'root' remains the default user for applications, which is the core objective of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@celdrake celdrake marked this pull request as ready for review February 4, 2026 08:13
@celdrake celdrake changed the title "root" stays the default user for applications EDM-3284: "root" stays the default user for applications Feb 4, 2026
@celdrake celdrake merged commit 76036a6 into flightctl:main Feb 4, 2026
6 checks passed
@celdrake celdrake deleted the default-run-as branch February 4, 2026 09:09
celdrake added a commit to celdrake/flightctl-ui that referenced this pull request Feb 4, 2026
celdrake added a commit that referenced this pull request Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants