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

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

Closed
shiweiwei114 opened this issue Mar 16, 2019 · 9 comments
Closed
Labels
enhancement New feature or request

Comments

@shiweiwei114
Copy link

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.

@jmprieur
Copy link
Contributor

@shiweiwei114 : yes this sample will also show how to use certs in the future

@shiweiwei114
Copy link
Author

@jmprieur thanks for the quick response! Do you have a ETA for that? I will come back to check by that time then.

@jmprieur
Copy link
Contributor

@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.

@jmprieur jmprieur added the enhancement New feature or request label Oct 18, 2019
@amal-khalaf
Copy link

amal-khalaf commented May 13, 2020

Hi
is there an update on when there will be a aspnetcore-v2 code sample which use certificates instead of secrets ?

@jmprieur
Copy link
Contributor

It's on the backlog for Microsoft.Identity.Web, @amal-khalaf:
See AzureAD/microsoft-identity-web#12

@amal-khalaf
Copy link

Thanks Jean @jmprieur for your quick response - do you have an ETA on when this would be ready?
I am currently re-implementing the Authentication for Luis.ai Portal (which to be released in July) using the Identity Platform v2.0 and i wanted to use the Microsoft.Identiy.Web library (for both Sign in and token acquisition )
however we must use cert for api authenication as we use 1st party app which do not have the client secret option.

@jmprieur
Copy link
Contributor

@amal-khalaf : we are well aware that this is needed for first party.
Would something like this: https://github.com/AzureAD/microsoft-identity-web/wiki/Spec-certificates ?

@amal-khalaf
Copy link

amal-khalaf commented May 13, 2020

@jmprieur : so i will need to write my own implementation of TokenAcquistion class to handle the new certificate configuration
how will i use the CertificatesExtension

@jmprieur
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants