fix: make certbot email address updates user experience match the new…#83
fix: make certbot email address updates user experience match the new…#83jchiarulli merged 1 commit intomasterfrom
Conversation
… way certbot handles updating account email addresses, set permissions for ssh authorized keys file when the file does not exist, and fix khatru pyramid owner and group setting for the users directory when backing up as root user
📝 WalkthroughWalkthroughThe PR refactors Certbot email account handling to prompt users for explicit removal or updates, enforces SSH file permissions to 0600 across all paths, adjusts file ownership path targets, expands command documentation, and performs minor formatting cleanup. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
💤 Files with no reviewable changes (1)
🧰 Additional context used🧬 Code graph analysis (2)pkg/relays/khatru_pyramid/handle_exisiting_users_file.go (2)
pkg/network/remote_access.go (2)
🔇 Additional comments (6)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/network/certbot.go (1)
190-229: The prompt mentions "remove" but only implements "update" functionality.Line 192 asks "Do you want to remove or update your Certbot email?", but the implementation (lines 213, 221) only handles the update case by passing
--email <email>to certbot. Additionally, line 207 suggests "Leave email empty if you don't want to receive notifications," which would causecertbot update_account --email "" --no-eff-emailto fail since theTo properly implement removal, use
certbot update_account --register-unsafely-without-emailwhen the user wants to remove their email. Otherwise, clarify the prompt to only mention "update" and handle the empty email case explicitly (either reject it or implement removal).
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
cmd/install.gopkg/network/certbot.gopkg/network/firewall.gopkg/network/remote_access.gopkg/relays/khatru_pyramid/handle_exisiting_users_file.gopkg/verification/verify.go
💤 Files with no reviewable changes (1)
- pkg/verification/verify.go
🧰 Additional context used
🧬 Code graph analysis (2)
pkg/relays/khatru_pyramid/handle_exisiting_users_file.go (2)
pkg/utils/directories/utils.go (1)
SetOwnerAndGroupForAllContentUsingLinux(174-192)pkg/relays/khatru_pyramid/constants.go (1)
UsersFileUsersDirPath(12-12)
pkg/network/remote_access.go (2)
pkg/utils/files/utils.go (1)
SetPermissions(123-130)pkg/network/constants.go (1)
RootHiddenSSHAuthorizedKeysFilePath(9-9)
🔇 Additional comments (6)
pkg/network/firewall.go (1)
17-17: LGTM!The added blank lines improve visual separation between logical blocks.
Also applies to: 27-27, 63-63
pkg/relays/khatru_pyramid/handle_exisiting_users_file.go (1)
22-22: LGTM!This correctly aligns the root-user path with the non-root branch (line 27), ensuring
chown -Rtargets the users directory (UsersFileUsersDirPath) rather than a single file. This is consistent with the recursive ownership operation.cmd/install.go (1)
28-28: LGTM!The expanded description accurately reflects the install command's functionality.
pkg/network/remote_access.go (2)
113-116: LGTM!Explicitly setting 0600 permissions after file creation ensures the authorized_keys file is properly secured, regardless of the system's umask. This aligns with SSH best practices.
126-129: LGTM!Consistent with the root-user branch, this ensures proper 0600 permissions for the non-root authorized_keys file on creation.
pkg/network/certbot.go (1)
187-188: LGTM!The spinner message clearly indicates to the user that an existing Certbot account was found, improving the user experience.
… way certbot handles updating account email addresses, set permissions for ssh authorized keys file when the file does not exist, and fix khatru pyramid owner and group setting for the users directory when backing up as root user
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.