Added title and auther for AA classes.
authordousti <dousti@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 24 Jun 2002 20:59:23 +0000 (20:59 +0000)
committerdousti <dousti@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 24 Jun 2002 20:59:23 +0000 (20:59 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@179 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

21 files changed:
src/edu/internet2/middleware/shibboleth/aa/AAException.java
src/edu/internet2/middleware/shibboleth/aa/AAPermissionException.java
src/edu/internet2/middleware/shibboleth/aa/AAResponder.java
src/edu/internet2/middleware/shibboleth/aa/AASaml.java
src/edu/internet2/middleware/shibboleth/aa/AAServlet.java
src/edu/internet2/middleware/shibboleth/aa/AA_Acl.java
src/edu/internet2/middleware/shibboleth/aa/AA_AclEntry.java
src/edu/internet2/middleware/shibboleth/aa/AA_Identity.java
src/edu/internet2/middleware/shibboleth/aa/AA_Permission.java
src/edu/internet2/middleware/shibboleth/aa/Arp.java
src/edu/internet2/middleware/shibboleth/aa/ArpAttribute.java
src/edu/internet2/middleware/shibboleth/aa/ArpCore.java
src/edu/internet2/middleware/shibboleth/aa/ArpFactory.java
src/edu/internet2/middleware/shibboleth/aa/ArpFileFactory.java
src/edu/internet2/middleware/shibboleth/aa/ArpFilter.java
src/edu/internet2/middleware/shibboleth/aa/ArpFilterValue.java
src/edu/internet2/middleware/shibboleth/aa/ArpRepository.java
src/edu/internet2/middleware/shibboleth/aa/ArpResource.java
src/edu/internet2/middleware/shibboleth/aa/ArpShar.java
src/edu/internet2/middleware/shibboleth/aa/ShibAttribute.java
src/edu/internet2/middleware/shibboleth/aa/TName.java

index 0b248b6..383c94b 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  General Exception for AA problems
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 public class AAException extends Exception{
     String msg;
     public AAException(String s){
index eb7d279..e86aca3 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Any Permission Problem accessing ARPs
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 public class AAPermissionException extends Exception{
     String msg;
     AAPermissionException(String s){
index e25f217..59f1d9b 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Main logic that decides what to release 
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.io.*;
 import java.util.*;
 import java.lang.reflect.*;
index 4ba52f8..5996482 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  SAML Layer for AA
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.util.*;
 import java.io.IOException;
 import javax.servlet.*;
index 3b7913d..ca98b9c 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Handles Initialization and incoming requests to AA
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.io.*;
 import java.util.*;
 import javax.servlet.*;
@@ -9,6 +18,7 @@ import javax.naming.directory.*;
 import org.opensaml.*;
 import org.w3c.dom.*;
 import edu.internet2.middleware.shibboleth.*;
+import edu.internet2.middleware.shibboleth.common.*;
 import edu.internet2.middleware.shibboleth.hs.*;
 import edu.internet2.middleware.eduPerson.*;
 import org.apache.log4j.Logger;
@@ -98,11 +108,7 @@ public class AAServlet extends HttpServlet {
            log.info("AA: issuer:"+issuedBy);
            log.info("AA: shar:"+shar);
 
-           // get HS and convert handle to userName
-           ServletConfig sc = getServletConfig();
-           ServletContext sctx = sc.getServletContext(); 
-           hrf = (HandleRepositoryFactory)sctx.getAttribute("HandleRepository");
-           log.debug("Context aTTR: "+sctx.getAttribute("HandleRepository"));
+           hrf = getHandleRepository();
 
            if(handle.equalsIgnoreCase("foo")){
                // for testing only
@@ -153,4 +159,26 @@ public class AAServlet extends HttpServlet {
        }
     }
 
+
+    private synchronized HandleRepositoryFactory getHandleRepository()
+       throws HandleException{
+
+       ServletConfig sc = getServletConfig();
+       ServletContext sctx = sc.getServletContext(); 
+       HandleRepositoryFactory hrf = (HandleRepositoryFactory)sctx.getAttribute("HandleRepository");
+
+       log.debug("Context attribute for HandleRepository: "+hrf);
+           
+           
+       if(hrf == null){
+           // make one
+           String repositoryType = this.getServletContext().getInitParameter("repository");
+           hrf = HandleRepositoryFactory.getInstance(                                                Constants.POLICY_CLUBSHIB, 
+                                                                                                     repositoryType,
+                                                                                                     this );
+       }
+       return hrf;
+    }
+
+
 }
index c92d052..b4ba886 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Access Control List for ARPs
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.util.*;
 import java.io.*;
 import java.security.acl.*;
index 7add833..4947149 100755 (executable)
@@ -1,5 +1,13 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Access Control List Entry for ARPs
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
 import java.util.*;
 import java.io.*;
 import java.security.acl.*;
index ccd3acd..92cc68a 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Simple Identity class to get Access Control for  ARPs going.
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.security.*;
 import java.io.*;
 
index 55d10d7..045d689 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Simple permissions on ARPs
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.security.acl.*;
 import java.io.*;
 public class AA_Permission implements java.security.acl.Permission, Serializable{
index d05491c..7535530 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Attribute Release Policy for a User
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.io.*;
 import java.util.*;
 import java.security.Principal;
index ad9964e..f19f001 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Attribute node in ARP tree.
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.io.*;
 import java.util.*;
 import javax.naming.directory.*;
index 009b0be..7155166 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Core structure for all ARP nodes
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.util.Enumeration;
 import java.security.Principal;
 import java.security.acl.*;
index 17fb1ea..cfa9c75 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Common interface for all ARP repositories.
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 public interface ArpFactory{
 
 
index 0cf4e75..f9c9585 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  File implementation of a repository for ARPs
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.io.*;
 import java.util.Date;
 import java.security.acl.*;
index 72dfd4e..c050431 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Filter node in the ARP tree.
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.io.*;
 import java.util.*;
 public class ArpFilter implements Serializable{
index c7fb91d..39c8142 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  ARP representation of an attribute value
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.io.*;
 public class ArpFilterValue implements Serializable{
 
index f2cf6dd..0413f70 100755 (executable)
@@ -1,5 +1,13 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Factory for generating ARP managers/factories.
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
 public class ArpRepository{
 
 
index f204229..dc04db7 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Resource (or URL) node in the ARP tree.
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import java.io.*;
 import java.util.*;
 import java.security.acl.*;
index 74d3b84..970c03b 100755 (executable)
@@ -1,5 +1,13 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Shar node in ARP tree.
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
 import java.io.*;
 import java.util.*;
 import java.security.acl.*;
index 8a5b62c..0f8373c 100755 (executable)
@@ -1,5 +1,14 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  a Common interface among all attributes that are released by AA
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
+
 import org.opensaml.*;
 
 public interface ShibAttribute{
index 3d8438d..d2250a3 100755 (executable)
@@ -1,5 +1,13 @@
 package edu.internet2.middleware.shibboleth.aa;
 
+/**
+ *  Attribute Authority & Release Policy
+ *  Tokenized form of a resource.
+ *
+ * @author     Parviz Dousti (dousti@cmu.edu)
+ * @created    June, 2002
+ */
+
 import java.io.*;
 import java.util.*;
 class TName implements Serializable{