metropolis: reduce usage of identity.NodeID

Eventually, we want to be able to rotate node keypairs. To allow this,
the node ID needs to become independent of the public key. This change
is a refactoring which starts this work by reducing the usage of
identity.NodeID, the function which derives a node ID from a public key.

Change-Id: I5231ed0a7be37c23327fec93481b00c74374af07
Reviewed-on: https://review.monogon.dev/c/monogon/+/3445
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/metropolis/node/core/rpc/peerinfo.go b/metropolis/node/core/rpc/peerinfo.go
index 6a8443b..55f949c 100644
--- a/metropolis/node/core/rpc/peerinfo.go
+++ b/metropolis/node/core/rpc/peerinfo.go
@@ -11,7 +11,6 @@
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
 
-	"source.monogon.dev/metropolis/node/core/identity"
 	epb "source.monogon.dev/metropolis/proto/ext"
 )
 
@@ -51,8 +50,8 @@
 // PeerInfoNode contains information about a Node on the other side of a gRPC
 // connection.
 type PeerInfoNode struct {
-	// PublicKey is the ED25519 public key bytes of the node.
-	PublicKey []byte
+	// ID is the node identifier.
+	ID string
 
 	// Permissions are the set of permissions this node has.
 	Permissions Permissions
@@ -121,7 +120,7 @@
 	}
 	switch {
 	case p.Node != nil:
-		return fmt.Sprintf("node: %s, %s", identity.NodeID(p.Node.PublicKey), p.Node.Permissions)
+		return fmt.Sprintf("node: %s, %s", p.Node.ID, p.Node.Permissions)
 	case p.User != nil:
 		return fmt.Sprintf("user: %s", p.User.Identity)
 	case p.Unauthenticated != nil: