You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Alexey Markevich (JIRA)" <ji...@apache.org> on 2011/02/18 14:41:38 UTC

[jira] Created: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

[cxf-rt-ws-security] Fix for TokenType support  
------------------------------------------------

                 Key: CXF-3348
                 URL: https://issues.apache.org/jira/browse/CXF-3348
             Project: CXF
          Issue Type: Improvement
          Components: WS-* Components
    Affects Versions: 2.4
            Reporter: Alexey Markevich
            Priority: Minor


This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh reassigned CXF-3348:
----------------------------------------

    Assignee: Colm O hEigeartaigh

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>              Labels: TokenType
>         Attachments: fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Alexey Markevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Markevich updated CXF-3348:
----------------------------------

    Attachment: Extended+TokenType+support.patch

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>              Labels: TokenType
>         Attachments: Extended+TokenType+support.patch, Fix+for+TokenType+support.patch, Fix+for+TokenType+support.patch, fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh resolved CXF-3348.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.3
                   2.4


Patch applied thanks. I made some minor changes in that I gave priority to the TokenType in the template, over the set TokenType.

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>              Labels: TokenType
>             Fix For: 2.4, 2.3.3
>
>         Attachments: Extended+TokenType+support.patch, Extended+TokenType+support.patch, Fix+for+TokenType+support.patch, Fix+for+TokenType+support.patch, fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996443#comment-12996443 ] 

Colm O hEigeartaigh commented on CXF-3348:
------------------------------------------

Hi Alexey,

Thanks for the patch. A couple of points...

1) You need to tick the box assigning copyright to the ASF when submitting the patch, or else we can't apply it.
2) Please make sure there are no tabs in patchfiles
3) I don't think your change to writing out the SecondaryParameters is the right way to proceed. You've changed it so that the TokenType does not get written out from the template element in SecondaryParameters, but instead it saves the value and writes it out separately as an optional TokenType element. I would prefer if we kept the existing behaviour, i.e. if there is a TokenType in the template then just write it out as a SecondaryParameter. Otherwise, we have a class variable which we set on the STSClient via e.g. setTokenType(String), and we write that out instead as the optional element. Make sense?

Colm.

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Priority: Minor
>              Labels: TokenType
>         Attachments: fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997338#comment-12997338 ] 

Colm O hEigeartaigh commented on CXF-3348:
------------------------------------------

Hi Alexey,

The most recent patch still hasn't addressed my objection of:

"I don't think your change to writing out the SecondaryParameters is the right way to proceed. You've changed it so that the TokenType does not get written out from the template element in SecondaryParameters, but instead it saves the value and writes it out separately as an optional TokenType element. "

I want to preserve the existing behaviour of writing out the TokenType from the template element, unless the user sets the TokenType on the STSClient directly, in which case write that out. 

You've also removed the getKeySize() method...why?

Colm.

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>              Labels: TokenType
>         Attachments: Fix+for+TokenType+support.patch, Fix+for+TokenType+support.patch, fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Alexey Markevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Markevich updated CXF-3348:
----------------------------------

    Attachment: fixed+TokenType+support.patch

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Priority: Minor
>              Labels: TokenType
>         Attachments: fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Alexey Markevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Markevich updated CXF-3348:
----------------------------------

    Attachment: Fix+for+TokenType+support.patch

Fixed checkstyle errors

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>              Labels: TokenType
>         Attachments: Fix+for+TokenType+support.patch, Fix+for+TokenType+support.patch, fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Alexey Markevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Markevich updated CXF-3348:
----------------------------------

    Attachment: Fix+for+TokenType+support.patch

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>              Labels: TokenType
>         Attachments: Fix+for+TokenType+support.patch, fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997390#comment-12997390 ] 

Colm O hEigeartaigh commented on CXF-3348:
------------------------------------------


Hi Alexey,

> optional TokenType element can be assigned using setter (in this case it will be added to RequestSecurityToken);

Yes that's fine - but your patch removed the existing functionality, where the TokenType is set by parsing the Template element. One functionality should override the other, but both should work independently.

> set TokenType in createSecurityToken only if STS response contains it.

I'd like the token type to be set on the SecurityToken in all cases. So if the STS does not return a TokenType element, then set the token type to be whatever was sent to the STS.

Colm.

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>              Labels: TokenType
>         Attachments: Fix+for+TokenType+support.patch, Fix+for+TokenType+support.patch, fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Alexey Markevich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997382#comment-12997382 ] 

Alexey Markevich commented on CXF-3348:
---------------------------------------

Hello Colm,

My idea is:
- optional TokenType element can be assigned using setter (in this case it will be added to RequestSecurityToken);
- set TokenType in createSecurityToken only if STS response contains it.

And getKeySize - I think if its assigned outside - client knows its value - so this method is obsolete. If I wrong - lets keep it.

Regards, Alexey.

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>              Labels: TokenType
>         Attachments: Fix+for+TokenType+support.patch, Fix+for+TokenType+support.patch, fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Alexey Markevich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996486#comment-12996486 ] 

Alexey Markevich commented on CXF-3348:
---------------------------------------

Hello Colm,

1. Ok
2. Will be more careful
3. Good idea - patch resubmitted

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>              Labels: TokenType
>         Attachments: Fix+for+TokenType+support.patch, fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Alexey Markevich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997411#comment-12997411 ] 

Alexey Markevich commented on CXF-3348:
---------------------------------------

New patch version added.

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>              Labels: TokenType
>         Attachments: Extended+TokenType+support.patch, Fix+for+TokenType+support.patch, Fix+for+TokenType+support.patch, fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CXF-3348) [cxf-rt-ws-security] Fix for TokenType support

Posted by "Alexey Markevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Markevich updated CXF-3348:
----------------------------------

    Attachment: Extended+TokenType+support.patch

Fixed checkstyle error

> [cxf-rt-ws-security] Fix for TokenType support  
> ------------------------------------------------
>
>                 Key: CXF-3348
>                 URL: https://issues.apache.org/jira/browse/CXF-3348
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4
>            Reporter: Alexey Markevich
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>              Labels: TokenType
>         Attachments: Extended+TokenType+support.patch, Extended+TokenType+support.patch, Fix+for+TokenType+support.patch, Fix+for+TokenType+support.patch, fixed+TokenType+support.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> This patch takes TokenType from template and put it into request. Also TokenType extracted from response and added to result value.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira