You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Louis Ryan (JIRA)" <ji...@apache.org> on 2008/04/14 23:47:05 UTC

[jira] Created: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
--------------------------------------------------------------------------------------------------

                 Key: SHINDIG-197
                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
             Project: Shindig
          Issue Type: New Feature
          Components: Features
            Reporter: Louis Ryan
            Assignee: Louis Ryan
         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup).patch

This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Updated: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

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

Louis Ryan updated SHINDIG-197:
-------------------------------

    Attachment: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup)2.patch

Fixed patch :(

> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features (Javascript), Gadget Rendering Server (Java), Gadget Rendering Server (PHP)
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup)2.patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Updated: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

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

Louis Ryan updated SHINDIG-197:
-------------------------------

    Attachment: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup).patch

> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup).patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Updated: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

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

Louis Ryan updated SHINDIG-197:
-------------------------------

    Attachment:     (was: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup)1.patch)

> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features (Javascript), Gadget Rendering Server (Java), Gadget Rendering Server (PHP)
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup)2.patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Commented: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

Posted by "Louis Ryan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590166#action_12590166 ] 

Louis Ryan commented on SHINDIG-197:
------------------------------------

@Kevin

Re - Auth enum location. Agreed that at some point common data definitions should move into their logically owning locations. Im going to defer that to whomever factors out the common auth pieces into a common location. I'd rather not put this in oauth package though as its too detailed a leve.

> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features (Javascript), Gadget Rendering Server (Java), Gadget Rendering Server (PHP)
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup)2.patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Updated: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

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

Louis Ryan updated SHINDIG-197:
-------------------------------

    Attachment: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup)1.patch

Updated patch based on Kevin's first round of comments

> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features (Javascript), Gadget Rendering Server (Java), Gadget Rendering Server (PHP)
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup)1.patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Commented: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

Posted by "Louis Ryan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589783#action_12589783 ] 

Louis Ryan commented on SHINDIG-197:
------------------------------------




Agreed, deferring to later patch however.




Fixed (and fixed my IDE too! )




Not sure what you mean here. We still need to annotate if we want the
receiving side of the injection to control whats bound, if not then we
should eliminate the annotations altogether and control binding in the
module. In general I'd prefer to keep using annotations and have simpler
interfaces. ProxiedContentFetcher doesnt seem to be used anywhere and could
just be removed.



I think this belongs in spec so we avoid forward-dependency nastiness from
spec into implementation code. Move to top-level in spec as Auth.

- Class comments shouldn't have authorship info


Done



Done



Most conusmers of cache are passing RemoteContentRequest & RemoteContent




Yup, thats what the code is doing. Only errors if theres some junk value in
the attribute.


Nope, not needed yet anyway



> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features (Javascript), Gadget Rendering Server (Java), Gadget Rendering Server (PHP)
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup).patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Closed: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

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

Kevin Brown closed SHINDIG-197.
-------------------------------

    Resolution: Fixed

This has been applied now -- closing.

> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features (Javascript), Gadget Rendering Server (Java), Gadget Rendering Server (PHP)
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup)2.patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Commented: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589371#action_12589371 ] 

Kevin Brown commented on SHINDIG-197:
-------------------------------------

Some comments:

- If we're renaming RemoteContentFetcher (which I agree with), I'd prefer HttpRequest and HttpResponse over RemoteContentRequest and RemoteContent.

- Order of imports looks wrong on some of the files. org.apache.shindig stuff should probably always be first. Maybe we need to clarify in the style guide.

- If we're introducing custom interfaces instead of doing everything as a RemoteContentFetcher, we should drop some of those annotations. @ProxiedContentFetcher is no longer necessary, for example. The entire optional injection can actually be discarded. This will require implementations potentially implementing more interfaces, though.

- The Auth type enumeration is good, but I don't think it belongs on Preload. It should probably be org.apache.shindig.oauth.AuthType or something along those lines. Preload is probably the least obvious consumer of the authz types.

- Class comments shouldn't have authorship info

- Missing apache license headers from some new files

- Why ContentCache and not just a generic Cache<Key, Value> ?

- For <Preload> the authz should default to "none". It shouldn't be required (isn't that how you proposed it in the spec?)

- No luck getting the Guice servlet package?

> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features (Javascript), Gadget Rendering Server (Java), Gadget Rendering Server (PHP)
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup).patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Updated: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

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

Kevin Brown updated SHINDIG-197:
--------------------------------

    Component/s: Gadget Rendering Server (PHP)
                 Gadget Rendering Server (Java)

> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features (Javascript), Gadget Rendering Server (Java), Gadget Rendering Server (PHP)
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup).patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Updated: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

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

Louis Ryan updated SHINDIG-197:
-------------------------------

    Attachment:     (was: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup).patch)

> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features (Javascript), Gadget Rendering Server (Java), Gadget Rendering Server (PHP)
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup)1.patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Commented: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

Posted by "Cassie Doll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590037#action_12590037 ] 

Cassie Doll commented on SHINDIG-197:
-------------------------------------

Louis - this latest patch only seems to have one file in it... the Auth.java class. 
it looks good besides the fact that you need to put brackets around your one liner if statement :)

> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features (Javascript), Gadget Rendering Server (Java), Gadget Rendering Server (PHP)
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup)1.patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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


[jira] Commented: (SHINDIG-197) Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589830#action_12589830 ] 

Kevin Brown commented on SHINDIG-197:
-------------------------------------

> Not sure what you mean here. We still need to annotate if we want the
> receiving side of the injection to control whats bound, if not then we
> should eliminate the annotations altogether and control binding in the
> module. In general I'd prefer to keep using annotations and have simpler
> interfaces. ProxiedContentFetcher doesnt seem to be used anywhere and could
> just be removed.

Whenever there's a unique interface present, the annotation is unnecessary. The annotation was only there to disambiguate between multiple potential implementations of the same interface (such as @GadgetSpecFetcher and @MessageBundleFetcher). At the time I didn't want to add interfaces because the common case seemed to be that the same fetcher would be recycled for a lot of things in the default case, but I wanted to leave open the possibility of using custom implementations for different uses. I know we needed this for Google, and I assumed others would need similar functionality as well.

> I think this belongs in spec so we avoid forward-dependency nastiness from
> spec into implementation code. Move to top-level in spec as Auth.

I don't think that's appropriate either, because it's going to be used by non-gadget things ultimately (including the RESTful API). The only appropriate place I can see for it is with other authentication-related things, which ultimately belong in the new "common" sub-project (currently org.apache.shindig.gadgets.oauth, but probably renamed to org.apache.shindig.auth or security or something like that).

> Add support for authenticated/signed preloads. Refactor caching code to allow for caching of same.
> --------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-197
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-197
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Features (Javascript), Gadget Rendering Server (Java), Gadget Rendering Server (PHP)
>            Reporter: Louis Ryan
>            Assignee: Louis Ryan
>         Attachments: Introduce_support_for__authenticated_preloads_Refactored_caching_to_allow_for_caching_of_signed_requests_(lots_of_cleanup)1.patch
>
>
> This is a pretty extensive change, the first part adds support for an 'authz' attribute to the Preload element as part of the spec. THIS IS A SPEC ENHANCEMENT!
> The second part adds a reworking of the Caching code to separate the caching interface from the fetcher interface, encapsulate cacheability checking and generally make to code cleaner and more manageable.

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