emqx / CocoaMQTT

MQTT 5.0 client library for iOS and macOS written in Swift
https://www.emqx.com/en
Other
1.6k stars 419 forks source link

AWS IOT MQTT broker with custom authorizer username and password #471

Open devCracker opened 2 years ago

devCracker commented 2 years ago

Hi, can someone help me on this question? can we use this CocoaMQTT for the AWS IOT MQTT server where customautherizer with user name and password configuration.

ZeeD commented 1 year ago

Hi. I think I have the same problem. In my case I'll try to add more context: according to https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html#protocol-port you can connect and authenticate to aws iot as an mqtt broker. My goal is to use a "pure" MQTT connection (without using websockets), with a "Custom authentication", so basically I need to set the port to 443 (easy), but also I need to set the TLS extension ALPN to the value "mqtt". I would like to know if there is a way, from CocoaMQTT to access to the TLS connection and set the ALPN extension

JaylinYu commented 1 year ago

FYI, AWS IoT Core is not compatible with vanilla MQTT SDK or specifically, in terms of TLS part. Even if you try cocoamqtt + openssl, you still failed. And AWS's SDK is a mess, IoT Core is not open-sourced. We got nothing to try here,. This issue belongs to AWS not here.