continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r449740 - in /maven/continuum/branches/rbac-integration: ./ continuum-security/ continuum-security/src/main/java/org/apache/maven/continuum/security/ continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ continuum-se...
Date Mon, 25 Sep 2006 17:04:57 GMT
Author: jmcconnell
Date: Mon Sep 25 10:04:56 2006
New Revision: 449740

URL: http://svn.apache.org/viewvc?view=rev&rev=449740
Log:
added the ContinuumSystemAdministrator role profile and the merging environment check to sync
the ContinuumSystemAdministrator role to a more global SystemAdministrator role

Added:
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
  (contents, props changed)
      - copied, changed from r449106, maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumRoleConstants.java
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleProfileManager.java
  (with props)
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministrator.java
  (with props)
    maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/
    maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/META-INF/
    maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/META-INF/plexus/
    maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/META-INF/plexus/components.xml
  (with props)
    maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/
    maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/
    maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/RoleProfileEnvironmentCheck.java
  (with props)
Removed:
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumRoleConstants.java
Modified:
    maven/continuum/branches/rbac-integration/continuum-security/pom.xml
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupDeveloperDynamicRoleProfile.java
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupUserDynamicRoleProfile.java
    maven/continuum/branches/rbac-integration/continuum-webapp/pom.xml
    maven/continuum/branches/rbac-integration/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
    maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/navigations/Menu.jsp
    maven/continuum/branches/rbac-integration/pom.xml

Modified: maven/continuum/branches/rbac-integration/continuum-security/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/pom.xml?view=diff&rev=449740&r1=449739&r2=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/pom.xml (original)
+++ maven/continuum/branches/rbac-integration/continuum-security/pom.xml Mon Sep 25 10:04:56
2006
@@ -16,10 +16,13 @@
     </dependency>
   </dependencies>
   <build>
+    <!--
+    need to fix pulling requirements from other artifacts
     <plugins>
       <plugin>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-maven-plugin</artifactId>
+        <version>1.3-SNAPSHOT</version>
         <executions>
           <execution>
             <id>generate</id>
@@ -30,6 +33,7 @@
         </executions>
       </plugin>
     </plugins>
+    -->
   </build>
 </project>
 

Copied: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
(from r449106, maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumRoleConstants.java)
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java?view=diff&rev=449740&p1=maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumRoleConstants.java&r1=449106&p2=maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java&r2=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumRoleConstants.java
(original)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
Mon Sep 25 10:04:56 2006
@@ -1,4 +1,4 @@
-package org.apache.maven.continuum.security.profile;
+package org.apache.maven.continuum.security;
 /*
  * Copyright 2006 The Apache Software Foundation.
  *

Propchange: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleProfileManager.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleProfileManager.java?view=auto&rev=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleProfileManager.java
(added)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleProfileManager.java
Mon Sep 25 10:04:56 2006
@@ -0,0 +1,42 @@
+package org.apache.maven.continuum.security;
+
+import org.codehaus.plexus.rbac.profile.DefaultRoleProfileManager;
+import org.codehaus.plexus.rbac.profile.RoleProfileException;
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ContinuumRoleProfileManager:
+ *
+ * @author: Jesse McConnell <jmcconnell@apache.org>
+ * @version: $ID:$
+ *
+ * @plexus.component
+ *   role="org.codehaus.plexus.rbac.profile.RoleProfileManager"
+ *   role-hint="continuum"
+ */
+public class ContinuumRoleProfileManager
+    extends DefaultRoleProfileManager
+{
+
+    public void initialize()
+        throws RoleProfileException
+    {
+        mergeRoleProfiles( "system-administrator", "continuum-system-administrator" );
+
+        setInitialized( true );
+    }
+}

Propchange: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleProfileManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministrator.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministrator.java?view=auto&rev=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministrator.java
(added)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministrator.java
Mon Sep 25 10:04:56 2006
@@ -0,0 +1,44 @@
+package org.apache.maven.continuum.security.profile;
+
+import org.codehaus.plexus.rbac.profile.AbstractRoleProfile;
+import org.codehaus.plexus.rbac.profile.RoleProfileConstants;
+
+import java.util.List;
+import java.util.Collections;
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ContinuumSystemAdministrator:
+ *
+ * @author: Jesse McConnell <jmcconnell@apache.org>
+ * @version: $ID:$
+ */
+public class ContinuumSystemAdministrator
+    extends AbstractRoleProfile
+{
+
+
+    public String getRoleName()
+    {
+        return RoleProfileConstants.SYSTEM_ADMINISTRATOR_ROLE;
+    }
+
+    public List getOperations()
+    {
+        return Collections.EMPTY_LIST;
+    }
+}

