-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Identity] Migrated to samples v2 #19085
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
Changes from 10 commits
0b0a93c
5ddfb49
7781197
7f6f8ad
084ed4f
05c8fab
299eee1
460054d
ac5797d
7263a41
9f525fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,10 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
|
|
||
| /** | ||
| * @summary Authenticates with a client and a app registration's secret. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you update this summary as well?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh now I think I should have said
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does this look? 9f525fc
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks good, thanks! |
||
| */ | ||
|
|
||
| import { ClientSecretCredential } from "@azure/identity"; | ||
| import { KeyClient } from "@azure/keyvault-keys"; | ||
|
|
||
|
|
@@ -9,9 +13,9 @@ require("dotenv").config(); | |
|
|
||
| export async function main(): Promise<void> { | ||
| const credential = new ClientSecretCredential( | ||
| process.env.AZURE_TENANT_ID!, // The tenant ID in Azure Active Directory | ||
| process.env.AZURE_CLIENT_ID!, // The application (client) ID registered in the AAD tenant | ||
| process.env.AZURE_CLIENT_SECRET! // The client secret for the registered application | ||
| process.env.AZURE_TENANT_ID!, // The tenant ID in Azure Active Directory | ||
| process.env.AZURE_CLIENT_ID!, // The app registration client ID in the AAD tenant | ||
| process.env.AZURE_CLIENT_SECRET! // The app registration secret for the registered application | ||
| ); | ||
|
|
||
| const keyVaultUrl = `https://key-vault-name.vault.azure.net`; | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think other versions could be added in the future so do we want the customer to pick and choose the right version for them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh interesting! — Though I’d rather not think too much about it at the moment 🙏 I took a peek and it made me question other things. Makes me feel it’s a scope leak and could lead to a rabbit hole.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Daniel Rodríguez (@sadasant) interesting, anything you could share that could help with future migrations?