From 02aced0f66bff475c5649938d6252e4e91da440a Mon Sep 17 00:00:00 2001 From: Gabriele Gerbino Date: Tue, 7 Nov 2023 12:34:46 +0100 Subject: [PATCH] fix: correct bug with Konnect multi-region login --- CHANGELOG.md | 24 +++++++++++++++++------- konnect/login_service.go | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e4321aea..9e3f85bdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Table of Contents +- [v1.29.1](#v1291) - [v1.29.0](#v1290) - [v1.28.1](#v1281) - [v1.28.0](#v1280) @@ -69,6 +70,14 @@ - [v0.2.0](#v020) - [v0.1.0](#v010) +## [v1.29.1] + +> Release date: 2023/11/07 + +### Fixes + +- Correct a bug preventing logins with Konnect in the EU region. + [#1089](https://github.com/Kong/deck/pull/1089) ## [v1.29.0] @@ -105,12 +114,12 @@ compatibility, but in the future that will be removed. Please update to the new structure (see 'changes')._ -> __IMPORTANT__: _The recently added decK command `deck file openapi2kong` implemented different techniques for -generating decK configuration from OpenAPI spec files then the legacy `inso` tool. In particular, entity names and identifiers +> __IMPORTANT__: _The recently added decK command `deck file openapi2kong` implemented different techniques for +generating decK configuration from OpenAPI spec files then the legacy `inso` tool. In particular, entity names and identifiers were generated differently in the more recent implementation. For existing `inso` users, this may cause issues with migrating -to the new tool as names and IDs are used by Kong Gateway to identify entities. In response we have added a +to the new tool as names and IDs are used by Kong Gateway to identify entities. In response we have added a `--inso-compatible` flag to the `deck file openapi2kong` command to support a smoother migration for these users. For more -information on this and other APIOps commands, see the +information on this and other APIOps commands, see the [go-apiops documentation page](https://github.com/Kong/go-apiops/tree/main/docs). ### Added @@ -133,15 +142,15 @@ information on this and other APIOps commands, see the [#1051](https://github.com/Kong/deck/pull/1051) - The top-level CLI commands have been restructured. All commands now live under 2 subcommands (`gateway` and `file`) to clarify their use and (in the future) reduce the clutter of - the many global flags only relevant to a few commands. + the many global flags only relevant to a few commands. Using the old commands will still work but will print a deprecation notice. Please update your usage to the new commands. The new commands are more unix-like; - + - default to `stdin`/`stdout` and no longer to "`kong.yaml`" - the `-s` / `--state` flag is gone, files can be listed without the flag - the `--online` flag for `validate` is gone; use `gateway validate` for online, `file validate` for local. - + PR [#962](https://github.com/Kong/deck/pull/962) ## [v1.27.1] @@ -1464,6 +1473,7 @@ No breaking changes have been introduced in this release. Debut release of decK +[v1.29.1]: https://github.com/kong/deck/compare/v1.29.0...v1.29.1 [v1.29.0]: https://github.com/kong/deck/compare/v1.28.1...v1.29.0 [v1.28.1]: https://github.com/kong/deck/compare/v1.28.0...v1.28.1 [v1.28.0]: https://github.com/kong/deck/compare/v1.27.1...v1.28.0 diff --git a/konnect/login_service.go b/konnect/login_service.go index 11ff1a583..ce40fb50e 100644 --- a/konnect/login_service.go +++ b/konnect/login_service.go @@ -130,7 +130,7 @@ func (s *AuthService) OrgUserInfo(ctx context.Context) (*OrgUserInfo, error) { // replace geo-specific endpoint with global one for retrieving org info client := *s.client client.baseURL = strings.Replace(s.client.baseURL, "eu.", "global.", 1) - client.baseURL = strings.Replace(s.client.baseURL, "au.", "global.", 1) + client.baseURL = strings.Replace(client.baseURL, "au.", "global.", 1) req, err := client.NewRequest(http.MethodGet, "/v2/organizations/me", nil, nil) if err != nil {