types/persist: add AttestationKey (#17281)
Extend Persist with AttestationKey to record a hardware-backed attestation key for the node's identity. Add a flag to tailscaled to allow users to control the use of hardware-backed keys to bind node identity to individual machines. Updates tailscale/corp#31269 Change-Id: Idcf40d730a448d85f07f1bebf387f086d4c58be3 Signed-off-by: Patrick O'Doherty <patrick@tailscale.com>
This commit is contained in:
committed by
GitHub
parent
a2dc517d7d
commit
e45557afc0
@@ -1,7 +1,7 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:generate go run tailscale.com/cmd/cloner -clonefunc=true -type SliceContainer
|
||||
//go:generate go run tailscale.com/cmd/cloner -clonefunc=true -type SliceContainer,InterfaceContainer
|
||||
|
||||
// Package clonerex is an example package for the cloner tool.
|
||||
package clonerex
|
||||
@@ -9,3 +9,26 @@ package clonerex
|
||||
type SliceContainer struct {
|
||||
Slice []*int
|
||||
}
|
||||
|
||||
// Cloneable is an interface with a Clone method.
|
||||
type Cloneable interface {
|
||||
Clone() Cloneable
|
||||
}
|
||||
|
||||
// CloneableImpl is a concrete type that implements Cloneable.
|
||||
type CloneableImpl struct {
|
||||
Value int
|
||||
}
|
||||
|
||||
func (c *CloneableImpl) Clone() Cloneable {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return &CloneableImpl{Value: c.Value}
|
||||
}
|
||||
|
||||
// InterfaceContainer has a pointer to an interface field, which tests
|
||||
// the special handling for interface types in the cloner.
|
||||
type InterfaceContainer struct {
|
||||
Interface Cloneable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user