Skip to content

Add HTTPAuthorization settings to HTTPTransportSettings#386

Merged
michel-laterman merged 3 commits intoelastic:mainfrom
michel-laterman:features/httpcommon-auth-settings
Feb 24, 2026
Merged

Add HTTPAuthorization settings to HTTPTransportSettings#386
michel-laterman merged 3 commits intoelastic:mainfrom
michel-laterman:features/httpcommon-auth-settings

Conversation

@michel-laterman
Copy link
Copy Markdown
Contributor

@michel-laterman michel-laterman commented Feb 17, 2026

What does this PR do?

Add auth settings struct to HTTPTransportSettings.

Auth struct contains username+password for basic auth, api_key, and custom headers. Setting any of these will inject the headers (as Authorization for basic or api_key) into all requests made with a round tripper created from the settings.

Related work in Kibana: elastic/kibana#250557

Why is it important?

Provide a way to configure the use of credentials to all requests.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works

@michel-laterman michel-laterman requested a review from a team as a code owner February 17, 2026 20:07
@michel-laterman michel-laterman removed the request for review from a team February 17, 2026 20:07
@michel-laterman michel-laterman added the enhancement New feature or request label Feb 17, 2026
@michel-laterman michel-laterman added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Feb 17, 2026
@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

@michel-laterman michel-laterman changed the title Add basic and api_key auth settings to HTTPTransportSettings Add HTTPAuthorization settings to HTTPTransportSettings Feb 18, 2026
Copy link
Copy Markdown
Contributor

@belimawr belimawr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but make sure @jillguyonnet is also happy with the current behaviour.

@michel-laterman
Copy link
Copy Markdown
Contributor Author

michel-laterman commented Feb 19, 2026

I'm going to hold off on merging this until elastic/go-ucfg#224 is merged so we can mark sensitive values as needing redaction;

EDIT:
I'm going to go ahead and merge so I can work on the actual issue and work on redaction support at the go-ucfg level later

@michel-laterman michel-laterman merged commit 2c8b125 into elastic:main Feb 24, 2026
5 checks passed
@michel-laterman michel-laterman deleted the features/httpcommon-auth-settings branch February 24, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants