Skip to content

Commit ea8e15f

Browse files
committed
Deprecated the EnableHA config flag. Fixes #779
1 parent 61a7714 commit ea8e15f

File tree

11 files changed

+48
-32
lines changed

11 files changed

+48
-32
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# Release notes 1.2.3
2+
3+
## Issues Fixed and Dependency Updates
4+
5+
* github.com/openziti/sdk-golang: [v1.2.2 -> v1.2.3](https://github.com/openziti/sdk-golang/compare/v1.2.2...v1.2.3)
6+
* [Issue #779](https://github.com/openziti/sdk-golang/issues/779) - Remove need to EnableHA flag in Go SDK
7+
8+
* github.com/openziti/channel/v4: [v4.2.19 -> v4.2.21](https://github.com/openziti/channel/compare/v4.2.19...v4.2.21)
9+
110
# Release notes 1.2.2
211

312
## Issues Fixed and Dependency Updates

example/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ require (
8181
github.com/muhlemmer/gu v0.3.1 // indirect
8282
github.com/oklog/ulid v1.3.1 // indirect
8383
github.com/opentracing/opentracing-go v1.2.0 // indirect
84-
github.com/openziti/channel/v4 v4.2.19 // indirect
84+
github.com/openziti/channel/v4 v4.2.21 // indirect
8585
github.com/openziti/edge-api v0.26.47 // indirect
8686
github.com/openziti/identity v1.0.109 // indirect
8787
github.com/openziti/metrics v1.4.2 // indirect

example/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak=
365365
github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY=
366366
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
367367
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
368-
github.com/openziti/channel/v4 v4.2.19 h1:dsiL2wPrR0a034KTyuc15ud49ZFLjplRKfqfa9a37Sk=
369-
github.com/openziti/channel/v4 v4.2.19/go.mod h1:v8AOCXLqE++BHGmDK7Ut8Uc2nCGyOu9hjkJNoWgpcyU=
368+
github.com/openziti/channel/v4 v4.2.21 h1:MkTCCCC8efBvQxKBkds827SEMzBlORnD4VzkONUnde4=
369+
github.com/openziti/channel/v4 v4.2.21/go.mod h1:EjTaldx8LMejfIlyr0eQQYurUujgGJYXKV1bFKKXW+0=
370370
github.com/openziti/edge-api v0.26.47 h1:5QZeqhD4HFtox7FS5z816M1+MpJED1DdS6oOH128nI8=
371371
github.com/openziti/edge-api v0.26.47/go.mod h1:sYHVpm26Jr1u7VooNJzTb2b2nGSlmCHMnbGC8XfWSng=
372372
github.com/openziti/foundation/v2 v2.0.70 h1:1g4jIl7nIdqW8oCgRcwlbNvK8dwk4mPyrwjjtjH1tp8=

example/influxdb-client-go/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ require (
9494
github.com/muhlemmer/gu v0.3.1 // indirect
9595
github.com/oklog/ulid v1.3.1 // indirect
9696
github.com/opentracing/opentracing-go v1.2.0 // indirect
97-
github.com/openziti/channel/v4 v4.2.19 // indirect
97+
github.com/openziti/channel/v4 v4.2.21 // indirect
9898
github.com/openziti/edge-api v0.26.47 // indirect
9999
github.com/openziti/foundation/v2 v2.0.70 // indirect
100100
github.com/openziti/identity v1.0.109 // indirect

example/influxdb-client-go/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak=
418418
github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY=
419419
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
420420
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
421-
github.com/openziti/channel/v4 v4.2.19 h1:dsiL2wPrR0a034KTyuc15ud49ZFLjplRKfqfa9a37Sk=
422-
github.com/openziti/channel/v4 v4.2.19/go.mod h1:v8AOCXLqE++BHGmDK7Ut8Uc2nCGyOu9hjkJNoWgpcyU=
421+
github.com/openziti/channel/v4 v4.2.21 h1:MkTCCCC8efBvQxKBkds827SEMzBlORnD4VzkONUnde4=
422+
github.com/openziti/channel/v4 v4.2.21/go.mod h1:EjTaldx8LMejfIlyr0eQQYurUujgGJYXKV1bFKKXW+0=
423423
github.com/openziti/edge-api v0.26.47 h1:5QZeqhD4HFtox7FS5z816M1+MpJED1DdS6oOH128nI8=
424424
github.com/openziti/edge-api v0.26.47/go.mod h1:sYHVpm26Jr1u7VooNJzTb2b2nGSlmCHMnbGC8XfWSng=
425425
github.com/openziti/foundation/v2 v2.0.70 h1:1g4jIl7nIdqW8oCgRcwlbNvK8dwk4mPyrwjjtjH1tp8=

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require (
1818
github.com/michaelquigley/pfxlog v0.6.10
1919
github.com/mitchellh/go-ps v1.0.0
2020
github.com/mitchellh/mapstructure v1.5.0
21-
github.com/openziti/channel/v4 v4.2.19
21+
github.com/openziti/channel/v4 v4.2.21
2222
github.com/openziti/edge-api v0.26.47
2323
github.com/openziti/foundation/v2 v2.0.70
2424
github.com/openziti/identity v1.0.109

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak=
303303
github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY=
304304
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
305305
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
306-
github.com/openziti/channel/v4 v4.2.19 h1:dsiL2wPrR0a034KTyuc15ud49ZFLjplRKfqfa9a37Sk=
307-
github.com/openziti/channel/v4 v4.2.19/go.mod h1:v8AOCXLqE++BHGmDK7Ut8Uc2nCGyOu9hjkJNoWgpcyU=
306+
github.com/openziti/channel/v4 v4.2.21 h1:MkTCCCC8efBvQxKBkds827SEMzBlORnD4VzkONUnde4=
307+
github.com/openziti/channel/v4 v4.2.21/go.mod h1:EjTaldx8LMejfIlyr0eQQYurUujgGJYXKV1bFKKXW+0=
308308
github.com/openziti/edge-api v0.26.47 h1:5QZeqhD4HFtox7FS5z816M1+MpJED1DdS6oOH128nI8=
309309
github.com/openziti/edge-api v0.26.47/go.mod h1:sYHVpm26Jr1u7VooNJzTb2b2nGSlmCHMnbGC8XfWSng=
310310
github.com/openziti/foundation/v2 v2.0.70 h1:1g4jIl7nIdqW8oCgRcwlbNvK8dwk4mPyrwjjtjH1tp8=

ziti/config.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ package ziti
1919
import (
2020
"crypto/x509"
2121
"encoding/json"
22+
"net/http"
23+
"net/url"
24+
"os"
25+
2226
"github.com/openziti/edge-api/rest_util"
2327
"github.com/openziti/identity"
2428
apis "github.com/openziti/sdk-golang/edge-apis"
2529
"github.com/openziti/transport/v2"
2630
"github.com/pkg/errors"
27-
"net/http"
28-
"net/url"
29-
"os"
3031
)
3132

3233
type Config struct {
@@ -48,8 +49,11 @@ type Config struct {
4849
//to populate this field with credentials.
4950
Credentials apis.Credentials `json:"-"`
5051

51-
//EnableHa will signal to the SDK to query and use OIDC authentication which is required for HA controller setups.
52-
//This is a temporary feature flag that will be removed and "default to true" at a later date.
52+
// EnableHa is now deprecated and will be removed in a future revision. The SDK will now query the controller
53+
// and use OIDC authentication if its enabled. This flag is now ignored.
54+
//
55+
// Deprecated: This flag is now ignored
56+
//
5357
EnableHa bool `json:"enableHa"`
5458

5559
//Allows providing a function which controls how/where request to a controller are proxied.

ziti/contexts.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
package ziti
2727

2828
import (
29+
"net/http"
30+
"net/url"
31+
"strconv"
32+
2933
"github.com/kataras/go-events"
3034
"github.com/michaelquigley/pfxlog"
3135
"github.com/openziti/edge-api/rest_model"
@@ -34,9 +38,6 @@ import (
3438
"github.com/openziti/sdk-golang/ziti/edge/posture"
3539
cmap "github.com/orcaman/concurrent-map/v2"
3640
"github.com/pkg/errors"
37-
"net/http"
38-
"net/url"
39-
"strconv"
4041
)
4142

4243
var idCount = 0
@@ -164,7 +165,7 @@ func NewContextWithOpts(cfg *Config, options *Options) (Context, error) {
164165
ConfigTypes: cfg.ConfigTypes,
165166
}
166167

167-
newContext.CtrlClt.SetAllowOidcDynamicallyEnabled(cfg.EnableHa)
168+
newContext.CtrlClt.SetAllowOidcDynamicallyEnabled(true)
168169
newContext.CtrlClt.PostureCache = posture.NewCache(newContext.CtrlClt, newContext.closeNotify)
169170

170171
newContext.CtrlClt.AddOnControllerUpdateListeners(func(urls []*url.URL) {

ziti/sdkinfo/build_info.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)