Revert "ipn,types/persist: store disallowed TKA's in prefs, lock local-disable"

This reverts commit f1130421f0.

It was submitted with failing tests (go generate checks)

Requires a lot of API changes to fix so rolling back instead of
forward.

Change-Id: I024e8885c0ed44675d3028a662f386dda811f2ad
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-11-29 11:15:42 -08:00
committed by Brad Fitzpatrick
parent f1130421f0
commit 390d1bb871
10 changed files with 4 additions and 220 deletions

View File

@@ -7,7 +7,6 @@ package persist
import (
"fmt"
"reflect"
"tailscale.com/tailcfg"
"tailscale.com/types/key"
@@ -40,12 +39,6 @@ type Persist struct {
UserProfile tailcfg.UserProfile
NetworkLockKey key.NLPrivate
NodeID tailcfg.StableNodeID
// DisallowedTKAStateIDs stores the tka.State.StateID values which
// this node will not operate network lock on. This is used to
// prevent bootstrapping TKA onto a key authority which was forcibly
// disabled.
DisallowedTKAStateIDs []string
}
// PublicNodeKey returns the public key for the node key.
@@ -77,8 +70,7 @@ func (p *Persist) Equals(p2 *Persist) bool {
p.LoginName == p2.LoginName &&
p.UserProfile == p2.UserProfile &&
p.NetworkLockKey.Equal(p2.NetworkLockKey) &&
p.NodeID == p2.NodeID &&
reflect.DeepEqual(p.DisallowedTKAStateIDs, p2.DisallowedTKAStateIDs)
p.NodeID == p2.NodeID
}
func (p *Persist) Pretty() string {