|
Re: Jetspeed Authorization: msg#00059jetspeed-dev-portals.apache.org
On Jul 28, 2009, at 8:20 AM, Deepak Kaimal wrote: We are in the process of trying to integrate Jetspeed2 with OpenSSO for both Authentication (SSO) and Authorization. We have been successful in the authentication piece, but I have not been able to figure out how to switch out the authorization piece. The SecurityAccessController delegates its security checks. Looking at the SecurityAccessController default impl: public boolean checkPortletAccess(PortletDefinition portlet, int mask) { if (portlet == null) return false; if (securityMode == SecurityAccessController.CONSTRAINTS) { String constraintRef = portlet.getJetspeedSecurityConstraint(); if (constraintRef == null) { constraintRef = ((PortletApplication )portlet.getApplication()).getJetspeedSecurityConstraint(); if (constraintRef == null) { return true; // allow access } } String actions = JetspeedActions.getContainerActions(mask); return pageManager.checkConstraint(constraintRef, actions); } else { try { AccessController .checkPermission ((Permission )pf.newPermission(pf.PORTLET_PERMISSION,portlet.getUniqueName(), mask)); } catch (AccessControlException ace) { return false; } return true; } } There are two Security Authorization implementations in Jetspeed: 1. Security Constraints - authorization checks are made against constraints associated with portal resources (pages, folders) 2. Java Security Policy - authorization checks are made against Jetspeed's standard Java Security Policy You can see in the code above where the SecurityAccessController checks its configuration, and delegates to either the constraints or policy authorization implementation. <!-- Security Mode: 1 = Permissions = use Jetspeed Java Security Policy 2 = Constraints = use Jetspeed (PageManager) Constraint-based Security --> <constructor-arg index="2"> <value>${portal.core.security.type}</value> </constructor-arg> So you need to look at the jetspeed.properties for the portal.core.security.type setting: #1 = Permissions = use Jetspeed Java Security Policy #2 = Constraints = use Jetspeed (PageManager) Constraint-based Securityportal.core.security.type=2 I don't recommend editing jetspeed.properties directly, but instead using the override.properties as described here: http://portals.apache.org/jetspeed-2/deployguide/jetspeed-properties.html http://portals.apache.org/jetspeed-2/deployguide/override-properties.html You can read more about constraints vs permissions here: http://portals.apache.org/jetspeed-2/deployguide/security-config.html
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |