[
https://issues.apache.org/jira/browse/AMQ-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14535310#comment-14535310
]
Timothy Bish commented on AMQ-5767:
-----------------------------------
The code can't use Principal only as the context can contain both UserPrincipal
or GroupPrincipal so you could end up with the wrong value in the userID if you
didn't check for the user principal as the code is written now.
> UseAuthenticatedPrincipalForJMSXUserID causes class not found exception when
> used with custom authentication
> ------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-5767
> URL: https://issues.apache.org/jira/browse/AMQ-5767
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.11.1
> Reporter: emre özcan
> Priority: Minor
>
> if UseAuthenticatedPrincipalForJMSXUserID is set to true when using custom
> authentication ClassNotFoundException
> (org.apache.activemq.jaas.UserPrincipal) occurred. Because activemq-jaas is
> not present and org.apache.activemq.jaas.UserPrincipal is used in
> UserIDBroker line 47.
> UserPrincipal may be replaced with Principal or type check may be completely
> removed
> ...
> if (candidate instanceof UserPrincipal) {
> userID = ((UserPrincipal)candidate).getName();
> ...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)