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

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

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
            Priority: Minor


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


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

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Ritchie reassigned QPID-2234:
------------------------------------

    Assignee: Aidan Skinner

Hi Aidan can you take a look at this please.

> 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


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

Posted by "Rob Godfrey (JIRA)" <qp...@incubator.apache.org>.
    [ 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


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

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Ritchie updated QPID-2234:
---------------------------------

    Attachment: QPID-2234-Remove-getAuthorizedID.patch

> 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
>            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