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

[identity] add support for app service 2019 #20789

Merged
merged 8 commits into from
Mar 22, 2022

Conversation

KarishmaGhiya
Copy link
Member

@KarishmaGhiya KarishmaGhiya commented Mar 11, 2022

Packages impacted by this PR

@azure/identity

Issues associated with this PR

Fixes #20466

Describe the problem that is addressed by this PR

  • Adding back support for app service 2019

Design description -

#20466 (comment)

Checklists

  • Added impacted package name to the issue description
  • Added a changelog (if necessary)
  • Add a test case ??

logger.info(
`${msiName}: Using the endpoint and the secret coming form the environment variables: IDENTITY_ENDPOINT=${process.env.IDENTITY_ENDPOINT} and IDENTITY_HEADER=[REDACTED].`
);

Copy link
Member Author

Choose a reason for hiding this comment

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

@sadasant Can we go over the log warnings and info if they are appropriate for this? Also do we need any logs for clientId ?

@@ -507,6 +507,82 @@ describe("ManagedIdentityCredential", function () {
}
});

it("sends an authorization request correctly in an App Service 2019 environment by client id", async () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: Follow up with the crew in standup - do we need to remove support for App service 2017 version?

Copy link
Contributor

Choose a reason for hiding this comment

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

ok turns out we should not remove 2017! So this PR is good 🙂

Copy link
Contributor

@sadasant sadasant left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@KarishmaGhiya
Copy link
Member Author

KarishmaGhiya commented Mar 19, 2022

The tests are failing due to some errors:

  1. ManagedIdentityCredential
    [node-tests] sends an authorization request correctly in an App Service 2019 environment by client id:
    [node-tests] TypeError: Cannot read property 'url' of undefined
    [node-tests] at Context. (D:\a_work\1\s\sdk\identity\identity\test\internal\node\managedIdentityCredential.spec.ts:527:51)
    [node-tests]

  2. ManagedIdentityCredential
    [node-tests] sends an authorization request correctly in an App Service 2019 environment by resource id:
    [node-tests] TypeError: Cannot read property 'url' of undefined
    [node-tests] at Context. (D:\a_work\1\s\sdk\identity\identity\test\internal\node\managedIdentityCredential.spec.ts:565:51)
    [node-tests]

Still investigating this.

Copy link
Contributor

@sadasant sadasant left a comment

Choose a reason for hiding this comment

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

I had forgotten, but we also need to add this MSI to the list of MSIs on the ManagedIdentityCredential/index.ts file.

We also need a flag to enable this (or 2017’s) on ManagedIdentityCredential/index.ts — follow up with Scott Schaab or Christopher Scott. As per Bill Wert, the env variables are the flags to enable either MSI, and we already cover that, so we just need to add this MSI to the list of MSIs.

@billwert
Copy link
Contributor

Looks good from the Identity perspective.

@sadasant
Copy link
Contributor

sadasant commented Mar 21, 2022

@KarishmaGhiya when you add the MSI in the MSI list, add it before the 2017 entry. Then, you can mark this issue* as fixed: #20954

Copy link
Contributor

@sadasant sadasant left a comment

Choose a reason for hiding this comment

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

Awesome! Thank you 🙏

@check-enforcer
Copy link

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run js - [service] - ci

@KarishmaGhiya KarishmaGhiya enabled auto-merge (squash) March 22, 2022 00:44
@KarishmaGhiya KarishmaGhiya merged commit b1ac4ee into Azure:main Mar 22, 2022
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-js that referenced this pull request Sep 28, 2022
Review request for Microsoft.ContainerService to add version 2022-08-03-preview (Azure#20789)

* Adds base for updating Microsoft.ContainerService from version preview/2022-08-02-preview to version 2022-08-03-preview

* Updates readme

* Updates API version in new specs and examples

* update readmes (Azure#20708)

* feat: add rest api spec for ipTags (Azure#20744)

Co-authored-by: Qi Ni <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Identity] Add support for App Service 2019
3 participants