opensafely-core / opensafely-core/backend-server
Sort out the basic auth environment variables
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 1
- Forks
- 5
- Avg merge
- 1h 36m
- Merged PRs (30d)
- 2
Description
We have 3 otel consumers in our backends, all of which need the same basic auth password.
Currently, its really messy.
In the environment, we set OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic%20SECRET", i.e urlencoded value.
This works for the otel client in jobrunner.
IT doesn't work for the otel-collector, which we set a separate variable COLLECTOR_BASIC_AUTH=SECRET, and manually interpolate that in the collector config yaml as "Basic ${COLLECTOR_BASIC_AUTH}"
We've recently added otel-cli, which doesn't like the fact that OTEL_EXPORTER_OTLP_HEADERS value is urlencoded, and needs it plain.
The idea was we'd just set OTEL_EXPORTER_OTEP_HEADERS once and be done with it, but it seems that was wishful thinking.
We should try and harmonise this config, so there's only one place to set the new value, and all the cosnumers get it in the form they want.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the definitions of OTEL_EXPORTER_OTLP_HEADERS, COLLECTOR_BASIC_AUTH, and the collector configuration YAML, then compare how jobrunner, otel-collector, and otel-cli consume them. Done means one configured value supplies all three consumers in the formats they require, with the relevant configuration checks passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- infrastructure, observability
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100