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 support for device client to use AMQPS_WS with X509 authentication #728

Open
timtay-microsoft opened this issue Mar 11, 2020 · 3 comments

Comments

@timtay-microsoft
Copy link
Member

timtay-microsoft commented Mar 11, 2020

I tested out removing the "iothob-no-client-cert=true" query string from the amqp stack here and it allowed for the connection to succeed sometimes. It's about a 50/50 chance of a successful connection and for a "An existing connection was closed by the remote host" transport exception.

I'm not sure if this is due to some persisted state (not cleaning up the previous connection correctly?), so this needs further investigation. It's worth solving because we want to provide support for AMQPS_WS to use CA signed certs like all the other protocols in this SDK will (after #727 ).

Repro steps are to run the SendEventX509 sample with CA signed certs and AMQPS_WS configured.

@timtay-microsoft timtay-microsoft changed the title Device client AMQPS_WS with CA signed X509 authentication doesn't work Add support for device client to use AMQPS_WS with CA signed X509 authentication Mar 30, 2020
@timtay-microsoft
Copy link
Member Author

Closing due to lack of demand. We'll revisit this feature at a later date

@pearstar
Copy link

pearstar commented Dec 7, 2021

We are using AMQPS with CA signed X509 cert for iothub connections and everything works fine. But recently we are facing customers that only allow certain ports to be opened on their firewalls, so we are exploring AMQPS_WS since it's on 443. As soon as I switched the protocol from AMQPS to AMQPS_WS I got the following exception when trying to connect:

E/AmqpsIotHubConnection: Amqp session closed unexpectedly. Closing this connection...
    com.microsoft.azure.sdk.iot.device.transport.amqps.exceptions.AmqpUnauthorizedAccessException: {"errorCode":401002,"trackingId":"43585caddddb442ca2c22ca1e6f19efe-G:0-TimeStamp:12/07/2021 20:41:41","message":"Unauthorized","timestampUtc":"2021-12-07T20:41:41.7446033Z"}

Comparing Azure portal logs, the authType is null when using AMQPS_WS and when using AMQPS the authType is a proper "x509Certificate". Not sure if it helps or not.

I eventually found this issue page and perhaps this is the answer to my problem. But will it be revisited or fixed? Or any other solutions you may suggest? Thanks.

I also tried MQTT and MQTT_WS and they all work. But we still prefer AMQP protocol.

@timtay-microsoft timtay-microsoft changed the title Add support for device client to use AMQPS_WS with CA signed X509 authentication Add support for device client to use AMQPS_WS with X509 authentication Apr 4, 2023
@Xerxekyran
Copy link

Hi everyone,
due to this bug: #1648 I would like to use AMQPS_WS with X509, is this feature planned to be implemented soon or is there any planned release shedule?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants