Skip to content

Get ms alias from github identity.#2581

Merged
16 commits merged intoAzure:mainfrom
sima-zhu:generate_token
Jan 24, 2022
Merged

Get ms alias from github identity.#2581
16 commits merged intoAzure:mainfrom
sima-zhu:generate_token

Conversation

@sima-zhu
Copy link
Copy Markdown
Contributor

@sima-zhu sima-zhu commented Jan 19, 2022

Summary:
The PR is using opensource rest API call to get ms alias from github identity. Generate aad token from service principle.

Expect returns:

  1. 200 status.
    Return ms alias directly when call the scripts.
  2. error response.
    Print the API call error response and exit 1.

Testing locally

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@weshaggard
Copy link
Copy Markdown
Member

Do we need a full script for this? Would a simple helper method similar to https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1#L6 do the job?

@sima-zhu sima-zhu changed the title Generate token for aad app. Get ms alias from github identity. Jan 21, 2022
@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

Comment thread eng/common/scripts/Get-AADIdentityFromGithubUser.ps1 Outdated
Comment thread eng/common/scripts/Get-AADIdentityFromGithubUser.ps1 Outdated
Comment thread eng/common/scripts/Get-AADIdentityFromGithubUser.ps1 Outdated
@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@sima-zhu sima-zhu requested a review from benbp January 21, 2022 20:05
Comment thread eng/common/scripts/Get-AADIdentityFromGithubUser.ps1
Comment thread eng/common/scripts/Get-AADIdentityFromGithubUser.ps1 Outdated
Comment thread eng/common/scripts/Get-AADIdentityFromGithubUser.ps1
sima-zhu and others added 2 commits January 24, 2022 08:49
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@sima-zhu sima-zhu requested review from benbp and weshaggard January 24, 2022 17:04
}

$resp | Write-Verbose

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.

It might be worth adding some logging of what value we got back so it shows up in the logs something like this in the if statement:

Write-Host "Fetched aad identity $($resp.aad.alias) for github user $GithubName

Copy link
Copy Markdown
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

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

One last comment but looks good otherwise.

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@ghost
Copy link
Copy Markdown

ghost commented Jan 24, 2022

Hello @azure-sdk!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 8d860cd into Azure:main Jan 24, 2022
@sima-zhu sima-zhu deleted the generate_token branch January 24, 2022 23:55
This pull request was closed.
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