Propchange: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministrator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupDeveloperDynamicRoleProfile.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupDeveloperDynamicRoleProfile.java?view=diff&rev=449740&r1=449739&r2=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupDeveloperDynamicRoleProfile.java
(original)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupDeveloperDynamicRoleProfile.java
Mon Sep 25 10:04:56 2006
@@ -1,6 +1,7 @@
 package org.apache.maven.continuum.security.profile;
 
 import org.codehaus.plexus.rbac.profile.AbstractDynamicRoleProfile;
+import org.apache.maven.continuum.security.ContinuumRoleConstants;
 
 import java.util.List;
 import java.util.ArrayList;

Modified: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupUserDynamicRoleProfile.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupUserDynamicRoleProfile.java?view=diff&rev=449740&r1=449739&r2=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupUserDynamicRoleProfile.java
(original)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupUserDynamicRoleProfile.java
Mon Sep 25 10:04:56 2006
@@ -1,6 +1,7 @@
 package org.apache.maven.continuum.security.profile;
 
 import org.codehaus.plexus.rbac.profile.AbstractDynamicRoleProfile;
+import org.apache.maven.continuum.security.ContinuumRoleConstants;
 
 import java.util.List;
 import java.util.ArrayList;

Added: maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/META-INF/plexus/components.xml?view=auto&rev=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/META-INF/plexus/components.xml
(added)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/META-INF/plexus/components.xml
Mon Sep 25 10:04:56 2006
@@ -0,0 +1,24 @@
+<component-set>
+  <components>
+    <component>
+      <role>org.codehaus.plexus.rbac.profile.RoleProfileManager</role>
+      <role-hint>continuum</role-hint>
+      <implementation>org.apache.maven.continuum.security.ContinuumRoleProfileManager</implementation>
+      <description>ContinuumRoleProfileManager:</description>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.PlexusContainer</role>
+          <field-name>container</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.rbac.profile.RoleProfile</role>
+          <field-name>knownRoleProfiles</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.rbac.profile.DynamicRoleProfile</role>
+          <field-name>knownDynamicRoleProfiles</field-name>
+        </requirement>
+      </requirements>
+    </component>
+  </components>
+</component-set>

Propchange: maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/continuum/branches/rbac-integration/continuum-webapp/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-webapp/pom.xml?view=diff&rev=449740&r1=449739&r2=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-webapp/pom.xml (original)
+++ maven/continuum/branches/rbac-integration/continuum-webapp/pom.xml Mon Sep 25 10:04:56
2006
@@ -158,6 +158,10 @@
       <groupId>org.apache.maven.continuum</groupId>
       <artifactId>continuum-core</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-security</artifactId>
+    </dependency>
     <dependency> <!-- added since depMgt doesn't override imported dependencies
-->
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>

Added: maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/RoleProfileEnvironmentCheck.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/RoleProfileEnvironmentCheck.java?view=auto&rev=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/RoleProfileEnvironmentCheck.java
(added)
+++ maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/RoleProfileEnvironmentCheck.java
Mon Sep 25 10:04:56 2006
@@ -0,0 +1,58 @@
+package org.apache.maven.continuum.web.checks.security;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.codehaus.plexus.security.system.check.EnvironmentCheck;
+import org.codehaus.plexus.rbac.profile.RoleProfileManager;
+import org.codehaus.plexus.rbac.profile.RoleProfileException;
+
+import java.util.List;
+
+/**
+ * RoleProfileEnvironmentCheck:
+ *
+ * @author: Jesse McConnell <jmcconnell@apache.org>
+ * @version: $ID:$
+ *
+ * @plexus.component
+ *   role="org.codehaus.plexus.security.system.check.EnvironmentCheck"
+ *   role-hint="continuum-role-profile-check"
+ */
+public class RoleProfileEnvironmentCheck
+    implements EnvironmentCheck
+{
+    /**
+     * @plexus.requirement role-hint="continuum"
+     */
+    private RoleProfileManager continuumRoleManager;
+
+
+    public void validateEnvironment( List list )
+    {
+        try
+        {
+            if ( !continuumRoleManager.isInitialized() )
+            {
+                continuumRoleManager.initialize();
+            }
+        }
+        catch ( RoleProfileException rpe )
+        {
+            list.add( "error inititalizing the continuum role manager" );
+        }
+    }
+}

