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

Client SASL External #324

Open
Hussain1993 opened this issue Nov 3, 2020 · 4 comments
Open

Client SASL External #324

Hussain1993 opened this issue Nov 3, 2020 · 4 comments

Comments

@Hussain1993
Copy link

Hussain1993 commented Nov 3, 2020

Hi,

I have looked at all the examples and have found them really helpful. One thing I am finding difficult to understand is that I need my client to use SASL EXTERNAL mechanism and not sure how to go about doing that.

I am providing the client certificate and key as options to the connect method.

Thanks

@grs
Copy link
Member

grs commented Nov 3, 2020

If you uncomment lines https://github.com/amqp/rhea/blob/master/examples/tls/tls_client.js#L35 and https://github.com/amqp/rhea/blob/master/examples/tls/tls_server.js#L33 that should enable external authentication for the simple tls example. Does that work for you?

@mattiaskjellsson
Copy link

In the typings are used, is the right place to update in the rhea/typings/connection.d.ts file Line 145

From:

interface TlsTransportOptions {
  /**
   * @property {string} transport - The transport option to request TLS connection. This is ignored if connection_details is set.
   */
   transport: "tls" | "ssl";
}

To:

interface TlsTransportOptions {
  /**
   * @property {string} transport - The transport option to request TLS connection. This is ignored if connection_details is set.
   */
   transport: "tls" | "ssl";

   enable_sasl_external?: boolean,
}

The right place to update, or is it logically more sane to add the enable_sasl_extrernal?: boolean, somewhere else?

@grs
Copy link
Member

grs commented Mar 8, 2023

You can set the option on the container when using the typings. If a per connection option was needed in the typings I would probably add it to CommonConnectionOptions, even tjhough it is clearly only relevant when tls/ssl is used.

@mattiaskjellsson
Copy link

Setting
connection.container.options['enable_sasl_external'] = true;
solved the issue for me.

Thank you very much for your assistance. Greatly appreciated 🏅

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

No branches or pull requests

3 participants