Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(280)

Issue 153047: "security-token" as feature (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 10 months ago by johnfargo
Modified:
15 years, 10 months ago
Reviewers:
shindig.remailer
Base URL:
http://svn.apache.org/repos/asf/incubator/shindig/trunk/
Visibility:
Public.

Description

This patch defines a new feature, "security-token", whose purpose is to serve as the definitive signal indicating when a gadget requires a security token. At present, this determination is made via a number of heuristics. The implementation in this patch codifies these rules in a central location: * Gadget includes feature opensocial-* * Gadget includes feature osapi * Gadget has <OAuth> tag Still unaccounted-for: signed fetch via gadgets.io.makeRequest. The security-token feature in turn has two dependencies, for separate reasons: 1. "auth-refresh" At present, in order to support security token refreshing, a container must know (via similar heuristics to above) to append &libs=auth-refresh to a gadget render, which forces inclusion of the auth-refresh gadgets.rpc handler. With this change, the JS is included automatically when a security token is needed. 2. "locked-domain" Without this change, locked domain is enforced only when actively opted-in by the gadget (the code performs a transitive closure of dependencies to discern locked-domain qualification, but no features actually have this dependency in Shindig). This leads to a scenario in which a gadget may be rendered on an insecure domain. In order to prevent a large number of gadgets from suddenly rendering on locked-domain without the rendering party's explicit knowledge, the patch includes a provision forcing opt-in to transitive locked-domain support. Note, this causes non-Shindig features with locked-domain dependencies to no longer render on locked-domain! For this reason, and in general due to locked-domain implications, I'm especially keen to hear others' opinion on the strategy as implemented.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -23 lines) Patch
features/src/main/javascript/features/features.txt View 1 chunk +1 line, -0 lines 0 comments Download
features/src/main/javascript/features/locked-domain/feature.xml View 1 chunk +0 lines, -4 lines 0 comments Download
features/src/main/javascript/features/opensocial-current/feature.xml View 1 chunk +1 line, -0 lines 0 comments Download
features/src/main/javascript/features/opensocial-jsonrpc/feature.xml View 1 chunk +1 line, -0 lines 0 comments Download
features/src/main/javascript/features/opensocial-templates/feature.xml View 1 chunk +1 line, -0 lines 0 comments Download
features/src/main/javascript/features/osapi/feature.xml View 1 chunk +1 line, -0 lines 0 comments Download
features/src/main/javascript/features/security-token/feature.xml View 1 chunk +47 lines, -0 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/Gadget.java View 1 chunk +1 line, -2 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/HashLockedDomainService.java View 3 chunks +23 lines, -1 line 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/Feature.java View 1 chunk +4 lines, -3 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/ModulePrefs.java View 6 chunks +20 lines, -2 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/HashLockedDomainServiceTest.java View 4 chunks +45 lines, -11 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ModulePrefsTest.java View 1 chunk +37 lines, -0 lines 0 comments Download

Messages

Total messages: 1
johnfargo
15 years, 10 months ago (2009-11-11 01:26:09 UTC) #1

          
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b