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

Ignoring SSL certificates #118

Closed
pahofmann opened this issue Jun 17, 2020 · 2 comments
Closed

Ignoring SSL certificates #118

pahofmann opened this issue Jun 17, 2020 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@pahofmann
Copy link

The detailed example mentions a ISSLTrustManager can be used to allow untrusted SSL certificates.
Could you provide an example of the setup for the ISSLTrustManager and how to pass it to openkit?

@stefaneberl
Copy link
Contributor

stefaneberl commented Jun 17, 2020

Hi Patrick!

Thank you for your question.

The ISSLTrustManager is the interface that can be passed to the DynatraceOpenKitBuilder as well as the AppMonOpenKitBuilder.

OpenKit offers two implementations

Example of how to use SSLBlindTrustManager

var openKit = new DynatraceOpenKitBuilder(BeaconEndpoint, CustomAppUuid, DeviceIdentifier)
    .WithApplicationVersion("1.0.0")
    .WithOperatingSystem(Environment.OSVersion.VersionString)
    .WithTrustManager(new SSLBlindTrustManager()) // this line overides the default SSLStrictTrustManager
    .WithDataCollectionLevel(DataCollectionLevel.USER_BEHAVIOR)
    .WithCrashReportingLevel(CrashReportingLevel.OPT_IN_CRASHES)
    .EnableVerbose()
    .Build();

If you want to implement your own SSLTrustManager, you'll need to implement the ISSLTrustManager interface, which consists of only one getter property, that returns an RemoteCertificateValidationCallback.
Details about the RemoteCertificateValidationCallback can be found in the official Microsoft documentation https://docs.microsoft.com/en-us/dotnet/api/system.net.security.remotecertificatevalidationcallback?view=netcore-3.1

Best
Stefan

@stefaneberl stefaneberl self-assigned this Jun 17, 2020
@stefaneberl stefaneberl added the question Further information is requested label Jun 17, 2020
@pahofmann
Copy link
Author

Thank you very much vor the quick reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants