From 409839e6ac60ce577beb4a115f8e7b8dada9bc7c Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Fri, 13 Jun 2025 17:28:26 -0400 Subject: [PATCH 1/3] Add CtrlId and GetDestinationType for inspect support. Fixes #742 --- CHANGELOG.md | 1 + xgress/circuit_inspections.go | 1 + xgress/xgress.go | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 105547bb..db0f174a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Issues Fixed and Dependency Updates * github.com/openziti/sdk-golang: [v1.1.1 -> v1.1.2](https://github.com/openziti/sdk-golang/compare/v1.1.1...v1.1.2) + * [Issue #742](https://github.com/openziti/sdk-golang/issues/742) - Additional CtrlId and GetDestinationType for inspect support * [Issue #739](https://github.com/openziti/sdk-golang/issues/739) - go-jose v2.6.3 CVE-2025-27144 resolution * github.com/zitadel/oidc/v3: v2.12.2 -> v3.39.0 diff --git a/xgress/circuit_inspections.go b/xgress/circuit_inspections.go index 530e68ca..c01a9e45 100644 --- a/xgress/circuit_inspections.go +++ b/xgress/circuit_inspections.go @@ -102,4 +102,5 @@ type CircuitDetail struct { Address string `json:"address"` Originator string `json:"originator"` IsXgress bool `json:"isXgress"` + CtrlId string `json:"ctrlId"` } diff --git a/xgress/xgress.go b/xgress/xgress.go index cf3c1df1..b68f0903 100644 --- a/xgress/xgress.go +++ b/xgress/xgress.go @@ -138,6 +138,10 @@ type Xgress struct { tags map[string]string } +func (self *Xgress) GetDestinationType() string { + return "xgress" +} + func (self *Xgress) GetIntervalId() string { return self.circuitId } From 918e655caeae7f4407c96e93afb113c6a93c6ee5 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Mon, 16 Jun 2025 11:49:16 -0400 Subject: [PATCH 2/3] Add GetRouterId to edge connection --- ziti/edge/conn.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ziti/edge/conn.go b/ziti/edge/conn.go index 8d96a958..2b2ea137 100644 --- a/ziti/edge/conn.go +++ b/ziti/edge/conn.go @@ -102,6 +102,7 @@ type ServiceConn interface { type Conn interface { ServiceConn Identifiable + GetRouterId() string CompleteAcceptSuccess() error CompleteAcceptFailed(err error) } @@ -139,6 +140,10 @@ func NewEdgeMsgChannel(ch SdkChannel, connId uint32) *MsgChannel { } } +func (ec *MsgChannel) GetRouterId() string { + return ec.GetChannel().Id() +} + func (ec *MsgChannel) Id() uint32 { return ec.id } From 0988604988902a175d840942b9f6594447a84565 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Mon, 16 Jun 2025 12:30:24 -0400 Subject: [PATCH 3/3] Set ctrlId on inspect --- ziti/edge/network/conn.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ziti/edge/network/conn.go b/ziti/edge/network/conn.go index 2a0ebc8f..4819be92 100644 --- a/ziti/edge/network/conn.go +++ b/ziti/edge/network/conn.go @@ -324,6 +324,7 @@ func (conn *edgeConn) GetCircuitDetail() *xgress.CircuitDetail { detail.IsXgress = true detail.Originator = conn.xgCircuit.xg.Originator().String() detail.Address = string(conn.xgCircuit.xg.Address()) + detail.CtrlId = conn.xgCircuit.xg.CtrlId() } return detail