Disable custom SSH keys for now

Not sure the feature is boring enough to keep. There are some tricky
things that still need to be solved like figuring out how to let
tunnels share the same public key, since the OpenSSH server seems to
only pick up the first instance of each key in the authorized_keys
file.

Also, what happens if someone wants to use their normal SSH key for
the server for a boringproxy tunnel. I could easily introduce a bug
that would lock someone out of their server in certain corner cases.

I think adding the ability to download the private key for each tunnel
will handle most cases for now.
This commit is contained in:
Anders Pitman 2020-10-24 13:27:41 -06:00
parent 8477391273
commit 2ca14901fc
2 changed files with 19 additions and 11 deletions

View File

@ -320,20 +320,20 @@ func (h *WebUiHandler) handleWebUiRequest(w http.ResponseWriter, r *http.Request
h.confirmDeleteToken(w, r)
case "/delete-token":
h.deleteToken(w, r)
case "/ssh-keys":
h.handleSshKeys(w, r, user, tokenData)
case "/delete-ssh-key":
//case "/ssh-keys":
// h.handleSshKeys(w, r, user, tokenData)
//case "/delete-ssh-key":
r.ParseForm()
// r.ParseForm()
err := h.api.DeleteSshKey(tokenData, r.Form)
if err != nil {
w.WriteHeader(400)
h.alertDialog(w, r, err.Error(), "/#/ssh-keys")
return
}
// err := h.api.DeleteSshKey(tokenData, r.Form)
// if err != nil {
// w.WriteHeader(400)
// h.alertDialog(w, r, err.Error(), "/#/ssh-keys")
// return
// }
http.Redirect(w, r, "/#/ssh-keys", 303)
// http.Redirect(w, r, "/#/ssh-keys", 303)
case "/confirm-logout":
tmpl, err := h.loadTemplate("confirm.tmpl")

View File

@ -13,7 +13,9 @@
<div class='menu'>
<a class='menu-item active-tab' href='/#/tunnels'>Tunnels</a>
<a class='menu-item' href='/#/tokens'>Tokens</a>
<!--
<a class='menu-item' href='/#/ssh-keys'>SSH Keys</a>
-->
{{if .IsAdmin}}
<a class='menu-item' href='/#/users'>Users</a>
{{end}}
@ -62,6 +64,7 @@
<input type="text" id="domain" name="domain" required>
</div>
<!--
<div class='input'>
<label for="ssh-key-id-select">SSH Key:</label>
<select id="ssh-key-id-select" name="ssh-key-id">
@ -71,6 +74,7 @@
{{end}}
</select>
</div>
-->
<div class='input'>
<label for="client-name">Client Name:</label>
@ -109,7 +113,9 @@
<div class='menu'>
<a class='menu-item' href='/#/tunnels'>Tunnels</a>
<a class='menu-item active-tab' href='/#/tokens'>Tokens</a>
<!--
<a class='menu-item' href='/#/ssh-keys'>SSH Keys</a>
-->
{{if .IsAdmin}}
<a class='menu-item' href='/#/users'>Users</a>
{{end}}
@ -144,6 +150,7 @@
</div>
</div>
<!--
<div class='page' id='/ssh-keys'>
<div class='menu'>
<a class='menu-item' href='/#/tunnels'>Tunnels</a>
@ -193,6 +200,7 @@
</div>
</div>
</div>
-->
{{if .IsAdmin}}
<div class='page' id='/users'>