[
https://issues.apache.org/jira/browse/QPID-943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634517#action_12634517
]
Rob Godfrey commented on QPID-943:
----------------------------------
Rajith,
I would suggest that instead of making _userID as a member variable - it would
make more sense just to use a local variable since it is only used in the one
location.
i.e. change the sections:
+ if (MSG_AUTH &&
!_publisher.getAuthorizedID().getName().equals(getUserID() == null? "" :
getUserID().toString()))
and
+
+ public AMQShortString getUserID()
+ {
+ if (_userID == null)
+ {
+ _userID = getContentHeaderBody().properties instanceof
BasicContentHeaderProperties ?
+ ((BasicContentHeaderProperties)
getContentHeaderBody().properties).getUserId() : null;
+ }
+
+ return _userID;
+ }
to
+ AMQShortString userID = getContentHeaderBody().properties instanceof
BasicContentHeaderProperties ?
+ ((BasicContentHeaderProperties)
getContentHeaderBody().properties).getUserId() : null;
+ if (MSG_AUTH &&
!_publisher.getAuthorizedID().getName().equals(userID == null? "" :
userID().toString()))
and remove the mutating getter.
Other than that I think the Java broker change looks good.
> Move JMSXUserID creation to client to improve broker performance
> ----------------------------------------------------------------
>
> Key: QPID-943
> URL: https://issues.apache.org/jira/browse/QPID-943
> Project: Qpid
> Issue Type: Improvement
> Components: Java Broker, Java Client
> Affects Versions: M2.1
> Reporter: Marnie McCormack
> Assignee: Rajith Attapattu
> Fix For: M4
>
> Attachments: c++broker_userid_check.patch,
> javabroker_userid_check.patch, JMSXUserID.patch
>
>
> Summary:
> Currently the broker modifies the message to add the JMSXUserID. A better
> approach would be to have the client encode that detail and have the broker
> verify that it is correct. This means that the broker does not have to
> re-encode every message. It also allows the sending client to decide if they
> wish to include the JMSXUserID for validation.
> Proposed Changes:
> Removing existing modification code replacing with validation if the
> JMSXUserID is present. If validation is required to pass then close the
> connection on failures.
> Augment to client to have the ability to manuall or automatically set the
> JMSXUserID based on the authenticated connection.
> Test Strategy:
> Test messages with manual user id creation(correct and incorrect), automatic
> user id creation.
> Test broker in validation mode and lenient mode.
> Testing should include performance metrics to quantify the inpact of the
> additional processing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.