[management,client] Report the remote-jobs opt-in to management

The dashboard needs to know which peers have opted out of remote jobs so
it can reflect that in the UI, the same way it surfaces the SSH server
flag. Report RemoteJobsAllowed as peer system-info: the client sets it on
the reported flags (like ServerSSHAllowed), the proto Flags message
carries it, and management decodes it onto the peer meta and exposes it
on the peers API as remote_jobs_allowed.

Kept out of the components/network-map path: unlike ServerSSHAllowed it
does not participate in firewall-rule calculation, so it only rides the
reporting flags, not ComponentPeer.
This commit is contained in:
mlsmaycon
2026-08-13 02:12:47 +09:00
committed by Maycon Santos
parent 7da4127c7d
commit 1d93c5ec3f
12 changed files with 993 additions and 953 deletions
+1
View File
@@ -357,6 +357,7 @@ func (a *Auth) setSystemInfoFlags(info *system.Info) {
a.config.EnableSSHLocalPortForwarding,
a.config.EnableSSHRemotePortForwarding,
a.config.DisableSSHAuth,
a.config.RemoteJobsAllowed,
)
}
+1
View File
@@ -711,6 +711,7 @@ func loginToManagement(ctx context.Context, client mgm.Client, pubSSHKey []byte,
config.EnableSSHLocalPortForwarding,
config.EnableSSHRemotePortForwarding,
config.DisableSSHAuth,
config.RemoteJobsAllowed,
)
return client.Login(sysInfo, pubSSHKey, config.DNSLabels)
}
+1
View File
@@ -1252,6 +1252,7 @@ func (e *Engine) applyInfoFlags(info *system.Info) {
e.config.EnableSSHLocalPortForwarding,
e.config.EnableSSHRemotePortForwarding,
e.config.DisableSSHAuth,
&e.config.RemoteJobsAllowed,
)
}
+5
View File
@@ -65,6 +65,7 @@ type Info struct {
RosenpassEnabled bool
RosenpassPermissive bool
ServerSSHAllowed bool
RemoteJobsAllowed bool
DisableClientRoutes bool
DisableServerRoutes bool
@@ -90,12 +91,16 @@ func (i *Info) SetFlags(
disableDNS, disableFirewall, blockLANAccess, blockInbound, disableIPv6 bool, syncMessageVersion *int,
enableSSHRoot, enableSSHSFTP, enableSSHLocalPortForwarding, enableSSHRemotePortForwarding *bool,
disableSSHAuth *bool,
remoteJobsAllowed *bool,
) {
i.RosenpassEnabled = rosenpassEnabled
i.RosenpassPermissive = rosenpassPermissive
if serverSSHAllowed != nil {
i.ServerSSHAllowed = *serverSSHAllowed
}
if remoteJobsAllowed != nil {
i.RemoteJobsAllowed = *remoteJobsAllowed
}
i.DisableClientRoutes = disableClientRoutes
i.DisableServerRoutes = disableServerRoutes