Skip to content

Commit 3ea434b

Browse files
fixes service name, adds controllers field to enrollment JWTs
1 parent 7b22cda commit 3ea434b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ziti/edge/network/conn.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package network
1919
import (
2020
"fmt"
2121
"github.com/openziti/edge-api/rest_model"
22+
"github.com/openziti/foundation/v2/stringz"
2223
"io"
2324
"net"
2425
"sync"
@@ -468,7 +469,8 @@ func (conn *edgeConn) close(closedByRemote bool) {
468469
conn.hosting.Range(func(key, value interface{}) bool {
469470
listener := value.(*edgeListener)
470471
if err := listener.Close(); err != nil {
471-
log.WithError(err).WithField("serviceName", listener.service.Name).Error("failed to close listener")
472+
serviceName := stringz.OrEmpty(listener.service.Name)
473+
log.WithError(err).WithField("serviceName", serviceName).Error("failed to close listener")
472474
}
473475
return true
474476
})

ziti/token.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ type Versions struct {
3333
type EnrollmentClaims struct {
3434
jwt.RegisteredClaims
3535
EnrollmentMethod string `json:"em"`
36+
Controllers []string `json:"ctrls"`
3637
SignatureCert *x509.Certificate `json:"-"`
3738
}
3839

0 commit comments

Comments
 (0)