Skip to content

ENT-14418: Added --ask-pass, --password-file and --switch-user-command options - #199

Open
nickanderson wants to merge 11 commits into
cfengine:masterfrom
nickanderson:ENT-14418
Open

ENT-14418: Added --ask-pass, --password-file and --switch-user-command options#199
nickanderson wants to merge 11 commits into
cfengine:masterfrom
nickanderson:ENT-14418

Conversation

@nickanderson

@nickanderson nickanderson commented Aug 14, 2026

Copy link
Copy Markdown
Member

cf-remote can now switch user on hosts where sudo asks for a password, prompting for it once with --ask-pass or reading it from a file with --password-file, so passwordless sudo is no longer a requirement. --switch-user-command replaces the hardcoded sudo bash -c.

@nickanderson
nickanderson requested review from SimonThalvorsen, larsewi and victormlg and removed request for victormlg August 14, 2026 16:24

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Comment thread cf_remote/aramid.py Outdated
Comment thread cf_remote/ssh.py Outdated
Comment thread tests/shell/002_sudo_password.sh Outdated
@nickanderson
nickanderson requested a review from larsewi August 18, 2026 17:35

@victormlg victormlg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comments

Comment thread cf_remote/ssh.py
Comment thread cf_remote/ssh.py
Comment thread cf_remote/main.py Outdated
nickanderson and others added 9 commits September 2, 2026 15:17
Ticket: ENT-14418
Changelog: title
Signed-off-by: Nick Anderson <nick@cmdln.org>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Ticket: ENT-14418
Changelog: title
Signed-off-by: Nick Anderson <nick@cmdln.org>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Ticket: ENT-14418
Changelog: none
Signed-off-by: Nick Anderson <nick@cmdln.org>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Ticket: ENT-14418
Changelog: none
Signed-off-by: Nick Anderson <nick@cmdln.org>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…bals

Ticket: ENT-14418
Changelog: none
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Nick Anderson <nick@cmdln.org>
Ticket: ENT-14418
Changelog: none
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Nick Anderson <nick@cmdln.org>
Ticket: ENT-14418
Changelog: none
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Nick Anderson <nick@cmdln.org>
Ticket: ENT-14418
Changelog: none
Signed-off-by: Nick Anderson <nick@cmdln.org>
Ticket: ENT-14418
Changelog: none
Signed-off-by: Nick Anderson <nick@cmdln.org>
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.52482% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.29%. Comparing base (40dc552) to head (0e718b2).

Files with missing lines Patch % Lines
cf_remote/commands.py 61.11% 7 Missing ⚠️
cf_remote/main.py 68.75% 5 Missing ⚠️
cf_remote/ssh.py 95.18% 4 Missing ⚠️
cf_remote/aramid.py 83.33% 2 Missing ⚠️
cf_remote/remote.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
+ Coverage   44.27%   47.29%   +3.01%     
==========================================
  Files          18       18              
  Lines        3065     3157      +92     
==========================================
+ Hits         1357     1493     +136     
+ Misses       1708     1664      -44     
Files with missing lines Coverage Δ
cf_remote/args.py 100.00% <100.00%> (ø)
cf_remote/remote.py 30.90% <83.33%> (+0.44%) ⬆️
cf_remote/aramid.py 66.20% <83.33%> (+2.08%) ⬆️
cf_remote/ssh.py 82.50% <95.18%> (+8.09%) ⬆️
cf_remote/main.py 46.53% <68.75%> (+7.38%) ⬆️
cf_remote/commands.py 18.99% <61.11%> (+3.64%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Ticket: ENT-14418
Changelog: none
Signed-off-by: Nick Anderson <nick@cmdln.org>
Comment thread cf_remote/args.py
Comment thread cf_remote/aramid.py Outdated
Comment thread cf_remote/aramid.py Outdated
Comment thread cf_remote/args.py
Ticket: ENT-14418
Changelog: none
Signed-off-by: Nick Anderson <nick@cmdln.org>

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants