ipn/localapi: make serveTKASign require write permission (#10094)

The existing read permission check looks like an oversight. Write seems
more appropriate for sining new nodes.

Updates https://github.com/tailscale/corp/issues/15506

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
pull/10109/head
Andrew Lytvynov 7 months ago committed by GitHub
parent 191e2ce719
commit f0bc95a066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1685,8 +1685,8 @@ func (h *Handler) serveTKAStatus(w http.ResponseWriter, r *http.Request) {
}
func (h *Handler) serveTKASign(w http.ResponseWriter, r *http.Request) {
if !h.PermitRead {
http.Error(w, "lock status access denied", http.StatusForbidden)
if !h.PermitWrite {
http.Error(w, "lock sign access denied", http.StatusForbidden)
return
}
if r.Method != httpm.POST {

Loading…
Cancel
Save