question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This sample won't work if I use certificate as secret for my AAD app

See original GitHub issue

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

In appsetting.json file, instead of putting AAD app secret for “ClientSecret”, I put the Certificate Name. The sample won’t run because in the Startup.cs file, when the app first runs: services.AddAuthentication(AzureADDefaults.JwtBearerAuthenticationScheme) .AddAzureADBearer(options => Configuration.Bind(“AzureAd”, options));

.AddAzureADBearer() is taking AzureADOptions as input, and this class doesn’t have properties for certificate name. Thus, this sample is not supporting certificate as a secret for AAD app.

AzureADOptions class is from the package: Microsoft.AspNetCore.Authentication.AzureAD.UI.AzureADOptions

Any log messages given by the failure

Expected/desired behavior

Do I miss anything here? Or this sample will support certificate in the future?

OS and Version?

Windows 10.

Versions

Mention any other details that might be useful

Please let me know if I am missing anything here, maybe this sample does support the certificate as secret.


Thanks! We’ll be in touch soon.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jmprieurcommented, Mar 17, 2019

@shiweiwei114 : I’d like to come to this before the end of April. Meanwhile you can have a loot at this variation of the daemon sample: https://github.com/azure-samples/active-directory-dotnetcore-daemon-v2#variation-daemon-application-using-client-credentials-with-certificates. this will be similar.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a self-signed public certificate to authenticate your ...
Use the certificate you create using this method to authenticate from an application running from your machine. For example, authenticate from ...
Read more >
An easy way to get started with Certificate Based ...
In this blog post I will be showing you how to get started with certificate based authentication for Azure Active Directory (AAD) ...
Read more >
What is the use of Client Secrets in Azure App Registrations?
The client secret is the password of the service principal. Using a certificate would be an alternative way to authenticate the SP.
Read more >
Why Using App Secrets in Production is a Bad Idea
When code needs to run against tenant data as a background task, authenticating by using saved credentials is not possible without compromising ...
Read more >
Connect Your App to Microsoft Azure Active Directory
Enter the saved value of the Client secret for the app you just registered in Azure AD. Use common endpoint, (Optional) When enabled,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found