Give the DS command for a parent zone in Jarl, and allow port 443

The DNSSEC tab and 'jarl zone dnssec status' give the jarl record add
command (and an Add to parent button) when the parent zone is in Jarl.
jarl.service grants CAP_NET_BIND_SERVICE so the web UI can listen on 443.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adamandClaude Opus 5.5 committed 2026-10-09 22:42:16 +00:00
1 parent 295c549479
commit 113a6913a2
10 files changed
+161 -12

No files matched your search

+15
View File
@@ -12,8 +12,10 @@ import (
"net/http"
"net/netip"
"os"
"strconv"
"strings"
"sync"
"syscall"
"time"
"jarl/internal/api"
@@ -116,6 +118,16 @@ func New(cfg Config, eng *engine.Engine, log *slog.Logger, web fs.FS) *Server {
}
// Handler returns the server's HTTP handler with all middleware.
// lowPort reports whether addr ("host:port") has a port below 1024.
func lowPort(addr string) bool {
_, port, err := net.SplitHostPort(addr)
if err != nil {
return false
}
n, err := strconv.Atoi(port)
return err == nil && n > 0 && n < 1024
}
func (s *Server) Handler() http.Handler {
return s.recoverer(s.securityHeaders(s.logRequests(s.mux)))
}
@@ -142,6 +154,9 @@ func (s *Server) Serve(ctx context.Context, ready func()) error {
for _, l := range listeners {
l.Close()
}
if errors.Is(err, syscall.EACCES) && lowPort(addr) {
return fmt.Errorf("listening on %s: %w (ports below 1024 need the CAP_NET_BIND_SERVICE capability; Jarl's jarl.service grants it, so check that the installed unit is current and no drop-in removes it: systemctl cat jarl)", addr, err)
}
return fmt.Errorf("listening on %s: %w", addr, err)
}
listeners = append(listeners, ln)