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

[BUG Bash] InteractiveBrowserCredentialBuilder uses 0 as the default port which will not work #1219

Open
3 tasks done
Flanker32 opened this issue Jun 15, 2020 · 3 comments
Open
3 tasks done
Assignees
Labels
Mgmt Issues that refer to the management plane v2 GA v2 GA candidate v2

Comments

@Flanker32
Copy link
Contributor

Describe the bug
InteractiveBrowserCredentialBuilder uses 0 as the default port, which we can't get Azure's response.

Exception or Stack Trace

This site can’t be reachedThe webpage at http://localhost:0/?code=CODE&session_state=SESSION might be temporarily down or it may have moved permanently to a new web address.

To Reproduce
Steps to reproduce the behavior:
Run codes in Code Snippet

Code Snippet
Add the code snippet that causes the issue.

AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
        TokenCredential credential = new InteractiveBrowserCredentialBuilder()
                .clientId("CLIENT_ID").build();
Azure azure = Azure
                .authenticate(credential, profile)
                .withSubscription("SUBSCRIPTION");
for (Subscription subscription : azure.subscriptions().list()) {
    System.out.println(subscription.displayName());
}

Expected behavior
SDK use an valid port as the default value or throw exception that we must specify the port first

Setup (please complete the following information):

  • JRE Version: [e.g. Open JDK 8] Oracle JDK 8
  • SDK Version: 2.0.0-SNAPSHOT

Additional context
N/A

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@Flanker32 Flanker32 added Mgmt Issues that refer to the management plane v2 labels Jun 15, 2020
@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Jun 16, 2020

@xccc-msft Please take a look on this 2 issue about InteractiveBrowser when you have time. Report to azure-identity if confirmed.

@Flanker32 Here is a bit more material on the new azure-identity from Jianghao (it might be a bit out-dated).

PPT
https://microsoft.sharepoint.com/:p:/t/AzureDeveloperExperience/EbI-QvCV_V1GkTemPLYZfw4BU3g5glwtCTvPrmJ003A4Lw?e=XkYzft&wdLOR=c2E9DC7C8-18EB-4C88-808D-DA6F8F21527A

Video recording
https://msit.microsoftstream.com/video/ad5be47c-346e-49ab-ba0c-c961665a5436
https://msit.microsoftstream.com/video/ce38c71b-9fe0-4353-8fa4-81450d8df954

@xseeseesee
Copy link
Contributor

@Flanker32 It looks port 0 would trigger the scenario for system to find next available port. Most likely the actual picked port is not registered yet. I will try to register port 0 first according to guidance and investigate this issue.

In this case, I think we may suggest Azure Identity to add validation scenario for the port value.

@yungezz
Copy link
Member

yungezz commented Aug 12, 2020

fro linked issue, the issue is fixed in latest azure-identity release. @Flanker32 you might want to have a try on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mgmt Issues that refer to the management plane v2 GA v2 GA candidate v2
Projects
None yet
Development

No branches or pull requests

4 participants