You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Oliver Wulff (Created) (JIRA)" <ji...@apache.org> on 2011/11/22 10:08:39 UTC

[jira] [Created] (CXF-3928) Add token validation for OnBehalfOf element in TokenIssueOperation

Add token validation for OnBehalfOf element in TokenIssueOperation
------------------------------------------------------------------

                 Key: CXF-3928
                 URL: https://issues.apache.org/jira/browse/CXF-3928
             Project: CXF
          Issue Type: Improvement
          Components: Services
    Affects Versions: 2.5
            Reporter: Oliver Wulff


Tokens passed in OnBehalfOf element are not validated. It's the responsibility of the TokenProvider implementation to validate that.

A proposal has been discussed here:
http://cxf.547215.n5.nabble.com/STS-OnBehalfOf-token-validation-SAMLTokenProvider-td5003544.html

OnBehalfOf token validation is moved to the TokenIssueOperation and the ReceivedToken is enhanced with the following attributes:
- was it a token of ws-security header (like ReceivedToken), onbehalfof, actas
- successfully validated (it could be a token which depends on other constraints to be fully accepted)
- original DOM element
- transformed DOM element (used if the token is passed by ref, also supported by SAML spec)
- principal (mostly, you only need the principal to issue a new token)




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-3928) Add token validation for OnBehalfOf element in TokenIssueOperation

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

Colm O hEigeartaigh resolved CXF-3928.
--------------------------------------

    Resolution: Fixed
    
> Add token validation for OnBehalfOf element in TokenIssueOperation
> ------------------------------------------------------------------
>
>                 Key: CXF-3928
>                 URL: https://issues.apache.org/jira/browse/CXF-3928
>             Project: CXF
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 2.5
>            Reporter: Oliver Wulff
>            Assignee: Colm O hEigeartaigh
>             Fix For: 2.5.1
>
>         Attachments: git.diff.patch, git.diff.patch
>
>
> Tokens passed in OnBehalfOf element are not validated. It's the responsibility of the TokenProvider implementation to validate that.
> A proposal has been discussed here:
> http://cxf.547215.n5.nabble.com/STS-OnBehalfOf-token-validation-SAMLTokenProvider-td5003544.html
> OnBehalfOf token validation is moved to the TokenIssueOperation and the ReceivedToken is enhanced with the following attributes:
> - was it a token of ws-security header (like ReceivedToken), onbehalfof, actas
> - successfully validated (it could be a token which depends on other constraints to be fully accepted)
> - original DOM element
> - transformed DOM element (used if the token is passed by ref, also supported by SAML spec)
> - principal (mostly, you only need the principal to issue a new token)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3928) Add token validation for OnBehalfOf element in TokenIssueOperation

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

Oliver Wulff updated CXF-3928:
------------------------------

    Attachment: git.diff.patch

Implemented the changes and added a unit test where the on-behalf-of token has been issued by SAML realm A and the issued token is a SAML token of realm B
                
> Add token validation for OnBehalfOf element in TokenIssueOperation
> ------------------------------------------------------------------
>
>                 Key: CXF-3928
>                 URL: https://issues.apache.org/jira/browse/CXF-3928
>             Project: CXF
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 2.5
>            Reporter: Oliver Wulff
>         Attachments: git.diff.patch, git.diff.patch
>
>
> Tokens passed in OnBehalfOf element are not validated. It's the responsibility of the TokenProvider implementation to validate that.
> A proposal has been discussed here:
> http://cxf.547215.n5.nabble.com/STS-OnBehalfOf-token-validation-SAMLTokenProvider-td5003544.html
> OnBehalfOf token validation is moved to the TokenIssueOperation and the ReceivedToken is enhanced with the following attributes:
> - was it a token of ws-security header (like ReceivedToken), onbehalfof, actas
> - successfully validated (it could be a token which depends on other constraints to be fully accepted)
> - original DOM element
> - transformed DOM element (used if the token is passed by ref, also supported by SAML spec)
> - principal (mostly, you only need the principal to issue a new token)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3928) Add token validation for OnBehalfOf element in TokenIssueOperation

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

Oliver Wulff commented on CXF-3928:
-----------------------------------

Makes sense. I'll also move the refactored method validateReceivedToken up to AbstractOperation and reuse it in TokenValidateOperation.
                
> Add token validation for OnBehalfOf element in TokenIssueOperation
> ------------------------------------------------------------------
>
>                 Key: CXF-3928
>                 URL: https://issues.apache.org/jira/browse/CXF-3928
>             Project: CXF
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 2.5
>            Reporter: Oliver Wulff
>         Attachments: git.diff.patch
>
>
> Tokens passed in OnBehalfOf element are not validated. It's the responsibility of the TokenProvider implementation to validate that.
> A proposal has been discussed here:
> http://cxf.547215.n5.nabble.com/STS-OnBehalfOf-token-validation-SAMLTokenProvider-td5003544.html
> OnBehalfOf token validation is moved to the TokenIssueOperation and the ReceivedToken is enhanced with the following attributes:
> - was it a token of ws-security header (like ReceivedToken), onbehalfof, actas
> - successfully validated (it could be a token which depends on other constraints to be fully accepted)
> - original DOM element
> - transformed DOM element (used if the token is passed by ref, also supported by SAML spec)
> - principal (mostly, you only need the principal to issue a new token)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3928) Add token validation for OnBehalfOf element in TokenIssueOperation

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

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

Hi Oli,

No major objections. I would maybe put the TokenValidator list into AbstractOperation as per the TokenProvider list. Also consider putting the OnBehalfOf validation code you added into a separate method or class.

Colm.
                
