From 7c7b9d023cd466c1771068badc020dab36beb553 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Thu, 5 Apr 2012 14:49:11 -0500 Subject: Removed whitespaces from Java code. Whitespaces in Java code have been removed with the following command: find . -not -path .git -name *.java -exec sed -i 's/[[:blank:]]\+$//' {} \; Ticket #134 --- .../common/src/com/netscape/cmscore/realm/ACL.java | 26 +++++------ .../src/com/netscape/cmscore/realm/ACLEntry.java | 32 ++++++------- .../com/netscape/cmscore/realm/PKIJNDIRealm.java | 52 +++++++++++----------- 3 files changed, 55 insertions(+), 55 deletions(-) (limited to 'base/common/src/com/netscape/cmscore/realm') diff --git a/base/common/src/com/netscape/cmscore/realm/ACL.java b/base/common/src/com/netscape/cmscore/realm/ACL.java index 4d7303f9d..5c7defd1d 100644 --- a/base/common/src/com/netscape/cmscore/realm/ACL.java +++ b/base/common/src/com/netscape/cmscore/realm/ACL.java @@ -29,7 +29,7 @@ import java.util.Vector; * An ACL may contain one or more ACLEntry. However, in case of multiple ACLEntry * , a subject must pass ALL of the ACLEntry evaluation for permission to be granted *

