Skip to content

Conversation

jpinsonneau
Copy link
Collaborator

@jpinsonneau jpinsonneau commented Jul 20, 2022

This PR adds Authorization header to loki client

This header can contains service account token to authenticate in loki operator gateway

Copy link

@OlivierCazade OlivierCazade left a comment

Choose a reason for hiding this comment

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

The HTTP client used by the loki client already has a Bearer token feature:
https://github.com/prometheus/common/blob/main/config/http_config.go

I think it would be better to use it so we do not diverge too much from the original loki-client.

@jpinsonneau
Copy link
Collaborator Author

The HTTP client used by the loki client already has a Bearer token feature: https://github.com/prometheus/common/blob/main/config/http_config.go

I think it would be better to use it so we do not diverge too much from the original loki-client.

Very good catch @OlivierCazade, thanks a lot !
We can directly send the following config to flowlogs-pipeline

"clientConfig":{
   "authorization":{
      "type":"Bearer",
      "credentials_file":"/var/run/secrets/tokens/flowlogs-pipeline"
   },
   ...
},

and avoid this PR and netobserv/flowlogs-pipeline#260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants