Thanks for your comments Chris.  Since the wiki isn't great with threaded 
discussion, I'll pull your comments and questions into this thread so we can 
discuss.

-----------------

> When registering an agent, the "owning" organization must be set on the 
> registration. Also, by convention, the role allowed to schedule the agent is 
> set to "ROLE_{agent identifier}_CAPTURE_ADMIN".
> 
>> Not sure I understand what registration is.  Right now a CA just starts 
>> sending info to the server, there is no formal registration process.  Does 
>> this change?  What does it mean to be an agent who has no one registered 
>> against it?  Is there a catchall role, or is the agent just unscheduable 
>> until someone is registered against it?
>> 

By register, I just meant sending info to the server.  The capture admin 
service keeps track of agents in the "capture_agent_state" database table, 
where the name of the CA is the primary key.  Formally, I'm proposing we add an 
"organization_id" to this table.

In terms of roles, I agree that we should have a role that allows someone to 
manage all capture agents.  Perhaps "ROLE_CAPTURE_ADMIN" (with no specific CA 
identifier).  Then the query for finding all of the CAs that the current user 
can schedule would look like this:

select agent.name, agent.state from capture_agent_state agent where 
organization_id=? and upper(agent.name) in (?, ?, ?);

or this if the user has ROLE_CAPTURE_ADMIN

select agent.name, agent.state from capture_agent_state agent where 
organization_id=?;


>> Also, because we have some arbitrary identifiers in here, can we put all 
>> namespacing items at the front and follow a convention (I would prefer a . 
>> convention but _ is fine, I don't think we need to separate CAPTURE and 
>> AGENT, and I like . just because we could use prefixes from properties file 
>> to give it a more standard l&f).  So something like 
>> org.opencastproject.roles.capture.MYIDENTIFIER?  ymmv


We should probably change the primary key in capture_agent_state to be a 
composite of 'name' and 'organization_id' so multiple organizations hosted on 
this matterhorn server cluster don't have to worry about namespacing.  Role 
namespacing isn't necessary, since we use the organization identifier 
separately.  We need to be very careful not to put too many restrictions on 
role identifiers, since many will come from the organization itself.

> Each series must contain an "owning" organization. This is set by the 
> organization of the user who created the series.
> 
>> Similar question as to above; what does it mean to not have an owner?  I 
>> would prefer that this is standardized throughout (e.g. equates to disallow).


I suggest we set the capture_agent_state.organization_id column to not-null, 
just like the name.


> A series must contain two sets of permissions: a set of roles allowed to view 
> and/or manage the series itself, and a set of roles allowed to view and/or 
> manage the recordings associated with the series.
> In order to edit a series, the user must have one if the series' manage roles.
> In order to associate a recording (either via upload or scheduling) with a 
> series, the user must have one of the series' view roles.
> 
>> A little counter intuitive that "view" means, "upload new recording".

Right, maybe "accessible" or "usable" would be clearer.  Basically, we want to 
limit users from associating a video with "someone else's" series.

>> 
>> I think it is worth flushing out some other actions we expect admins to be 
>> interested in doing: editing a series title, changing a recordings metadata, 
>> deleting a recording, trimming a recording, uploading a new recording, 
>> scheduling a recording (requires 2 sets of permissions).  What I think would 
>> be ideal is a table describing all of the permission prefixes and what they 
>> mean.  Should we start this here?  It could turn into official docs later on.

I've been trying to avoid this for the 1.3 release, since this is more complex 
to implement and especially test.  I agree that this is where we eventually 
want to go.

>> 
>> Are roles best described as resource-based or operation-based?  I think so?
>> 

I think of a role as allowing an operation on a particular resource.  This 
doesn't scale, but it gives us most of what we want with a minimum amount of 
complexity.  And if we keep roles at the capture agent and series level, we 
won't have *that* many roles per person.

> Mediapackages submitted to ingest must be either:
> Contain a series that is known to the series service, and the user must have 
> one of the series' view roles. Or,
> The mediapackage contains no series.
> 
>> What if we are a trusted party (capture agent?)?  Do the CAs have to be in, 
>> essentially, every series to make ingestion work well?

Good point.  The trusted party must be able to view (or access or use) all 
series.