Propchange: maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/RoleProfileEnvironmentCheck.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/continuum/branches/rbac-integration/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-webapp/src/main/resources/META-INF/plexus/application.xml?view=diff&rev=449740&r1=449739&r2=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
(original)
+++ maven/continuum/branches/rbac-integration/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
Mon Sep 25 10:04:56 2006
@@ -454,6 +454,45 @@
         </levels>
       </configuration>
     </component>
+
+
+    <!-- plexus security components -->
+         <component>
+          <role>org.codehaus.plexus.security.system.SecuritySystem</role>
+          <implementation>org.codehaus.plexus.security.system.DefaultSecuritySystem</implementation>
+          <role-hint>default</role-hint>
+          <requirements>
+            <requirement>
+              <role>org.codehaus.plexus.security.authentication.AuthenticationManager</role>
+              <role-hint>default</role-hint>
+            </requirement>
+            <requirement>
+              <role>org.codehaus.plexus.security.authorization.Authorizer</role>
+              <role-hint>rbac</role-hint>
+            </requirement>
+            <requirement>
+              <role>org.codehaus.plexus.security.user.UserManager</role>
+              <role-hint>jdo</role-hint>
+            </requirement>
+          </requirements>
+        </component>
+
+        <component>
+          <role>org.codehaus.plexus.security.authorization.Authorizer</role>
+          <role-hint>rbac</role-hint>
+          <implementation>org.codehaus.plexus.security.authorization.rbac.RbacAuthorizer</implementation>
+          <requirements>
+            <requirement>
+              <role>org.codehaus.plexus.security.rbac.RBACManager</role>
+              <role-hint>jdo</role-hint>
+            </requirement>
+            <requirement>
+              <role>org.codehaus.plexus.security.authorization.rbac.evaluator.PermissionEvaluator</role>
+              <role-hint>default</role-hint>
+            </requirement>
+          </requirements>
+        </component>
+
   </components>
 
 </plexus>

Modified: maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/navigations/Menu.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/navigations/Menu.jsp?view=diff&rev=449740&r1=449739&r2=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/navigations/Menu.jsp
(original)
+++ maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/navigations/Menu.jsp
Mon Sep 25 10:04:56 2006
@@ -1,7 +1,6 @@
 <%@ taglib uri="/webwork" prefix="ww" %>
 <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
 <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %>
-<%@ taglib uri="continuum" prefix="c1" %>
 <ww:i18n name="localization.Continuum">
 <div id="navcolum">
   <div id="projectmenu" class="toolgroup">
@@ -36,18 +35,13 @@
   <div id="projectmenu" class="toolgroup">
     <div class="label"><ww:text name="menu.administration"/></div>
     <div>
-      <c1:ifAuthorized permission="manageSchedule">
         <div class="body">
           <a href="<ww:url value="schedules.action"/>"><ww:text name="menu.administration.schedules"/></a>
         </div>
-      </c1:ifAuthorized>
-      <c1:ifAuthorized permission="manageConfiguration">
         <div class="body">
           <a href="<ww:url value="configuration!default.action"/>"><ww:text
               name="menu.administration.configuration"/></a>
         </div>
-      </c1:ifAuthorized>
-      <c1:ifAuthorized permission="manageUsers">
         <div class="body">
           <ww:url id="userManagementUrl" action="users"/>
           <ww:a href="%{userManagementUrl}">Users</ww:a>
@@ -56,7 +50,6 @@
           <ww:url id="userGroupManagementUrl" action="userGroups"/>
           <ww:a href="%{userGroupManagementUrl}">User Groups</ww:a>
         </div>
-      </c1:ifAuthorized>
     </div>
   </div>
   <div id="projectmenu" class="toolgroup">

Modified: maven/continuum/branches/rbac-integration/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/pom.xml?view=diff&rev=449740&r1=449739&r2=449740
==============================================================================
--- maven/continuum/branches/rbac-integration/pom.xml (original)
+++ maven/continuum/branches/rbac-integration/pom.xml Mon Sep 25 10:04:56 2006
@@ -292,6 +292,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.maven.continuum</groupId>
+        <artifactId>continuum-security</artifactId>
+        <version>${pom.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.continuum</groupId>
         <artifactId>continuum-webapp</artifactId>
         <version>${pom.version}</version>
         <type>war</type>



Mime
View raw message