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

Add windows cert section to mqtt5 user guide #530

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions MQTT5-UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* [Direct MQTT with Custom Authentication](#direct-mqtt-with-custom-authentication)
* [Direct MQTT with PKCS11](#direct-mqtt-with-pkcs11-method)
* [Direct MQTT with PKCS12](#direct-mqtt-with-pkcs12-method)
* [Direct MQTT with Windows Certificate Store Method](#direct-mqtt-with-windows-certificate-store-method)
* [HTTP Proxy](#http-proxy)
* [Browser](#browser)
* [MQTT over Websockets with Sigv4 authentication](#mqtt-over-websockets-with-sigv4-authentication-1)
Expand Down Expand Up @@ -298,6 +299,23 @@ A MQTT5 direct connection can be made using a PKCS12 file rather than using a PE

Note: Currently, TLS integration with PKCS#12 is only available on MacOS devices.

#### Direct MQTT with Windows Certificate Store Method

A MQTT5 direct connection can be made with mutual TLS with the certificate and private key in the Windows certificate store,
rather than simply being files on disk. To create a MQTT5 builder configured for this connection, see the following code:

```typescript
// Certificate store path below is an example.
let certificateStorePath : string = "CurrentUser\\MY\\A11F8A9B5DF5B98BA3508FBCA575D09570E0D2C6";
sfod marked this conversation as resolved.
Show resolved Hide resolved
let builder = AwsIotMqtt5ClientConfigBuilder.newDirectMqttBuilderWithMtlsFromWindowsCertStorePath(
"<account-specific endpoint>",
certificateStorePath
);
let client : Mqtt5Client = new mqtt5.Mqtt5Client(builder.build());
```

Note: Windows Certificate Store connection support is only available on Windows devices.

#### HTTP Proxy
No matter what your connection transport or authentication method is, you may connect through an HTTP proxy
by applying proxy configuration to the builder:
Expand Down
Loading