Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error checks during certificatePath reading and parsing in azuread #227

Conversation

jegorbunov
Copy link

Before this PR certificate-based authentication (in case of a ActiveDirectoryServicePrincipal or ActiveDirectoryApplication fed auth) would panic (nil pointer dereference at github.com/microsoft/[email protected]/azuread/configuration.go:228) because of wrong error checks.

@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.53%. Comparing base (573423d) to head (009f5cd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #227      +/-   ##
==========================================
- Coverage   74.87%   74.53%   -0.35%     
==========================================
  Files          32       31       -1     
  Lines        6397     6388       -9     
==========================================
- Hits         4790     4761      -29     
- Misses       1325     1338      +13     
- Partials      282      289       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shueybubbles
Copy link
Collaborator

thx for the PR.

Yikes, this is a bad test hole. Can you pls add a test to at least verify the negative case of a missing cert?

@jegorbunov jegorbunov force-pushed the azuread-fix-certificate-path-error-checks branch from 0850e76 to 9a09d6f Compare November 26, 2024 13:26
@jegorbunov
Copy link
Author

@microsoft-github-policy-service agree

@microsoft-github-policy-service agree

@jegorbunov
Copy link
Author

thx for the PR.

Yikes, this is a bad test hole. Can you pls add a test to at least verify the negative case of a missing cert?

No worries. Added a simple test.

@jegorbunov jegorbunov force-pushed the azuread-fix-certificate-path-error-checks branch from 9a09d6f to 009f5cd Compare November 26, 2024 16:20
@shueybubbles shueybubbles merged commit 4b95a0f into microsoft:main Nov 26, 2024
6 checks passed
@jegorbunov
Copy link
Author

@shueybubbles, when can I expect this change to be released / tagged? Thanks!

@shueybubbles
Copy link
Collaborator

i have another PR to prep for v1.8.0 #228

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.

3 participants