code: public boolean isValidSubject(X500Principal subject) {
  
          if (subject == null) {
              throw new IllegalArgumentException();
          }
  
          String subjectDN = CertificateUtil.toGlobusID(subject);
  
          if ((this.allowedDNs == null) || (this.allowedDNs.size() < 1)) {
              return false;
          }
  
          int size = this.allowedDNs.size();
          for (int i = 0; i < size; i++) {
              Pattern pattern = allowedDNs.get(i);
              Matcher matcher = pattern.matcher(subjectDN);
              boolean valid = matcher.matches();
              if (valid) {
                  return true;
              }
          }
  
          return false;
      }
docs: Ascertains if the subjectDN is valid against this policy.
  
  @param subject Subject DN to be validated
  @return true if the DN is valid under this policy and false if it is not