- * + * * @version $Revision$, $Date$ */ public class ACL { @@ -54,7 +54,7 @@ public class ACL { * Class constructor. * Constructs an access control list associated * with a resource name - * + * * @param name resource name * @param rights applicable rights defined for this resource * @param resourceACLs the entire ACL specification. For example: @@ -78,7 +78,7 @@ public class ACL { /** * Sets the name of the resource governed by this * access control. - * + * * @param name name of the resource */ public void setName(String name) { @@ -88,7 +88,7 @@ public class ACL { /** * Retrieves the name of the resource governed by * this access control. - * + * * @return name of the resource */ public String getName() { @@ -97,7 +97,7 @@ public class ACL { /** * Retrieves the exact string of the resourceACLs - * + * * @return resource's acl */ public String getResourceACLs() { @@ -107,7 +107,7 @@ public class ACL { /** * Sets the description of the resource governed by this * access control. - * + * * @param description Description of the protected resource */ public void setDescription(String description) { @@ -117,7 +117,7 @@ public class ACL { /** * Retrieves the description of the resource governed by * this access control. - * + * * @return Description of the protected resource */ public String getDescription() { @@ -126,7 +126,7 @@ public class ACL { /** * Adds an ACL entry to this list. - * + * * @param entry the ACLEntry to be added to this resource */ public void addEntry(ACLEntry entry) { @@ -135,7 +135,7 @@ public class ACL { /** * Returns ACL entries. - * + * * @return enumeration for the ACLEntry vector */ public Enumeration entries() { @@ -144,7 +144,7 @@ public class ACL { /** * Returns the string reprsentation. - * + * * @return the string representation of the ACL entries in the * following format: * [,,...] @@ -165,7 +165,7 @@ public class ACL { /** * Adds an rights entry to this list. - * + * * @param right The right to be added for this ACL */ public void addRight(String right) { @@ -174,7 +174,7 @@ public class ACL { /** * Tells if the permission is one of the defined "rights" - * + * * @param permission permission to be checked * @return true if it's one of the "rights"; false otherwise */ @@ -184,7 +184,7 @@ public class ACL { /** * Returns rights entries. - * + * * @return enumeration of rights defined for this ACL */ public Enumeration rights() { diff --git a/base/common/src/com/netscape/cmscore/realm/ACLEntry.java b/base/common/src/com/netscape/cmscore/realm/ACLEntry.java index 8e502b02c..e05abf0b9 100644 --- a/base/common/src/com/netscape/cmscore/realm/ACLEntry.java +++ b/base/common/src/com/netscape/cmscore/realm/ACLEntry.java @@ -24,7 +24,7 @@ import java.util.StringTokenizer; /** * A class represents an ACI entry of an access control list. *

- * + * * @version $Revision$, $Date$ */ public class ACLEntry { @@ -44,7 +44,7 @@ public class ACLEntry { /** * Checks if this ACL entry is set to negative. - * + * * @return true if this ACL entry expression is for "deny"; * false if this ACL entry expression is for "allow" */ @@ -61,9 +61,9 @@ public class ACLEntry { /** * Sets the ACL entry string - * + * * @param s string in the following format: - * + * *

      *   allow|deny (right[,right...]) attribute_expression
      * 
@@ -74,9 +74,9 @@ public class ACLEntry { /** * Gets the ACL Entry String - * + * * @return ACL Entry string in the following format: - * + * *
      *   allow|deny (right[,right...]) attribute_expression
      * 
@@ -88,7 +88,7 @@ public class ACLEntry { /** * Adds permission to this entry. Permission must be one of the * "rights" defined for each protected resource in its ACL - * + * * @param acl the acl instance that this aclEntry is associated with * @param permission one of the "rights" defined for each * protected resource in its ACL @@ -104,7 +104,7 @@ public class ACLEntry { /** * Returns a list of permissions associated with * this entry. - * + * * @return a list of permissions for this ACL entry */ public Enumeration permissions() { @@ -113,7 +113,7 @@ public class ACLEntry { /** * Sets the expression associated with this entry. - * + * * @param expressions the evaluator expressions. For example, * group="Administrators" */ @@ -123,7 +123,7 @@ public class ACLEntry { /** * Retrieves the expression associated with this entry. - * + * * @return the evaluator expressions. For example, * group="Administrators" */ @@ -134,7 +134,7 @@ public class ACLEntry { /** * Checks to see if this ACLEntry contains a * particular permission - * + * * @param permission one of the "rights" defined for each * protected resource in its ACL * @return true if permission contained in the permission list @@ -146,7 +146,7 @@ public class ACLEntry { /** * Checks if this entry has the given permission. - * + * * @param permission one of the "rights" defined for each * protected resource in its ACL * @return true if the permission is allowed; false if the @@ -167,13 +167,13 @@ public class ACLEntry { /** * Parse string in the following format: - * + * *
      *   allow|deny (right[,right...]) attribute_expression
      * 
- * + * * into an instance of the ACLEntry class - * + * * @param acl the acl instance associated with this aclentry * @param aclEntryString aclEntryString in the specified format * @return an instance of the ACLEntry class @@ -217,7 +217,7 @@ public class ACLEntry { /** * Returns the string representation of this ACLEntry - * + * * @return string representation of this ACLEntry */ public String toString() { diff --git a/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java b/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java index 720d9f52e..b847332c6 100644 --- a/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java +++ b/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java @@ -32,19 +32,19 @@ import javax.servlet.http.HttpServletResponse; /* * Self contained PKI JNDI Real that overrides the standard JNDI Realm - * + * * The purpose is to move authentication and authorization code out of the core server. * This realm can be used standalone with only the dependency of having tomcatjss and jss installed * and having tomcatjss connectors configured in the tomcat instance. - * + * * This realm allows for configurable SSL client authentication checking as well * as checking against the standard PKI ACLs we have configured in our ldap database. * Those not using a CS instance could either not configure the ACL checking or * override this class to read in and evaluate their own ACL's. - * + * * This code makes use and simplifies some existing ACL and authorization code * from the main server for now. - * + * */ public class PKIJNDIRealm extends JNDIRealm { @@ -123,11 +123,11 @@ public class PKIJNDIRealm extends JNDIRealm { //Call the getPrincipal method of the base JNDIRealm class //based on the just calculated uid. During the next call - // one of our methods to extract and store the user's ldap stored + // one of our methods to extract and store the user's ldap stored //client cert will be invoked Principal user = getPrincipal(uid); - + //ToDo: Possibly perform some more cert verficiation // such as OCSP, even though the tomcat jss connector // can already be configured for OCSP @@ -154,12 +154,12 @@ public class PKIJNDIRealm extends JNDIRealm { * otherwise return null. * Override here to extract the client auth certificate from the * ldap db. - * + * * @param context The directory context * @param username Username to be looked up - * + * * @exception NamingException if a directory server error occurs - * + * * @see #getUser(DirContext, String, String, int) */ @Override @@ -175,7 +175,7 @@ public class PKIJNDIRealm extends JNDIRealm { // Support for SSL client auth does not appear to support // the userPattern attribute. Certainly another method here // could be overridden to get this working. - + User certUser = super.getUser(context, username); if (certUser != null) { @@ -190,12 +190,12 @@ public class PKIJNDIRealm extends JNDIRealm { * Return true if this constraint is satisfied and processing * should continue, or false otherwise. * override to check for custom PKI ACL's authz permissions. - * + * * @param request Request we are processing * @param response Response we are creating * @param constraints Security constraint we are enforcing * @param context The Context to which client of this class is attached. - * + * * @exception IOException if an input/output error occurs */ @Override @@ -254,7 +254,7 @@ public class PKIJNDIRealm extends JNDIRealm { return allowed; } - + /** * Return a List of roles associated with the given User. Any * roles present in the user's directory entry are supplemented by @@ -280,10 +280,10 @@ public class PKIJNDIRealm extends JNDIRealm { return super.getRoles(context, user); } - + /* Custom variables, see element */ - /* Attribute to find encoded Cert in ldap + /* Attribute to find encoded Cert in ldap * "userCertificate" is most common value. */ private String certAttrName; @@ -296,7 +296,7 @@ public class PKIJNDIRealm extends JNDIRealm { this.certAttrName = certAttrName; } - /* Attribute to find encoded acl resources in ldap + /* Attribute to find encoded acl resources in ldap * "aclResources" is most common value. */ private String aclAttrName; @@ -309,7 +309,7 @@ public class PKIJNDIRealm extends JNDIRealm { this.aclAttrName = aclAttrName; } - /* Attribute for base dn of acl resources in ldap + /* Attribute for base dn of acl resources in ldap */ private String aclBase; @@ -338,7 +338,7 @@ public class PKIJNDIRealm extends JNDIRealm { /* Saved user certificate object obtained during authentication * from the user's LDAP record. - * Will be accessed later to compare with incoming client auth certificate. + * Will be accessed later to compare with incoming client auth certificate. */ private X509Certificate storedUserCert; @@ -547,7 +547,7 @@ public class PKIJNDIRealm extends JNDIRealm { } - /* Attempt to get the stored user certificate object and save it for + /* Attempt to get the stored user certificate object and save it for * future reference. This all takes place within one command invocation from * the getPrincipal method defined here. */ @@ -630,7 +630,7 @@ public class PKIJNDIRealm extends JNDIRealm { // as one of the parameters to the message. // There may be a way to extract this information at this level. // The parameter name to scan for could be configured with the Realm. - + private String getACLEntryDataForURL(String requestURI) { String aclEntryData; @@ -746,9 +746,9 @@ public class PKIJNDIRealm extends JNDIRealm { /** * Parse ACL resource attributes - * + * * @param res same format as the resource attribute: - * + * *
      *     ::
      *      () 
@@ -894,14 +894,14 @@ public class PKIJNDIRealm extends JNDIRealm {
             return;
         }
     }
-    
+
     /**
      * Return a String representing the value of the specified attribute.
      * Create our own since the super class has it as private
-     * 
+     *
      * @param attrId Attribute name
      * @param attrs Attributes containing the required value
-     * 
+     *
      * @exception NamingException if a directory server error occurs
      */
     private Vector getAttributeValues(String attrId, Attributes attrs)
@@ -929,7 +929,7 @@ public class PKIJNDIRealm extends JNDIRealm {
         }
         return values;
     }
-    
+
    /*
     * ToDo: Figure out how to do real logging
     */
-- 
cgit