use prior and current worker auth keys (#2495)

* use prior and current worker auth keys
This commit is contained in:
Irena Rindos authored and irenarindos committed 2022-09-26 11:23:08 -04:00
1 parent 902ca3cccb
commit 4493dfd527
12 files changed
+392 -71

No files matched your search

+12
View File
@@ -8,6 +8,11 @@ import (
"google.golang.org/protobuf/proto"
)
const (
previousWorkerAuthState = "previous"
currentWorkerAuthState = "current"
)
// WorkerAuth contains all fields related to an authorized Worker resource
// This includes worker public keys, the controller encryption key,
// and certificate bundles issued by the Boundary CA
@@ -16,6 +21,13 @@ type WorkerAuth struct {
tableName string `gorm:"-"`
}
// WorkerAuthSet is intended to store a set of WorkerAuth records
// This set represents the current and previous WorkerAuth records for a worker
type WorkerAuthSet struct {
Previous *WorkerAuth
Current *WorkerAuth
}
// WorkerKeys contain the signing and encryption keys for a WorkerAuth resource
type WorkerKeys struct {
workerSigningPubKey []byte