Hi Shiv, the connection router doesn't resolve the USER_NAME key when the connection is authenticated with the TextFileCertificateLoginModule, this is a bug, I created the following issue: https://issues.apache.org/jira/browse/ARTEMIS-5465
Regards, Domenico On Tue, 6 May 2025 at 16:22, Shiv Kumar Dixit <shivkumar.di...@it.eurofinseu.com.invalid> wrote: > Hi Domenico > I am exploring how to restrict users (specially certificate based) for > connecting based on certain conditions. I came across > https://lists.apache.org/thread/not2kzq23vx60zjvsl9ffrx7rfps6wzs. I tried > to use USER_NAME key for filtering and it worked fine for basic > authentication users. Can we use this USER_NAME key also to filter > certificate-based users as well? > > We define the certificate username and role in e.g. cert-users.properties > and cert-roles.properties. Can we use username defined in > cert-users.properties file E.g. user1=CN=My_Test_App in connection router? > > <connection-routers> > <connection-router name="allowed-ssl-users"> > <key-type>USER_NAME</key-type> > > <local-target-filter>user1</local-target-filter> > </connection-router> > </connection-routers> > > <acceptor name="ssl">tcp://0.0.0.0:9876?.........;router=allowed-ssl-users > </acceptor> > > Thanks > Shiv >