Skip to content

Add SSH key pair management to Settings dashboard - #83

Open
paulotruta wants to merge 1 commit into
mainfrom
feature/ssh-key-management
Open

Add SSH key pair management to Settings dashboard#83
paulotruta wants to merge 1 commit into
mainfrom
feature/ssh-key-management

Conversation

@paulotruta

Copy link
Copy Markdown
Member

Summary

Adds a new SSH Key Access section to the Settings page so users can manage direct SSH access to their Edgebox instance from the dashboard.

What's included

  • TaskFactoryGENERATE_SSH_KEY, GET_SSH_KEY, REVOKE_SSH_KEY constants and factory methods.
  • SettingsController — new actions wired into ALLOWED_ACTIONS/ACTION_CONTROLLER_TITLES, SSH key options read in index(), and a downloadPrivateKey route that serves the private key as a downloadable id_ed25519 attachment.
  • HomeController — action descriptions and icons for the three SSH task types so they render properly in the Actions overview on the home page.
  • settings/index.html.twig — SSH section with:
    • Step 1: Download private key button
    • Step 2: macOS/Linux and Windows connection instructions (tabbed)
    • Advanced panel: public key, fingerprint, connection command, regenerate/revoke buttons
    • Proper alert styling when no key exists
  • settings/action.html.twig — status messages for generate_ssh_key, revoke_ssh_key, and get_ssh_key actions.

Why

Direct SSH access complements the existing web shell and browser dev environment by giving advanced users a persistent, scriptable terminal session. This PR is the dashboard half — the edgeboxctl half is edgebox-iot/edgeboxctl#44.

Test plan

  • Settings page renders the SSH section for both the "no key" and "active key" states.
  • Generate SSH Key button creates a task and redirects to the action page with a descriptive status.
  • Download Private Key triggers a file download of id_ed25519.
  • Regenerate and Revoke buttons show confirmation dialogs and dispatch the correct tasks.
  • macOS/Linux and Windows tabs switch instructions correctly.
  • Actions overview on the home page shows SSH tasks with proper descriptions and icons.
  • Twig and PHP syntax validation passes.

Add a new SSH Key Access section to the Settings page that lets users
generate, download, regenerate, and revoke an ED25519 key pair for
direct SSH access to the Edgebox instance.

- TaskFactory: GENERATE_SSH_KEY, GET_SSH_KEY, REVOKE_SSH_KEY constants
  and factory methods.
- SettingsController: new actions wired into ALLOWED_ACTIONS, SSH key
  options read in index(), and a downloadPrivateKey route that serves
  the private key as an attachment.
- HomeController: action descriptions and icons for the three SSH task
  types so they render correctly in the Actions overview.
- settings/index.html.twig: SSH section with download button, macOS/
  Linux and Windows connection instructions, and an Advanced panel with
  the public key, fingerprint, connection command, and regenerate/
  revoke controls.
- settings/action.html.twig: status messages for the SSH actions.
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