>>  Can you ingest an mp if you are in no series role (eg should we have a role 
>> that allows you to even call ingest first, followed by a roles that are 
>> evaluated as part of the ingestion process?)

URL based rules can be added to /ingest/*, but if we want to build tools that 
allow anyone to ingest media, we'll need to enforce things programmatically too.

> If no series is specified, the mediapackage must include a XACML attachment 
> describing the security for the mediapackage. Without this, we have no idea 
> who is allowed to manage (e.g. trim) or view the recording. This will be 
> problematic for vendors integrating via the inbox, for example.
> 
>> Is there a way to wildcard things?  Do operations need to access role 
>> parameters in an ad hoc manner?
>> 

I think we will eventually want operation-specific role checking, but I'd 
rather not attempt this for 1.3.

> Declarative security via URLs. Only administrative roles (such as those 
> assigned to the system account) may use the processing services directly.
> 
>> Is the admin role special in some way?  Could bob be in the admin role?  How 
>> are these services different from workflow operations?
>> 

Yes, bob could have ROLE_ADMIN.  Services are different from workflow 
operations in at least two ways: 1) services are exposed via REST and 
operations are not and 2) operations typically call multiple services, so 
operations work at a higher level.  For instance, in order to segment a video, 
the segment operation first encodes the video to a specific format (if 
necessary), then calls the video segmenter service to do the actual 
segmentation.

> Distribution credentials are registered per channel, per organization.
> Only users with ROLE_{distribution channel identifier}_DISTRIBUTOR may 
> distribute content for the organization.
> Contexts within distribution channels (e.g. playlists on YouTube, or 'sites' 
> in an LMS) are determined by the distribution channel's 
> DistributionContextStrategy.
> One context strategy may be registered per distribution channel, per 
> organization.
> The default strategies will map from a series identifier to a context.
> 
>> I don't understand multitenancy and how it fits yet.  lets say I have a chem 
>> dep and a cmpt dep.  What would the roles look like for these if they each 
>> have their own youtube channel?

Two different tenants will typically have different workflows, encoding 
profiles, and even security configurations (e.g. one uses CAS, another does 
not).  So you would probably not want two different organizations for two 
departments.  Instead, you could implement a context strategy gives different 
contexts based on the department.  Support for multiple authentication 
credentials within a single channel and a single organization is a good idea, 
but I'd like to push it off for a release post 1.3.

> This UI makes changes to the local user and role database, so a user's 
> institutional roles (e.g. Staff, Faculty) may be augmented with application 
> specific roles such as ROLE_YOUTUBE_DISTRIBUTOR.
> It is highly unlikely that institutional roles exist that map directly to 
> these kinds of application specific roles.
> 
>> What toolkit do you envision us using for roles for the default system?  
>> Would I be out of the park to suggest using ldap, and thus pushing all of 
>> the ui work for at least the initial 1.3 onto a third party package (like 
>> apache directory studio?)  We gain heirarchies, nice keying systems, 
>> presumably performance....

The Apache DS docs claim that their server is embeddable and OSGI enabled.  
Looks promising, and worth investigating!  I was originally thinking of a 
simple REST interface to our (very simple) local database tables.  Here's what 
the tables look like:

    Column    |          Type          | Modifiers 
--------------+------------------------+-----------
 username     | character varying(255) | not null
 organization | character varying(255) | 
 password     | character varying(255) | 

  Column  |          Type          | Modifiers 
----------+------------------------+-----------
 username | character varying(255) | not null
 role     | character varying(255) | 

Come to think of it, we'll also need to add org to the primary and foreign 
keys, so we don't have namespace conflicts between usernames from each 
organization.  If the embedded LDAP server works out, we can ditch these tables 
altogether.

Thanks,
Josh





On Jun 1, 2011, at 6:46 PM, Christopher Brooks wrote:

> My thoughts, comments, and questions in red at
> http://opencast.jira.com/wiki/display/MH/Authorization+Work+For+Matterhorn+1.3+%28DRAFT%29
> 
> Regards,
> 
> Chris
> _______________________________________________
> Matterhorn mailing list
> [email protected]
> http://lists.opencastproject.org/mailman/listinfo/matterhorn
> 
> 
> To unsubscribe please email
> [email protected]
> _______________________________________________

_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn


To unsubscribe please email
[email protected]
_______________________________________________

Reply via email to