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

Add PoP token support for ROPC flow #412

Merged
merged 7 commits into from
Feb 23, 2024

Conversation

rharpavat
Copy link
Contributor

@rharpavat rharpavat commented Feb 8, 2024

This change adds PoP token support for ROPC login flow in order to enable using ROPC flow for automated testing of 1P AzRBAC scenarios.

Currently, automated testing for AzRBAC and PoP token flow relies on SPN login, which uses the msal confidential client. However, most customers will be using the interactive login flow which uses msal's public client. In order to enable better testing of the customer scenario, this change enables PoP token support for username/password flow so that automated testing can be conducted for the public client.

MSAL PR to make this change: AzureAD/microsoft-authentication-library-for-go#472

This PR vendors the latest MSAL release containing the change: https://github.com/AzureAD/microsoft-authentication-library-for-go/releases/tag/v1.2.2

Add VCR tests for ROPC flow

Fix formatting issues

Add VCR tests for ROPC flow
@rharpavat rharpavat force-pushed the add-pop-token-support-to-ropc-flow branch from 732ee53 to 9b2754c Compare February 15, 2024 21:05
@rharpavat rharpavat marked this pull request as ready for review February 15, 2024 22:36
Copy link
Contributor

@julienstroheker julienstroheker left a comment

Choose a reason for hiding this comment

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

PTAL

pkg/internal/pop/msal.go Outdated Show resolved Hide resolved
pkg/internal/pop/msal.go Outdated Show resolved Hide resolved
pkg/internal/pop/msal.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2024

Codecov Report

Attention: Patch coverage is 59.85401% with 55 lines in your changes are missing coverage. Please review.

Project coverage is 65.98%. Comparing base (a6824d8) to head (e1d15af).

Files Patch % Lines
pkg/internal/pop/msal_public.go 55.07% 29 Missing and 2 partials ⚠️
pkg/internal/testutils/govcrutils.go 0.00% 23 Missing ⚠️
pkg/internal/token/ropc.go 97.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #412      +/-   ##
==========================================
+ Coverage   64.34%   65.98%   +1.64%     
==========================================
  Files          28       29       +1     
  Lines        1949     2046      +97     
==========================================
+ Hits         1254     1350      +96     
- Misses        620      624       +4     
+ Partials       75       72       -3     

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

pkg/internal/token/ropc.go Outdated Show resolved Hide resolved
Copy link
Contributor

@weinong weinong left a comment

Choose a reason for hiding this comment

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

LGTM

@weinong weinong merged commit 2d6ac56 into Azure:main Feb 23, 2024
6 checks passed
@rharpavat rharpavat deleted the add-pop-token-support-to-ropc-flow branch February 23, 2024 01:02
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.

4 participants