> Add token validation for OnBehalfOf element in TokenIssueOperation
> ------------------------------------------------------------------
>
>                 Key: CXF-3928
>                 URL: https://issues.apache.org/jira/browse/CXF-3928
>             Project: CXF
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 2.5
>            Reporter: Oliver Wulff
>         Attachments: git.diff.patch
>
>
> Tokens passed in OnBehalfOf element are not validated. It's the responsibility of the TokenProvider implementation to validate that.
> A proposal has been discussed here:
> http://cxf.547215.n5.nabble.com/STS-OnBehalfOf-token-validation-SAMLTokenProvider-td5003544.html
> OnBehalfOf token validation is moved to the TokenIssueOperation and the ReceivedToken is enhanced with the following attributes:
> - was it a token of ws-security header (like ReceivedToken), onbehalfof, actas
> - successfully validated (it could be a token which depends on other constraints to be fully accepted)
> - original DOM element
> - transformed DOM element (used if the token is passed by ref, also supported by SAML spec)
> - principal (mostly, you only need the principal to issue a new token)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CXF-3928) Add token validation for OnBehalfOf element in TokenIssueOperation

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

Colm O hEigeartaigh reassigned CXF-3928:
----------------------------------------

    Assignee: Colm O hEigeartaigh
    
> Add token validation for OnBehalfOf element in TokenIssueOperation
> ------------------------------------------------------------------
>
>                 Key: CXF-3928
>                 URL: https://issues.apache.org/jira/browse/CXF-3928
>             Project: CXF
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 2.5
>            Reporter: Oliver Wulff
>            Assignee: Colm O hEigeartaigh
>             Fix For: 2.5.1
>
>         Attachments: git.diff.patch, git.diff.patch
>
>
> Tokens passed in OnBehalfOf element are not validated. It's the responsibility of the TokenProvider implementation to validate that.
> A proposal has been discussed here:
> http://cxf.547215.n5.nabble.com/STS-OnBehalfOf-token-validation-SAMLTokenProvider-td5003544.html
> OnBehalfOf token validation is moved to the TokenIssueOperation and the ReceivedToken is enhanced with the following attributes:
> - was it a token of ws-security header (like ReceivedToken), onbehalfof, actas
> - successfully validated (it could be a token which depends on other constraints to be fully accepted)
> - original DOM element
> - transformed DOM element (used if the token is passed by ref, also supported by SAML spec)
> - principal (mostly, you only need the principal to issue a new token)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3928) Add token validation for OnBehalfOf element in TokenIssueOperation

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

Colm O hEigeartaigh updated CXF-3928:
-------------------------------------

    Fix Version/s: 2.5.1
    
> Add token validation for OnBehalfOf element in TokenIssueOperation
> ------------------------------------------------------------------
>
>                 Key: CXF-3928
>                 URL: https://issues.apache.org/jira/browse/CXF-3928
>             Project: CXF
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 2.5
>            Reporter: Oliver Wulff
>            Assignee: Colm O hEigeartaigh
>             Fix For: 2.5.1
>
>         Attachments: git.diff.patch, git.diff.patch
>
>
> Tokens passed in OnBehalfOf element are not validated. It's the responsibility of the TokenProvider implementation to validate that.
> A proposal has been discussed here:
> http://cxf.547215.n5.nabble.com/STS-OnBehalfOf-token-validation-SAMLTokenProvider-td5003544.html
> OnBehalfOf token validation is moved to the TokenIssueOperation and the ReceivedToken is enhanced with the following attributes:
> - was it a token of ws-security header (like ReceivedToken), onbehalfof, actas
> - successfully validated (it could be a token which depends on other constraints to be fully accepted)
> - original DOM element
> - transformed DOM element (used if the token is passed by ref, also supported by SAML spec)
> - principal (mostly, you only need the principal to issue a new token)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3928) Add token validation for OnBehalfOf element in TokenIssueOperation

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

Oliver Wulff updated CXF-3928:
------------------------------

    Attachment: git.diff.patch

I've applied an initial patch but due to several changes I'd like to get your opinion on it.

Semantic changes:
1) so far, the principal is written into the TokenValidatorResponse if validation was succeesful
I changed this thus the principal is available if parsing was successful. If validation fails the ReceivedToken has the state set to INVALID.

Therefore I had to change:
- DefaultSubjectProvider
- SAMLTokenValidator
- UsernameTokenValidator

Notes:
- attribute tokenContext of ReceivedToken not yet used.
- I'd like to add an additional testcase of issue onbehalfof where IdentityMapper is required (but would like your feedback first)


                
> Add token validation for OnBehalfOf element in TokenIssueOperation
> ------------------------------------------------------------------
>
>                 Key: CXF-3928
>                 URL: https://issues.apache.org/jira/browse/CXF-3928
>             Project: CXF
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 2.5
>            Reporter: Oliver Wulff
>         Attachments: git.diff.patch
>
>
> Tokens passed in OnBehalfOf element are not validated. It's the responsibility of the TokenProvider implementation to validate that.
> A proposal has been discussed here:
> http://cxf.547215.n5.nabble.com/STS-OnBehalfOf-token-validation-SAMLTokenProvider-td5003544.html
> OnBehalfOf token validation is moved to the TokenIssueOperation and the ReceivedToken is enhanced with the following attributes:
> - was it a token of ws-security header (like ReceivedToken), onbehalfof, actas
> - successfully validated (it could be a token which depends on other constraints to be fully accepted)
> - original DOM element
> - transformed DOM element (used if the token is passed by ref, also supported by SAML spec)
> - principal (mostly, you only need the principal to issue a new token)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira