From 28c56376ef31cb826b439773622f186dd6bbfb29 Mon Sep 17 00:00:00 2001 From: xeivieni Date: Wed, 28 Feb 2024 18:32:20 +0100 Subject: [PATCH 1/2] feat: use ApiKey instead of Bearer as this part of the documentation says https://www.elastic.co/guide/en/cloud/current/ec-api-authentication.html --- internal/clients/fleet/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/clients/fleet/client.go b/internal/clients/fleet/client.go index e5c5b1832..5d5ea71d2 100644 --- a/internal/clients/fleet/client.go +++ b/internal/clients/fleet/client.go @@ -99,7 +99,7 @@ func (t *transport) RoundTrip(req *http.Request) (*http.Response, error) { } if t.APIKey != "" { - req.Header.Add("Authorization", "Bearer "+t.APIKey) + req.Header.Add("Authorization", "ApiKey "+t.APIKey) } return t.next.RoundTrip(req) From caccdf1b3bd31e4110a04f29a87b15982549d45c Mon Sep 17 00:00:00 2001 From: xeivieni Date: Thu, 29 Feb 2024 10:32:26 +0000 Subject: [PATCH 2/2] chore: update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dce88226d..20a918dfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## [Unreleased] +## [0.11.2] - 2024-02-29 + +### Fixed + +- Fix authentication for fleet API (using ApiKey instead of Bearer keyword) ([#576](https://github.com/elastic/terraform-provider-elasticstack/pull/576)) + ## [0.11.1] - 2024-02-17 ### Added