fix(relay): authenticate endpoints and fail closed on missing routes (#569)

* fix(relay): authenticate endpoints and fail closed on missing routes

* fix(tunnel): retain chains until receiver replacement is acknowledged

* docs: record final relay security review and validation
This commit is contained in:
sagit
2026-11-08 23:46:18 +08:00
committed by GitHub
parent 46bfb86c1b
commit fadc2b6c12
51 changed files with 5562 additions and 277 deletions
@@ -0,0 +1,15 @@
package model
// RelayEndpointAuth is private desired state, never an API or backup DTO.
// Retained endpoint identities keep their credentials across topology edits.
type RelayEndpointAuth struct {
ID int64 `gorm:"primaryKey;autoIncrement" json:"-"`
TunnelID int64 `gorm:"not null;uniqueIndex:idx_relay_endpoint" json:"-"`
NodeID int64 `gorm:"not null;uniqueIndex:idx_relay_endpoint" json:"-"`
ChainType int `gorm:"not null;uniqueIndex:idx_relay_endpoint" json:"-"`
Version int `gorm:"not null" json:"-"`
Username string `gorm:"type:text;not null" json:"-"`
Password string `gorm:"type:text;not null" json:"-"`
}
func (RelayEndpointAuth) TableName() string { return "relay_endpoint_auth" }