[
https://issues.apache.org/jira/browse/ARTEMIS-5316?focusedWorklogId=973816&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-973816
]
ASF GitHub Bot logged work on ARTEMIS-5316:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 08/Jul/25 13:09
Start Date: 08/Jul/25 13:09
Worklog Time Spent: 10m
Work Description: brusdev commented on code in PR #5822:
URL: https://github.com/apache/activemq-artemis/pull/5822#discussion_r2192483787
##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/AMQPBrokerConnection.java:
##########
@@ -461,7 +463,8 @@ private void doConnect() {
senders.clear();
receivers.clear();
- ClientSASLFactory saslFactory = new SaslFactory(connection,
brokerConnectConfiguration);
+ final String[] availableSaslMechanisms =
configuration.getExtraParams().containsKey(SASL_MECHANISMS_KEY) ?
protonProtocolManager.getSaslMechanisms() : null;
Review Comment:
The array `availableSaslMechanisms` seems more the list of the enabled
mechanisms than the available mechanisms, indeed in the doc you can read `The
desired SCRAM-SHA mechanisms must be enabled on the AMQP acceptor`
```suggestion
final String[] enabledSaslMechanisms =
configuration.getExtraParams().containsKey(SASL_MECHANISMS_KEY) ?
protonProtocolManager.getSaslMechanisms() : null;
```
Issue Time Tracking
-------------------
Worklog Id: (was: 973816)
Time Spent: 2h 40m (was: 2.5h)
> Support for SASL XOAUTH2 Mechanism in Broker Connection
> -------------------------------------------------------
>
> Key: ARTEMIS-5316
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5316
> Project: ActiveMQ Artemis
> Issue Type: New Feature
> Reporter: Tomasz Ćukasiewicz
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> There is a need to support XOAUTH2 authentication between two AMQP brokers,
> as the existing mechanisms are not sufficiently secure for certain use cases.
> Currently, Artemis does not support this authentication method on the client
> side, and the SaslFactory implementation is both private and final, making it
> impossible to extend.
> To address this, an XOAuth2SASLMechanism should be implemented within the
> AMQPBrokerConnection class and integrated into the SaslFactory. The new SASL
> mechanism should return its name as "XOAUTH2" and include the appropriate
> authentication headers.
> A working example of this approach has been successfully tested with the
> Solace broker:
> {code:java}
> @Override
> public byte[] getInitialResponse() {
> String response = String.format("user=%s\u0001auth=Bearer %s\u0001\u0001",
> userName, token);
> return response.getBytes(StandardCharsets.UTF_8);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact