You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rob Godfrey (JIRA)" <qp...@incubator.apache.org> on 2009/12/07 11:13:18 UTC

[jira] Commented: (QPID-2234) Clean up after addition of PrincipalHolder

    [ https://issues.apache.org/jira/browse/QPID-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786847#action_12786847 ] 

Rob Godfrey commented on QPID-2234:
-----------------------------------

> What was the reasoning behind the new PrincipalHolder? Seems odd just to have a single getter in an interface.

The issue was to get the authorization stuff working with the 0-10 code... The only thing that was required was the Principal.  The 0-8 and 0-10 code have (for this particular part of the code) no implementation in common... So the easiest thing to do was to isolate the dependency (something that can provide the Principal) and define that as an interface.  Given that it is a principal... getPrincipal seems like a more correct name than getAuthorizedID.

I made the change in a reasonably mechanical sort of way... without updating code which accessed the Principal using existing methods... The patch seems worthwhile therefore.

> Clean up after addition of PrincipalHolder 
> -------------------------------------------
>
>                 Key: QPID-2234
>                 URL: https://issues.apache.org/jira/browse/QPID-2234
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Martin Ritchie
>            Assignee: Aidan Skinner
>            Priority: Minor
>         Attachments: QPID-2234-Remove-getAuthorizedID.patch
>
>
> The addition of the PrincipalHolder and its getPrincipal() method has added new means of retrieving the authorizedID for a session.
> However, AMQProtocolEngine still maintains getAuthorizedID() to pair with the setAuthorizedID(Principal)
> Do we need to have two getters for the same variable?
> Attached is a patch that removes getAuthorizedID as it is the least used. However, I would be in favour of renaming getPrincipal to getAuthorizedPrincipal just to make things clearer. I know the java doc says ' Principal that was used to authorized this session' .. though I do have to wonder what session. 
> What was the reasoning behind the new PrincipalHolder? Seems odd just to have a single getter in an interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org