Skip to content

Add Trace2 instrumentation to Entra authentication - #2450

Merged
mjcheetham merged 1 commit into
git-ecosystem:mainfrom
mjcheetham:trace2-entra
Sep 23, 2026
Merged

mjcheetham merged 1 commit into
git-ecosystem:mainfrom
mjcheetham:trace2-entra

Conversation

@mjcheetham

@mjcheetham mjcheetham commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Requires git-ecosystem/git-credential-manager#2451 be merged first!

Add Trace2-based instrumentation around all aspects of Entra authentication.

Entra has the most branching of any authentication path in GCM: broker or not, silent or interactive, and within interactive one of three modes - each selected by some combination of user setting, stored preference, platform support and runtime availability. When someone reports that authentication did something unexpected, the answer is almost always one of those decisions, and none of them left a trace that could be correlated with timings.

@mjcheetham mjcheetham added the auth:entra Specific to Microsoft Entra Authentication label Sep 17, 2026

@dscho dscho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I ❤️ better tracing!

Comment on lines -107 to +113
var availableNames = available.Select(m => m.ToString().ToLowerInvariant());
var availableNames = available.Select(GetModeName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change puzzled me for a moment, until I figured out that GetModeName() is a named variant of that closure. Therefore this change is appropriate.

Entra has the most branching of any authentication path in GCM: broker
or not, silent or interactive, and within interactive one of three
modes - each selected by some combination of user setting, stored
preference, platform support and runtime availability. When someone
reports that authentication did something unexpected, the answer is
almost always one of those decisions, and none of them left a trace that
could be correlated with timings.

Assisted-by: Claude Opus 5
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
@mjcheetham
mjcheetham marked this pull request as ready for review September 23, 2026 11:14
@mjcheetham
mjcheetham requested a review from a team as a code owner September 23, 2026 11:14
@mjcheetham
mjcheetham merged commit c877e8f into git-ecosystem:main Sep 23, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth:entra Specific to Microsoft Entra Authentication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants