Skip to content

Fix Www-Authenticate not being read#885

Merged
Avery-Dunn merged 1 commit intoAzureAD:devfrom
blancqua:blancqua/www-auth-fix
Dec 6, 2024
Merged

Fix Www-Authenticate not being read#885
Avery-Dunn merged 1 commit intoAzureAD:devfrom
blancqua:blancqua/www-auth-fix

Conversation

@blancqua
Copy link
Copy Markdown

@blancqua blancqua commented Dec 4, 2024

Fixes #884

@blancqua
Copy link
Copy Markdown
Author

blancqua commented Dec 4, 2024

@microsoft-github-policy-service agree

return response.headers()
.entrySet()
.stream()
.filter(entry -> WWW_AUTHENTICATE_HEADER.equalsIgnoreCase(entry.getKey()))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this warrants a unit test, just updating the existing one from here 68bba51#diff-c1e78d16db8b6cb86ef4e37c4f14c7950221b0fd619b2ab501499c588b5c0833R620

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi @bgavrilMS ! I extended the existing tests to run with both variations of the header key. Slipped in some small refactor as well to avoid duplication, hope you don't mind.

Copy link
Copy Markdown
Member

@bgavrilMS bgavrilMS left a comment

Choose a reason for hiding this comment

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

LGTM, just needs a small unit test.

Thanks so much @blancqua

@blancqua
Copy link
Copy Markdown
Author

blancqua commented Dec 6, 2024

Hi @bgavrilMS ! I extended the existing tests to run with both variations of the header key. Slipped in some small refactor as well to avoid duplication, hope you don't mind.

Copy link
Copy Markdown
Contributor

@Avery-Dunn Avery-Dunn left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for the help with this!

@Avery-Dunn Avery-Dunn merged commit 90af4d5 into AzureAD:dev Dec 6, 2024
@blancqua
Copy link
Copy Markdown
Author

blancqua commented Dec 7, 2024

Thanks, any clue when there might be a release including this?

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.

[Bug] AzureArcManagedIdentitySource looking for WWW-Authenticate response header while agent returns Www-Authenticate

3 participants