Improve error message for bad enrollment server URLs
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- go
- Domain
- authentication
Research direction
Start at auth/manager.go:139 and reproduce the enrollment attempt with the endpoint shown in the issue, first without and then with the /graylog proxy path. Trace the JWKS decoding failure and improve the resulting error description so it points users toward an incorrect enrollment server URL or missing proxy path.
Written by the indexing model from the issue text.
Description
While testing the MSI installer, I've forgotten to add the proxy path my test cluster is using:
PS C:\Program Files\Graylog\Collector> $env:GLC_SERVER__AUTH__ENROLLMENT_ENDPOINT = "https://hostname"
PS C:\Program Files\Graylog\Collector> $env:GLC_SERVER__AUTH__ENROLLMENT_TOKEN = "<redacted>"
PS C:\Program Files\Graylog\Collector> & "C:\Program Files\Graylog\Collector\graylog-collector-windows-amd64.exe" supervisor
{"level":"info","ts":1776769833.1377687,"logger":"supervisor","caller":"supervisor/supervisor.go:304","msg":"Starting supervisor","instance_uid":"fcaa1475-c0f6-441e-9a6f-dc6a1fe90d00","endpoint":"https://hostname/v1/opamp"}
{"level":"info","ts":1776769833.1396508,"logger":"supervisor","caller":"supervisor/supervisor.go:780","msg":"Preparing enrollment"}
{"level":"info","ts":1776769833.1401725,"logger":"supervisor.auth","caller":"auth/manager.go:139","msg":"Preparing enrollment","instance_uid":"fcaa1475-c0f6-441e-9a6f-dc6a1fe90d00","endpoint":"https://hostname"}
Error: failed to start supervisor: authentication initialization failed: enrollment preparation failed: failed to fetch JWKS: failed to decode JWKS: invalid character '<' looking for beginning of value
PS C:\Program Files\Graylog\Collector> $env:GLC_SERVER__AUTH__ENROLLMENT_ENDPOINT = "https://hostname/graylog"
The error message is likely not helpful for a user, we should include a better description of what might be the issue here.
- Dominant language
- Go
- Stars
- 1
- Forks
- 0
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 7
Contributor guide
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.
More from Graylog2/collector
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
feature
Difficulty 5/5 Over a week Newbie friendliness 30/100
All issues in Graylog2/collector
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100