Azure / Azure/azure-functions-host
Add DiagnosticEvent for "No authentication handler is registered for the scheme 'ArmToken'." error.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
One fairly common mistake that in-proc .NET customers make is that they override Authentication somehow. Either they do it directly, or they do it via some call they don't realize is overriding Auth. The app may run perfectly fine, but it can interfere with calls from the portal to the host.
We should look for errors that we often see and surface them in the portal via DiagnosticEvents -- this is really hard to debug and it's not obvious why things broke, so putting it front-and-center would be helpful.
The most common error:
`An unhandled host error has occurred.
No authentication handler is registered for the scheme 'ArmToken'. The registered schemes are: Bearer. Did you forget to call AddAuthentication().AddSomeAuthHandler?`
Contributor guide
Research direction
Start by searching the host for the exact “No authentication handler is registered for the scheme 'ArmToken'” error and tracing how DiagnosticEvents are produced and surfaced in the portal. Done means this authentication failure appears as a DiagnosticEvent with enough context to help identify overridden authentication, with the relevant behavior verified by the host's existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100