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

Move off of adal #396

Closed
wants to merge 3 commits into from
Closed

Move off of adal #396

wants to merge 3 commits into from

Conversation

clairernovotny
Copy link
Member

Fixes #387

Copy link

@jmprieur jmprieur left a comment

Choose a reason for hiding this comment

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

@clairernovotny
I've proposed a few suggestions

services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(Configuration)
.EnableTokenAcquisitionToCallDownstreamApi(new[] { "https://graph.windows.net/.default" })
// .AddMicrosoftGraph(Configuration.GetSection("DownstreamApi"))

Choose a reason for hiding this comment

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

Why not use .AddMicrosofGraph? it enables you to inject the Graph service client in the controllers / pages

Copy link
Member Author

Choose a reason for hiding this comment

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

We need graph to operate both as the app and as the user based on the context. We basically just call the graph directly as it's
easier:https://github.com/dotnet/SignService/blob/924022b27795340a93a40f53c37dd80dc6ef0133/src/SignService/Services/IGraphHttpService.cs
https://github.com/dotnet/SignService/blob/924022b27795340a93a40f53c37dd80dc6ef0133/src/SignService/Services/GraphHttpService.cs

Happy to use GraphClient if it can meet our needs and doesn't make things more complicated :)

"VaultId": "https://vault.azure.net",
"AzureRM": "https://management.core.windows.net/"
"GraphId": "https://graph.windows.net/.default",
"VaultId": "https://vault.azure.net/.default",

Choose a reason for hiding this comment

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

FYI, in case you only want to read certificate, instead of getting to KeyVault yourself you can:

But I see here you also create certs

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct, this service creates/manages certs in Key Vault.


namespace SignService.Models

Choose a reason for hiding this comment

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

@clairernovotny clairernovotny deleted the move-off-of-adal branch November 15, 2022 15:25
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.

Migrate off of ADAL
2 participants