AuthZ in K2
http://sakai-kernel.googlegroups.com/web/Authorization.pdf
Relational Index Maintenance
http://sakai-kernel.googlegroups.com/web/RelationalIndexes.pdf
Ian
I believe that prioritizing this use case was a major flaw in K1's
approach to "realms": it doesn't match the vast majority of real-world
scenarios I've seen, and, given the number of permissions and the number
of groups we're dealing with, it's hard to picture how it could be
administered easily enough to *become* a common use case. What we more
typically find (if we abstract from Sakai's current design to the
functionality required for the most common use cases) is an
installation-wide mapping of roles to permissions. For more detail, see:
http://jira.sakaiproject.org/jira/browse/SAK-2660
Prioritizing this simpler and more common scenario might help with
scalability and UX constraints.
Best,
Ray
I think what is being asked for is either role or group inheritance.
What's not clear is the mechanism to deny an inherited grant.
Ian
On 6 Jan 2009, at 06:54, Michael Korcuska wrote:
* Group-specific role-permission maps are such an edge case that it
might not even be worth supporting them in the out-of-the-box core system.
* This isn't just a matter of improved performance and data storage --
it's also a matter of user-visible functionality (the current Sakai
permissions system is too complex and counterintuitive to show
instructors) and support costs (currently we have to write special and
fairly complex SQL scripts for every Sakai upgrade).
Best,
Ray
Figuring out how to deal with such issues is why hereabouts we believe
that group-and-role management is worthy of its own full-scale project
and why we're putting resources into it. As I've said before, so far as
core services are concerned, this interesting aspect of authz is pretty
much the only difference between higher education and other areas I've
worked.
Best,
Ray
On 7 Jan 2009, at 13:14, John Norman wrote:
> As I understand it, Ian is still aiming for something like 'ultimate
> flexibility' so we will have choices about how we do things. That
> doesn't mean all of that flexibility needs to be exposed to users and
> so there are 2 levels at which the discussion could take place; what
> should the system be capable of doing, and what should be the
> functionality to which users are exposed?
Thats my intention, I am listening to this discussion, validating the
model as it stands and adjusting where necessary. So far I haven't
seen anything that worries me. (although I need to implement some
additions).
For me, as always, the issue is a UX that is simple to use and
powerful, whatever is done deep down in the kernel must not prevent
that.
Ian
As you noted in a later message, this is a user-to-permission mapping,
and I'm only advocating the removal of (group-plus-role)-to-permission
mapping. No one has complained much about how difficult it is to take
advantage of Sakai 2.*'s ability to customize role-to-permission
mappings, and that's because no one wants it much -- the few cases I've
heard of would have been more directly addressed by user-to-permission
customization. End users and administrators expect installation-wide
roles to *mean* something, and in authz terms what a role means is
permissions.
> As for the support costs, that's a good point that I don't understand
> well enough. Not asking for an explanation, mind you.
Well, due to some comments further down the stream, you're gonna get one
anyway. :) These are pulled from SAK-2660.
1. Pretty much every time we add a new tool to Sakai, new permissions
are added to the system. They need to get associated with the standard
role-to-permission templates in our upgrade SQL scripts:
INSERT INTO SAKAI_REALM_FUNCTION VALUES
(SAKAI_REALM_FUNCTION_SEQ.NEXTVAL, 'osp.wizard.view');
...
INSERT INTO SAKAI_REALM_RL_FN VALUES((select REALM_KEY from SAKAI_REALM
where REALM_ID = '!site.template'), (select ROLE_KEY from
SAKAI_REALM_ROLE where ROLE_NAME = 'access'), (select FUNCTION_KEY from
SAKAI_REALM_FUNCTION where FUNCTION_NAME = 'osp.wizard.view'));
...
INSERT INTO SAKAI_REALM_RL_FN VALUES((select REALM_KEY from SAKAI_REALM
where REALM_ID = '!site.template.course'), (select ROLE_KEY from
SAKAI_REALM_ROLE where ROLE_NAME = 'Student'), (select FUNCTION_KEY from
SAKAI_REALM_FUNCTION where FUNCTION_NAME = 'osp.wizard.view'));
...
INSERT INTO SAKAI_REALM_RL_FN VALUES((select REALM_KEY from SAKAI_REALM
where REALM_ID = '!site.template.course'), (select ROLE_KEY from
SAKAI_REALM_ROLE where ROLE_NAME = 'Teaching Assistant'), (select
FUNCTION_KEY from SAKAI_REALM_FUNCTION where FUNCTION_NAME =
'osp.wizard.view'));
...
INSERT INTO SAKAI_REALM_RL_FN VALUES((select REALM_KEY from SAKAI_REALM
where REALM_ID = '!group.template'), (select ROLE_KEY from
SAKAI_REALM_ROLE where ROLE_NAME = 'access'), (select FUNCTION_KEY from
SAKAI_REALM_FUNCTION where FUNCTION_NAME = 'osp.wizard.view'));
...
INSERT INTO SAKAI_REALM_RL_FN VALUES((select REALM_KEY from SAKAI_REALM
where REALM_ID = '!group.template.course'), (select ROLE_KEY from
SAKAI_REALM_ROLE where ROLE_NAME = 'Student'), (select FUNCTION_KEY from
SAKAI_REALM_FUNCTION where FUNCTION_NAME = 'osp.wizard.view'));
... well, that's probably enough to give you an idea. However these are
*only* the templates (and therefore only apply to new sites), and *only*
the default out-of-the-box roles. As a result, as part of the upgrade,
support staff get stuck with the job of understanding the intent of
these none-too-transparent codes and writing our own SQL scripts or
utility programs to add the new records across our DB as seems applicable.
2. The institution or support staff decide that we need a new role with
a new set of permissions. As a real-life example, we might want to add a
"Head TA" role or a "Concurrent Student" role to an existing
installation. We can add the new role to the templates easily enough,
but it will not show up in any existing sites -- which means that
instructors and admins who want to add students will see different
things in the same site type depending on when the site was created.
3. A role's permissions needs to be changed due to a change in security
policy (for example, "SIS is going to pull the plug unless we
immediately block students from seeing other student's roster photos")
or to having misunderstood the meaning of a permission in the first
place. When this real-life problem comes up, it needs to be solved in a
hurry. But there is currently no support for it in Sakai. In fact,
customized role-to-permission mappings *conflict* with predictable
handling of this requirement: Are we supposed to touch those customized
mappings or leave them alone? What was the customizer's intent?
4. Tool or service developers may need to add new permissions to reflect
new capabilities. They may even decide to start treating an existing
permission in a completely different way. (<irony>Because after all,
it's just a detail of their internal implementation, right?</irony>)
This is a more expensive variant of scenario (1): we might be able to
delay adding new permissions for a whole new tool to existing sites that
don't yet have that tool, but we can't allow the software in existing
sites to start handling existing members incorrectly.
Best,
Ray
On 1/7/2009 2:26 AM, Michael Korcuska wrote:
> I'm not sure I agree that the user-facing issues are a key factor
> here, Ray. While I do agree that Sakai's permission set is so complex
> that it can't simply be exposed to end users, there are certain
> particular cases that are likely to come up over and over again that
> could be exposed to end users in a straightforward way. For example,
> give this student permission to post announcements or create a forum
> post or whatever.
As you noted in a later message, this is a user-to-permission mapping,
and I'm only advocating the removal of (group-plus-role)-to-permission
mapping. No one has complained much about how difficult it is to take
advantage of Sakai 2.*'s ability to customize role-to-permission
mappings, and that's because no one wants it much -- the few cases I've
heard of would have been more directly addressed by user-to-permission
customization. End users and administrators expect installation-wide
roles to *mean* something, and in authz terms what a role means is
permissions.
> As for the support costs, that's a good point that I don't understand
> well enough. Not asking for an explanation, mind you.
Well, due to some comments further down the stream, you're gonna get one
instructors and admins who want to add site members will see different
things in the same site type depending on when the site was created.
3. A role's permissions needs to be changed due to a change in security
policy (for example, "SIS is going to pull the plug unless we
immediately block students from seeing other students' roster photos")
or to having misunderstood the meaning of a permission in the first
place. When this real-life problem comes up, it needs to be solved in a
hurry. But there is currently no support for it in Sakai. In fact,
customized role-to-permission mappings *conflict* with predictable
handling of this requirement: Are we supposed to touch those customized
mappings or leave them alone? What was the customizer's intent?
4. Tool or service developers may need to add new permissions to reflect
new capabilities. They may even decide to start treating an existing
permission in a completely different way. (<irony>Because after all,
it's just a detail of their internal implementation, right?</irony>)
This is a more expensive variant of scenario (1): we might be able to
delay adding new permissions for a whole new tool to existing sites that
don't yet have that tool, but we can't allow the software in existing
sites to start handling existing members incorrectly.
Best,
Ray
> On Jan 6, 2009, at 18:21, Ray Davis wrote:
I've updated the JIRA ticket to include Cambridge's use case.
Thanks,
Ray
If I can try to summarize the high-level requirements: Because the lists
of roles and permissions aren't static (and because the list of all
permissions is very long), it's important that the number of independent
role-to-permission mappings in the system not grow exponentially.
Otherwise it becomes too difficult to manage installation-wide changes
to roles and permissions.
We've established that one institution-wide set of mappings (which is
what I suggested as a starting goal) is too few. Cambridge will want
some organization-scoped sets of mappings and some research-group-scoped
sets of mappings; quite a few universities will probably want "site
types" (like Sakai's current course sites, project sites, and portfolio
sites) that use different sets of roles or interpret institution-wide
roles somewhat differently.
On the other hand, we've also established (in production) that an
independent set of role-to-permission mappings for every single site is
too many. (Which means that an independent set for every single *group*
-- every discussion section, every study group, etc. -- would be *way*
too many.)
So yes, speaking as another guy who's supposed to be staying out of this
implementation :) , I agree it sounds a lot like an "inheritance with
explicit override as needed but with the assumption that override points
are rare" model.
Best,
Ray