Skip to content

Commit 4e64d6b

Browse files
authored
feat: use ApiKey instead of Bearer (#576)
* 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 * chore: update CHANGELOG
1 parent 4d6e2cb commit 4e64d6b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## [Unreleased]
22

3+
## [0.11.2] - 2024-02-29
4+
5+
### Fixed
6+
7+
- Fix authentication for fleet API (using ApiKey instead of Bearer keyword) ([#576](https://github.com/elastic/terraform-provider-elasticstack/pull/576))
8+
39
## [0.11.1] - 2024-02-17
410

511
### Added

internal/clients/fleet/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (t *transport) RoundTrip(req *http.Request) (*http.Response, error) {
9999
}
100100

101101
if t.APIKey != "" {
102-
req.Header.Add("Authorization", "Bearer "+t.APIKey)
102+
req.Header.Add("Authorization", "ApiKey "+t.APIKey)
103103
}
104104

105105
return t.next.RoundTrip(req)

0 commit comments

Comments
 (0)