[
https://issues.apache.org/jira/browse/ARTEMIS-2952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luís Alves updated ARTEMIS-2952:
--------------------------------
Description:
To be able to implement OpenID Connect authN on Artemis I had to extend
ActiveMQXAConnectionFactory to override the method:
{code:java}
protected synchronized ActiveMQConnection createConnectionInternal(final String
username,
final
String password,
final
boolean isXA,
final int
type) throws JMSException
{code}
This allows me to send and access token instead of the user:password pair. In
my implementation I leave username empty (like a flag) to tell the server that
I wanna use a token that is on the password field.
This currently works fine but I had to do some reflection to modify the
readOnly as it's private.
Can this flag be protected as well?
A possible alternative is to provide a way to pass the user and password using
a Supplier, so I can define a method that gets a new access token if the
current is expired. The token expiration also will cause some disconnections,
as the server will detect the token expired and disconnect the client. I don't
think there's any way I can update the connection credentials while the
connection is established, correct?
was:
To be able to implement OpenID Connect authN on Artemis I had to extend
ActiveMQXAConnectionFactory to override the method:
{code:java}
protected synchronized ActiveMQConnection createConnectionInternal(final String
username,
final
String password,
final
boolean isXA,
final int
type) throws JMSException
{code}
This allows me to send and access token instead of the user:password pair. In
my implementation I leave username empty (flag) to tell the server that I wanna
use a token that is on the password field.
This currently works fine but I had to do some reflection to modify the
readOnly as it's private.
Can this flag be protected as well?
A possible alternative is to provide a way to pass the user and password using
a Supplier, so I can define a method that gets a new access token if the
current is expired. The token expiration also will cause some disconnections,
as the server will detect the token expired and disconnect the client. I don't
think there's any way I can update the connection credentials while the
connection is established, correct?
> Extending ActiveMQXAConnectionFactory is limited by readOnly being private
> --------------------------------------------------------------------------
>
> Key: ARTEMIS-2952
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2952
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Affects Versions: 2.15.0
> Reporter: Luís Alves
> Priority: Major
>
> To be able to implement OpenID Connect authN on Artemis I had to extend
> ActiveMQXAConnectionFactory to override the method:
> {code:java}
> protected synchronized ActiveMQConnection createConnectionInternal(final
> String username,
> final
> String password,
> final
> boolean isXA,
> final
> int type) throws JMSException
> {code}
> This allows me to send and access token instead of the user:password pair. In
> my implementation I leave username empty (like a flag) to tell the server
> that I wanna use a token that is on the password field.
> This currently works fine but I had to do some reflection to modify the
> readOnly as it's private.
> Can this flag be protected as well?
> A possible alternative is to provide a way to pass the user and password
> using a Supplier, so I can define a method that gets a new access token if
> the current is expired. The token expiration also will cause some
> disconnections, as the server will detect the token expired and disconnect
> the client. I don't think there's any way I can update the connection
> credentials while the connection is established, correct?
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)