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

[DotNet] Add details to README in certificate samples #421

Closed
wants to merge 17 commits into from

Conversation

JhontSouth
Copy link

@JhontSouth JhontSouth commented May 29, 2024

#minor

Description

This PR adds more information to the README certificate samples to have an easier complete guide for SSL/TLS certificate configuration.

Proposed Changes

  • Updated Readme of dotnet samples 84.bot-authentication-certificate and 85.bot-authentication-sni.

@JhontSouth
Copy link
Author

Include az login step

@sw-joelmut
Copy link

sw-joelmut commented Jun 7, 2024

I created #429 to improve the readme, and merge it to this pr once approved

For SNI it also applies the same principles

Copy link

@sw-joelmut sw-joelmut left a comment

Choose a reason for hiding this comment

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

We should replace this https://github.com/southworks/BotBuilder-Samples/pull/421/files#diff-7dbeff6709649d9c6e9229f72bcdc4d92ab7e4b89670961266729f98010d7769R55-R58 with the CertificateServiceClientCredentialsFactory like the normal certificate sample, but sendX5c.

@JhontSouth
Copy link
Author

We should replace this https://github.com/southworks/BotBuilder-Samples/pull/421/files#diff-7dbeff6709649d9c6e9229f72bcdc4d92ab7e4b89670961266729f98010d7769R55-R58 with the CertificateServiceClientCredentialsFactory like the normal certificate sample, but sendX5c.

I guess that you are referring to this(the link doesn't work):
services.AddSingleton(
new CertificateServiceClientCredentialsFactory(certificate, _configuration["MicrosoftAppId"], _configuration["MicrosoftAppTenantId"], null, null, true));

Instead of:

        // MSAL certificate auth.
        services.AddSingleton(
            serviceProvider => ConfidentialClientApplicationBuilder.Create(_configuration["MicrosoftAppId"])
                .WithCertificate(certificate, sendX5C)
                .Build());

        // MSAL credential factory: regardless of secret, cert or custom auth, need to add the line below to enable MSAL.
        services.AddSingleton<ServiceClientCredentialsFactory, MsalServiceClientCredentialsFactory>();

@sw-joelmut
Copy link

Yes, also the image in the readme should be updated.

@JhontSouth
Copy link
Author

services.AddSingleton(
new CertificateServiceClientCredentialsFactory(certificate, _configuration["MicrosoftAppId"], _configuration["MicrosoftAppTenantId"], null, null, true));

solved

@JhontSouth
Copy link
Author

Promoted /3995

@JhontSouth JhontSouth closed this Jun 19, 2024
@JhontSouth JhontSouth deleted the southworks/update/certificate-guides branch June 19, 2024 19:30
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.

3 participants