Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Use broker or browser login instead of device flow #2612

Merged
merged 10 commits into from
Nov 14, 2022
Merged

Use broker or browser login instead of device flow #2612

merged 10 commits into from
Nov 14, 2022

Conversation

Porges
Copy link
Member

@Porges Porges commented Nov 10, 2022

Update CLI to attempt broker or browser-based authentication first; if you Ctrl-C to cancel it, you can fall back to device code login.

Also updated the MSAL dependency to latest version and pass allow_broker=True which will allow the use of Web Account Manager (WAM), if it is available.

Using browser auth requires the http://localhost redirect URI, and using the broker requires a special custom URI including the app ID (see code).

@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2022

Codecov Report

Merging #2612 (779aa6d) into main (0b19af3) will decrease coverage by 1.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2612      +/-   ##
==========================================
- Coverage   30.37%   29.37%   -1.01%     
==========================================
  Files         255      290      +35     
  Lines       29441    35597    +6156     
==========================================
+ Hits         8943    10456    +1513     
- Misses      20498    25141    +4643     
Impacted Files Coverage Δ
src/agent/input-tester/src/lib.rs 2.94% <0.00%> (-97.06%) ⬇️
src/agent/win-util/src/lib.rs 18.51% <0.00%> (-81.49%) ⬇️
src/agent/onefuzz/src/memory.rs 25.00% <0.00%> (-36.12%) ⬇️
src/agent/onefuzz/src/fs.rs 55.55% <0.00%> (-9.83%) ⬇️
src/agent/onefuzz-agent/src/worker.rs 62.00% <0.00%> (-2.93%) ⬇️
...ent/onefuzz-task/src/tasks/report/dotnet/common.rs 37.50% <0.00%> (-1.33%) ⬇️
...c/agent/dynamic-library/src/bin/dynamic-library.rs 2.38% <0.00%> (-0.40%) ⬇️
src/agent/onefuzz/src/libfuzzer.rs 70.09% <0.00%> (-0.22%) ⬇️
src/agent/onefuzz/src/process.rs 1.32% <0.00%> (-0.14%) ⬇️
src/agent/onefuzz/src/asan.rs 0.00% <0.00%> (ø)
... and 47 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Porges Porges force-pushed the browser-auth branch 2 times, most recently from 285bf25 to 8486fdf Compare November 10, 2022 23:46
@Porges Porges marked this pull request as ready for review November 11, 2022 00:19
@Porges Porges changed the title Use browser login instead of device flow Use broker or browser login instead of device flow Nov 11, 2022
@Porges
Copy link
Member Author

Porges commented Nov 11, 2022

Verified; ready for review.

@Porges Porges force-pushed the browser-auth branch 2 times, most recently from 779aa6d to 9979886 Compare November 14, 2022 19:44
@Porges Porges enabled auto-merge (squash) November 14, 2022 20:10
@Porges Porges merged commit c5840eb into main Nov 14, 2022
Porges added a commit that referenced this pull request Nov 14, 2022
Update CLI to attempt broker or browser-based authentication first; if you `Ctrl-C` to cancel it, you can fall back to device code login.

Also updated the MSAL dependency to latest version and pass `allow_broker=True` which will allow the use of Web Account Manager (WAM), if it is available.

Using browser auth requires the `http://localhost` redirect URI, and using the broker requires a special custom URI including the app ID (see code).
@nharper285 nharper285 mentioned this pull request Nov 28, 2022
@Porges Porges deleted the browser-auth branch December 8, 2022 21:45
@ghost ghost locked as resolved and limited conversation to collaborators Jan 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants