From b471e0d8e260e01833343c35557488be711ddf1f Mon Sep 17 00:00:00 2001
From: Jack Magne <jmagne@dhcp-16-206.sjc.redhat.com>
Date: Tue, 7 Jun 2016 16:39:40 -0700
Subject: [PATCH] UdnPwdDirAuth authentication plugin instance is not working.

Ticket #1579 : UdnPwdDirAuth authentication plugin instance is not working.

Since this class no longer works, we felt it best to just remove it from the server.

This patch removes the references and files associated with this auth method.
---
 base/ca/shared/conf/CS.cfg                         |   1 -
 base/ca/shared/webapps/ca/ee/ca/UserDnEnroll.html  | 472 ---------------------
 .../netscape/admin/certsrv/ug/AuthBaseDialog.java  |   2 -
 .../admin/certsrv/ug/AuthConfigDialog.java         |   3 -
 base/kra/shared/conf/CS.cfg                        |   1 -
 base/ocsp/shared/conf/CS.cfg                       |   1 -
 .../authentication/UdnPwdDirAuthentication.java    | 201 ---------
 .../src/com/netscape/cmscore/apps/Setup.java       |   1 -
 .../cmscore/connector/RequestTransfer.java         |   1 -
 base/tks/shared/conf/CS.cfg                        |   1 -
 base/tps/shared/conf/CS.cfg                        |   1 -
 11 files changed, 685 deletions(-)
 delete mode 100644 base/ca/shared/webapps/ca/ee/ca/UserDnEnroll.html
 delete mode 100644 base/server/cms/src/com/netscape/cms/authentication/UdnPwdDirAuthentication.java

diff --git a/base/ca/shared/conf/CS.cfg b/base/ca/shared/conf/CS.cfg
index 989a322..c896251 100644
--- a/base/ca/shared/conf/CS.cfg
+++ b/base/ca/shared/conf/CS.cfg
@@ -169,7 +169,6 @@ auths.impl._002=##
 auths.impl.AgentCertAuth.class=com.netscape.cms.authentication.AgentCertAuthentication
 auths.impl.CMCAuth.class=com.netscape.cms.authentication.CMCAuth
 auths.impl.SSLclientCertAuth.class=com.netscape.cms.authentication.SSLclientCertAuthentication
-auths.impl.UdnPwdDirAuth.class=com.netscape.cms.authentication.UdnPwdDirAuthentication
 auths.impl.UidPwdDirAuth.class=com.netscape.cms.authentication.UidPwdDirAuthentication
 auths.impl.UidPwdPinDirAuth.class=com.netscape.cms.authentication.UidPwdPinDirAuthentication
 auths.impl.UidPwdGroupDirAuth.class=com.netscape.cms.authentication.UidPwdGroupDirAuthentication
diff --git a/base/ca/shared/webapps/ca/ee/ca/UserDnEnroll.html b/base/ca/shared/webapps/ca/ee/ca/UserDnEnroll.html
deleted file mode 100644
index f4798d4..0000000
--- a/base/ca/shared/webapps/ca/ee/ca/UserDnEnroll.html
+++ /dev/null
@@ -1,472 +0,0 @@
-<!-- --- BEGIN COPYRIGHT BLOCK ---
-     This program is free software; you can redistribute it and/or modify
-     it under the terms of the GNU General Public License as published by
-     the Free Software Foundation; version 2 of the License.
-
-     This program is distributed in the hope that it will be useful,
-     but WITHOUT ANY WARRANTY; without even the implied warranty of
-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-     GNU General Public License for more details.
-
-     You should have received a copy of the GNU General Public License along
-     with this program; if not, write to the Free Software Foundation, Inc.,
-     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-     Copyright (C) 2007 Red Hat, Inc.
-     All rights reserved.
-     --- END COPYRIGHT BLOCK --- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<TITLE>Directory Based User Enrollment Form</TITLE>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<SCRIPT LANGUAGE="JavaScript"></SCRIPT>
-<SCRIPT LANGUAGE="JavaScript" SRC="/ca/ee/cms-funcs.js"> </SCRIPT>
-<SCRIPT LANGUAGE="JavaScript" SRC="/ca/ee/helpfun.js"> </SCRIPT>
-<SCRIPT LANGUAGE="JavaScript" SRC="/ca/ee/dynamicVars.js"> </SCRIPT>
-<SCRIPT LANGUAGE="JavaScript">
-<!--//
-
-// Notice to administrators
-//
-// A link to this HTML form conditionally appears in the
-// main enrollment menu frame. This link will only appear if
-// a plugin of type 'UdnPwdDirAuth' (LDAP directory enrollment)
-// has been configured in the console.
-
-var crmfObject;
-function validate(form)
-{
-    with (form) {
-        if (udn.value == "") {
-            alert("You must supply your dn");
-            return false;
-        }
-        if (pwd.value == "") {
-            alert("You must supply your password");
-            return false;
-        }
-
-        /////////////////////////////////////////////////////////////////
-        // To enable dual key feature, this page must be customized with
-        // appropriate Javascript call. For example,
-        //
-        //      crmfObject = crypto.generateCRMFRequest(
-        //              "CN=undefined",
-        //              "regToken", "authenticator",
-        //              null,
-        //              "setCRMFRequest();",
-        //              512, null, "rsa-ex",
-        //              1024, null, "rsa-sign");
-        //
-        // To enable key archival feature, this page must be customized with
-        // KRA's transport certificate. The transport certificate can be
-        // retrieved in the following ways:
-        // (1) Access "List Certificates" menu option in end-entity page
-        // (2) Access https://<host>:<agent_port>/kra/displayTransportCert
-        // (3) Use certutil command in <instance-dir>/config directory
-        //     (i.e. certutil -L -d . -n "kraTransportCert <instance-id>" -a)
-        //
-        // Once the transport certificate is obtained, the following
-        // javascript should be modified so that the transport certificate
-        // and appropriate key type are selected. For example,
-        //
-        //      var keyGenAlg = "rsa-ex";
-        //      crmfObject = crypto.generateCRMFRequest(
-        //              "CN=undefined",
-        //              "regToken", "authenticator",
-        //              keyTransportCert,
-        //              "setCRMFRequest();",
-        //              512, null, keyGenAlg);
-        /////////////////////////////////////////////////////////////////
-
-        // To enable key archival, replace "null" with the transport 
-        // certificate without "BEBIN..." "END..", nor line breaks.
-        // change keyGenAlg to "rsa-ex"
-        var keyTransportCert = null;
-        var keyGenAlg = "rsa-dual-use";
-        if (navigator.appName == "Netscape" && (navMajorVersion() > 3) && 
-            typeof(crypto.version) != "undefined") {
-            crmfObject = crypto.generateCRMFRequest(
-                                "CN=undefined", 
-                                "regToken", "authenticator", 
-                                keyTransportCert,
-                                "setCRMFRequest();", 
-                                1024, null, keyGenAlg);
-        }
-        return true;
-    }
-}
-
-function setCRMFRequest()
-{
-    with (document.forms[0]) {
-        CRMFRequest.value = crmfObject.request;
-        submit();
-    }
-}
-
-//-->
-</SCRIPT>
-</head>
-
-
-<OBJECT
-	classid="clsid:127698e4-e730-4e5c-a2b1-21490a70c8a1"
-	CODEBASE="/xenroll.dll"
-	id=Enroll    >
-</OBJECT>
-
-
-<SCRIPT LANGUAGE=VBS>
-<!--
-Function escapeDNComponent(comp)
-    escapeDNComponent = comp
-End Function
-
-Function doubleQuotes(comp)
-    doubleQuotes = False
-End Function
-
-Function formulateDN()
-    Dim dn
-    Dim TheForm
-    Set TheForm = Document.ReqForm
-
-    dn = Empty
-
-    If (TheForm.udn.Value <> Empty) Then
-        If doubleQuotes(TheForm.udn.Value) = True Then
-            MsgBox "Double quotes are not allowed in the dn field"
-            Exit Function
-        End If
-        If (dn <> Empty) Then
-            dn = dn & ","
-        End If
-        dn = dn & "0.9.2342.19200300.100.1.1=" & escapeDNComponent(TheForm.udn.Value)
-    End If
-
-    formulateDN = dn
-End Function
-
-Sub Send_OnClick
-  Dim TheForm
-  Dim szName
-  Dim options
-  Set TheForm = Document.ReqForm
-
-
-  ' Do a few sanity checks
-  If (TheForm.udn.Value = Empty) Then 
-    ret = MsgBox("You must supply your Directory dn for certificate enrollment", 0, "MSIE Certificate Request")
-	Exit Sub
-  End If
-
-  If (TheForm.pwd.Value = Empty) Then
-	ret = MsgBox("You must supply your Directory password for certificate enrollment", 0, "MSIE Certificate Request")
-	Exit Sub
-  End If
-
-'  If (TheForm.SSLClient.value = Empty AND
-'      TheForm.SMIME.value = Empty AND
-'      TheForm.ObjectSigning.value = Empty) Then
-'	ret = MsgBox("You must select atleast one certificate type", 0, 
-'		"MSIE Certificate Request")
-'	Exit Sub
-'  End If
-	
-
-  ' Contruct the X500 distinguished name
-  szName = formulateDN()
-
-  On Error Resume Next
-  Enroll.HashAlgorithm = "MD5"
-  Enroll.KeySpec = 1
-  Enroll.GenKeyFlags = 1        ' key exportable
-
-   ' Pick the provider that is selected
-   set options = TheForm.all.cryptprovider.options
-   index = options.selectedIndex
-   Enroll.providerType = options(index).value
-   Enroll.providerName = options(index).text
-
-  szCertReq = Enroll.createPKCS10(szName, "1.3.6.1.5.5.7.3.2")
-  theError = Err.Number
-  On Error Goto 0
-  '
-  ' If the user has cancelled things the we simply ignore whatever
-  ' they were doing ... need to think what should be done here
-  '
-  If (szCertReq = Empty AND theError = 0) Then
-    Exit Sub
-  End If
-
-  If (szCertReq = Empty OR theError <> 0) Then
-    '
-    ' There was an error in the key pair generation. The error value
-    ' is found in the variable 'theError' which we snarfed above before
-    ' we did the 'On Error Goto 0' which cleared it again.
-    '
-    sz = "The error '" & Hex(theError) & "' occurred." & chr(13) & chr(10) & "Your credentials could not be generated."
-    result = MsgBox(sz, 0, "Credentials Enrollment")
-    Exit Sub
-  End If
-
-  TheForm.pkcs10Request.Value = szCertReq
-  TheForm.Submit
-  Exit Sub
-
-End Sub
--->
-</SCRIPT>
-
-<body bgcolor="#FFFFFF" onload=checkClientTime()>
-
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-  Directory Based User Enrollment
-</font>
-<br>
-<font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-  Use this form to submit a request for a personal certificate through your 
-  organization's directory. With directory based enrollment, you need only 
-  supply your user DN and password for the directory; the directory 
-  supplies the rest of the information needed for certificate issuance. 
-  If the user DN and password are correct your certificate will be issued 
-  automatically.
-</font>
-
-<table border="0" cellspacing="0" cellpadding="2" background="/pki/images/hr.gif" width="100%">
-  <tr> 
-    <td>&nbsp;</td>
-  </tr>
-</table>
-
-<table border="0" cellspacing="0" cellpadding="2">
-  <tr valign="TOP"> 
-    <td><font size="-1" face="PrimaSans BT, Verdana, sans-serif">
-      <b>Important:	</b></font>
-    </td>
-    <td><font size="-1" face="PrimaSans BT, Verdana, sans-serif">
-      Be sure to request your certificate on the same computer 
-      on which you plan to use your certificate.</font>
-    </td>
-  </tr>
-</table>
-
-<table border="0" cellspacing="0" cellpadding="0" background="/pki/images/hr.gif" width="100%">
-  <tr> 
-    <td>&nbsp;</td>
-  </tr>
-</table>
-
-<script lang="javascript">
-<!--//
-if (navigator.appName == "Netscape" && (navMajorVersion() <= 3 ||
-    typeof(crypto.version) != "undefined")) {
-    document.write('<form name="ReqForm" method="post" action="/enrollment">');
-} else {
-    document.write('<form name="ReqForm" method="post" action="/enrollment" '+
-                   'onSubmit="return validate(document.forms[0])">');
-}
-//-->
-</script>
-
-<font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-  <b>User's Identity</b>
-<br>
-  Enter your user DN and password for your organization's directory.
-  This information will be used to verify your identity and to obtain
-  information from the directory to fill in the certificate.
-<br>
-</font>
-
-<table border="0" width="100%" cellspacing="2" cellpadding="2">
-  <tr> 
-    <td width="25%" valign="TOP"> 
-      <div align="RIGHT">
-      <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">User DN: </font>
-      </div>
-    </td>
-    <td valign="TOP"> 
-      <input type="TEXT" name="udn" size="45">
-    </td>
-  </tr>
-</table>
-
-<table border="0" width="100%" cellspacing="2" cellpadding="2">
-  <tr> 
-    <td width="25%" valign="TOP"> 
-      <div align="RIGHT">
-      <font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">Password: </font> 
-      </div>
-    </td>
-    <td valign="TOP"> 
-      <input type="PASSWORD" name="pwd" AutoComplete=off size="45">
-    </td>
-  </tr>
-</table>
-
-<!-- for Netscape Certificate Type Extension -->
-<input type="HIDDEN" name="email" value="true">
-<input type="HIDDEN" name="ssl_client" value="true">
-<!-- for Key Usage Extension -->
-<input type="HIDDEN" name="digital_signature" value=true>
-<input type="HIDDEN" name="non_repudiation" value=true>
-<input type="HIDDEN" name="key_encipherment" value=true>
-<br>
-
-
-<script lang="javascript">
-<!--//
-if (navigator.appName == "Netscape" &&
-    (navMajorVersion() <= 3 || typeof(crypto.version) == 'undefined')) {
-
-    document.writeln('<font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">');
-    document.writeln('<b>Public/Private Key Information</b><br>');
-    document.writeln(
-        'When your submit this form, your browser generates a private and '+
-        'public key. The browser retains the private key and submits the '+
-        'public key along with your request for a certificate. '+
-        'The public key becomes part of your certificate. '+
-        '<P>'+
-        'Select the length of the key to generate. The longer the key '+ 
-        'length the greater the strength. You may want to check with your '+
-        'system administrator about the length of key to specify.');
-    document.writeln('</font>');
-
-    document.writeln('<table border="0" width="100%" cellspacing="2" cellpadding="2">');
-	document.writeln('<tr><td width="25%" valign=TOP>');
-	document.writeln('<div align=right>');
-	document.writeln('<font size=-1 face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">');
-	document.writeln('Key Length: ');
-	document.writeln('</font>');
-	document.writeln('</div>');
-	document.writeln('</td>');
-	document.write('<td valign=TOP>');
-    document.write('<KEYGEN name="subjectKeyGenInfo">');
-	document.write('</td></tr></table>');
-}
-
-
-if (navigator.appName == "Microsoft Internet Explorer") {
-    document.writeln('<font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">');
-    document.writeln('<b>Public/Private Key Information</b><br>');
-    document.writeln(
-        'When you submit this form, your browser generates a private and '+
-        'public key. The browser retains the private key and submits the '+
-        'public key along with your request for a certificate. '+
-        'The public key becomes part of your certificate. '+
-        '<P>'+
-        'The Microsoft Base Cryptographic provider offers 512-bit key '+
-        'encryption which is adequate for most applications today, '+
-        'but you may select the Enhanced option if your browser offers '+
-        'this choice and you require the higher encryption strength. '+
-        'You may want to check with your system administrator about '+
-        'the provider to specify.');
-    document.writeln('</font>');
-
-    document.writeln('<p>');
-    document.writeln('<td>');
-    document.writeln('<font size=-1 face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">');
-    document.writeln('Cryptographic Provider:');
-    document.writeln('</font>');
-    document.writeln('</td>');
-    document.writeln('<td>');
-    document.writeln('<SELECT NAME=\"cryptprovider\"></SELECT>');
-    document.writeln('</td>');
-    document.writeln('<p>');
-}
-
-
-document.writeln('<table border="0" width="100%" cellspacing="0" cellpadding="6" '+
-                 'bgcolor="#cccccc" background="/pki/images/gray90.gif">');
-document.writeln('<tr><td width=100%> <div align="RIGHT">');
-
-if (navigator.appName == "Netscape" && (navMajorVersion() <= 3 ||
-    typeof(crypto.version) == "undefined")) {
-	document.writeln('<input type="submit" value="Submit" '+
-		             'name="submit" width="72">');
-} else if ((navigator.appName == "Microsoft Internet Explorer") ||
-            (navigator.appName == "")) {
-    document.writeln('<input type="submit" value="Submit" '+
-                     'name="Send" width="72">');
-} else {
-    document.writeln('<input type="button" value="Submit" '+
-                     'name="submitbutton" '+
-                     'onclick="validate(form)" width="72">');
-}
-
-document.write('<img src="/pki/images/spacer.gif" width="6" height="6">' +
-               '<input type="reset" value="Reset" name="reset" width="72">' +
-               '<input type="hidden" name="certType" value="client">' +
-               '<input type="hidden" name="authenticator" ' +
-               ' value="UserDnEnrollment">');
-
-if (navigator.appName == 'Netscape') {
-    if ((navMajorVersion() > 3) && 
-        (typeof(crypto.version) != 'undefined')) {
-        document.write('<input type=hidden name=CRMFRequest value="">');
-        document.write('<input type=hidden name=cmmfResponse value=true>');
-        //document.write('<input type=hidden name=certNickname value="">');
-    } else {
-        document.write('<input type="hidden" name="importCert" value="off">');
-    }
-} else if ((navigator.appName == "Microsoft Internet Explorer") ||
-           (navigator.appName == "")) {
-    // navigator.appName == "" is for IE 3.
-    document.write('<input type="hidden" name="pkcs10Request" value="">');
-}
-document.writeln('</div></td></tr></table>');
-//-->
-</script>
-
-</form>
-
-<SCRIPT LANGUAGE=VBS>
-<!--
-
-FindProviders
-
-Function FindProviders
-    Dim i, j
-    Dim providers()
-    i = 0
-    j = 1
-    Dim el
-    Dim temp
-    Dim first
-    Dim TheForm
-    Set TheForm = document.ReqForm
-    On Error Resume Next
-    first = 0
-
-    Do While True
-    temp = ""
-    Enroll.providerType = j
-    temp = Enroll.enumProviders(i,0)
-    If Len(temp) = 0 Then
-    If j < 1 Then 
-      j = j + 1
-      i = 0 
-    Else
-      Exit Do
-    End If
-    Else
-    set el = document.createElement("OPTION")
-    el.text = temp
-    el.value = j 
-    TheForm.cryptprovider.add(el)
-    If first = 0  Then
-      first = 1
-      TheForm.cryptprovider.selectedIndex = 0
-    End If
-    i = i + 1
-    End If
-    Loop
-
-End Function
-
--->
-</SCRIPT>
-</body>
-</html>
diff --git a/base/console/src/com/netscape/admin/certsrv/ug/AuthBaseDialog.java b/base/console/src/com/netscape/admin/certsrv/ug/AuthBaseDialog.java
index c3c4b2c..4410df1 100644
--- a/base/console/src/com/netscape/admin/certsrv/ug/AuthBaseDialog.java
+++ b/base/console/src/com/netscape/admin/certsrv/ug/AuthBaseDialog.java
@@ -110,8 +110,6 @@ public class AuthBaseDialog extends JDialog
                 mAuthName.setText("PinDirEnrollment");
             else if (!userDirExist && str.equals("UidPwdDirAuth"))
                 mAuthName.setText("UserDirEnrollment");
-            else if (!userDirExist && str.equals("UdnPwdDirAuth"))
-                mAuthName.setText("UserDnEnrollment");
             else if (!userDirExist && str.equals("UserPwdDirAuth"))
                 mAuthName.setText("UserDirAuth");
             // Inserted by beomsuk
diff --git a/base/console/src/com/netscape/admin/certsrv/ug/AuthConfigDialog.java b/base/console/src/com/netscape/admin/certsrv/ug/AuthConfigDialog.java
index da14c67..d1174d7 100644
--- a/base/console/src/com/netscape/admin/certsrv/ug/AuthConfigDialog.java
+++ b/base/console/src/com/netscape/admin/certsrv/ug/AuthConfigDialog.java
@@ -72,9 +72,6 @@ public class AuthConfigDialog extends CMSBaseConfigDialog
 		else if (implName.equals("UidPwdPinDirAuth")) {
 			instanceName = "PinDirEnrollment";
 		}
-		else if (implName.equals("UdnPwdDirAuth")) {
-			instanceName = "UserDnEnrollment";
-		}
 		else if (implName.equals("UserPwdDirAuth")) {
 			instanceName = "UserDirAuth";
 		}
diff --git a/base/kra/shared/conf/CS.cfg b/base/kra/shared/conf/CS.cfg
index c597a94..5d310db 100644
--- a/base/kra/shared/conf/CS.cfg
+++ b/base/kra/shared/conf/CS.cfg
@@ -146,7 +146,6 @@ auths.impl.AgentCertAuth.class=com.netscape.cms.authentication.AgentCertAuthenti
 auths.impl.CMCAuth.class=com.netscape.cms.authentication.CMCAuth
 auths.impl.PortalEnroll.class=com.netscape.cms.authentication.PortalEnroll
 auths.impl.TokenAuth.class=com.netscape.cms.authentication.TokenAuthentication
-auths.impl.UdnPwdDirAuth.class=com.netscape.cms.authentication.UdnPwdDirAuthentication
 auths.impl.UidPwdDirAuth.class=com.netscape.cms.authentication.UidPwdDirAuthentication
 auths.impl.UidPwdPinDirAuth.class=com.netscape.cms.authentication.UidPwdPinDirAuthentication
 auths.impl.UserPwdDirAuth.class=com.netscape.cms.authentication.UserPwdDirAuthentication
diff --git a/base/ocsp/shared/conf/CS.cfg b/base/ocsp/shared/conf/CS.cfg
index fa50d48..005198f 100644
--- a/base/ocsp/shared/conf/CS.cfg
+++ b/base/ocsp/shared/conf/CS.cfg
@@ -133,7 +133,6 @@ auths.impl.AgentCertAuth.class=com.netscape.cms.authentication.AgentCertAuthenti
 auths.impl.CMCAuth.class=com.netscape.cms.authentication.CMCAuth
 auths.impl.PortalEnroll.class=com.netscape.cms.authentication.PortalEnroll
 auths.impl.TokenAuth.class=com.netscape.cms.authentication.TokenAuthentication
-auths.impl.UdnPwdDirAuth.class=com.netscape.cms.authentication.UdnPwdDirAuthentication
 auths.impl.UidPwdDirAuth.class=com.netscape.cms.authentication.UidPwdDirAuthentication
 auths.impl.UidPwdPinDirAuth.class=com.netscape.cms.authentication.UidPwdPinDirAuthentication
 auths.impl.UserPwdDirAuth.class=com.netscape.cms.authentication.UserPwdDirAuthentication
diff --git a/base/server/cms/src/com/netscape/cms/authentication/UdnPwdDirAuthentication.java b/base/server/cms/src/com/netscape/cms/authentication/UdnPwdDirAuthentication.java
deleted file mode 100644
index e731352..0000000
--- a/base/server/cms/src/com/netscape/cms/authentication/UdnPwdDirAuthentication.java
+++ /dev/null
@@ -1,201 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.authentication;
-
-// ldap java sdk
-import netscape.ldap.LDAPConnection;
-import netscape.ldap.LDAPException;
-
-import com.netscape.certsrv.apps.CMS;
-import com.netscape.certsrv.authentication.AuthToken;
-import com.netscape.certsrv.authentication.EInvalidCredentials;
-import com.netscape.certsrv.authentication.EMissingCredential;
-import com.netscape.certsrv.authentication.IAuthCredentials;
-import com.netscape.certsrv.base.EBaseException;
-import com.netscape.certsrv.base.IConfigStore;
-import com.netscape.certsrv.base.IExtendedPluginInfo;
-import com.netscape.certsrv.ldap.ELdapException;
-import com.netscape.certsrv.logging.ILogger;
-
-/**
- * udn/pwd directory based authentication manager
- * <P>
- *
- * @version $Revision$, $Date$
- */
-public class UdnPwdDirAuthentication extends DirBasedAuthentication {
-
-    /* required credentials to authenticate. udn and pwd are strings. */
-    public static final String CRED_UDN = "udn";
-    public static final String CRED_PWD = "pwd";
-    protected static String[] mRequiredCreds = { CRED_UDN, CRED_PWD };
-
-    /* Holds configuration parameters accepted by this implementation.
-     * This list is passed to the configuration console so configuration
-     * for instances of this implementation can be configured through the
-     * console.
-     */
-    protected static String[] mConfigParams =
-            new String[] { PROP_DNPATTERN,
-                    PROP_LDAPSTRINGATTRS,
-                    PROP_LDAPBYTEATTRS,
-                    "ldap.ldapconn.host",
-                    "ldap.ldapconn.port",
-                    "ldap.ldapconn.secureConn",
-                    "ldap.ldapconn.version",
-                    "ldap.minConns",
-                    "ldap.maxConns",
-        };
-
-    static {
-        mExtendedPluginInfo.add(IExtendedPluginInfo.HELP_TEXT +
-                ";Authenticate the user distinguished name and password provided " +
-                "by the user against an LDAP directory. Works with the " +
-                "Dir Based Enrollment HTML form");
-        mExtendedPluginInfo.add(IExtendedPluginInfo.HELP_TOKEN +
-                ";configuration-authentication");
-    };
-
-    /**
-     * Default constructor, initialization must follow.
-     */
-    public UdnPwdDirAuthentication() {
-        super();
-    }
-
-    /**
-     * Initializes the UdnPwdDirAuthentication auth manager.
-     * <p>
-     *
-     * @param name - The name for this authentication manager instance.
-     * @param implName - The name of the authentication manager plugin.
-     * @param config - The configuration store for this instance.
-     * @exception EBaseException If an error occurs during initialization.
-     */
-    public void init(String name, String implName, IConfigStore config)
-            throws EBaseException {
-        super.init(name, implName, config, false);
-    }
-
-    /**
-     * Authenticates a user based on udn, pwd in the directory.
-     *
-     * @param authCreds The authentication credentials.
-     * @return The user's ldap entry dn.
-     * @exception EInvalidCredentials If the udn and password are not valid
-     * @exception EBaseException If an internal error occurs.
-     */
-    protected String authenticate(LDAPConnection conn,
-            IAuthCredentials authCreds,
-            AuthToken token)
-            throws EBaseException {
-        String userdn = null;
-
-        // authenticate by binding to ldap server with password.
-        try {
-            // get the udn.
-            userdn = (String) authCreds.get(CRED_UDN);
-            if (userdn == null) {
-                throw new EMissingCredential(CMS.getUserMessage("CMS_AUTHENTICATION_NULL_CREDENTIAL", CRED_UDN));
-            }
-
-            // get the password.
-            String pwd = (String) authCreds.get(CRED_PWD);
-
-            if (pwd == null) {
-                throw new EMissingCredential(CMS.getUserMessage("CMS_AUTHENTICATION_NULL_CREDENTIAL", CRED_PWD));
-            }
-            if (pwd.equals("")) {
-                // anonymous binding not allowed
-                log(ILogger.LL_FAILURE,
-                        "user " + userdn + " attempted login with empty password.");
-                throw new EInvalidCredentials(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_CREDENTIAL"));
-            }
-
-            // bind as user dn and pwd - authenticates user with pwd.
-            conn.authenticate(userdn, pwd);
-            // set userdn in the token.
-            token.set(CRED_UDN, userdn);
-
-            return userdn;
-        } catch (ELdapException e) {
-            CMS.debug("Authenticating: closing bad connection");
-            try {
-                conn.disconnect();
-            } catch (Exception f) {
-                CMS.debug("Authenticating: conn.disconnect() exception =" + f.toString());
-            }
-            log(ILogger.LL_FAILURE,
-                    "Couldn't get ldap connection. Error: " + e.toString());
-            throw e;
-        } catch (LDAPException e) {
-            CMS.debug("Authenticating: closing bad connection");
-            try {
-                conn.disconnect();
-            } catch (Exception f) {
-                CMS.debug("Authenticating: conn.disconnect() exception =" + f.toString());
-            }
-            switch (e.getLDAPResultCode()) {
-            case LDAPException.NO_SUCH_OBJECT:
-            case LDAPException.LDAP_PARTIAL_RESULTS:
-                log(ILogger.LL_SECURITY,
-                        "user " + userdn + " does not exist in ldap server host " +
-                                conn.getHost() + ", port " + conn.getPort() + ".");
-                throw new EInvalidCredentials(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_CREDENTIAL"));
-
-            case LDAPException.INVALID_CREDENTIALS:
-                log(ILogger.LL_SECURITY,
-                        "authenticate user " + userdn + " with bad password.");
-                throw new EInvalidCredentials(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_CREDENTIAL"));
-
-            case LDAPException.SERVER_DOWN:
-                log(ILogger.LL_FAILURE, "Ldap server is down.");
-                throw new ELdapException(
-                        CMS.getUserMessage("CMS_LDAP_SERVER_UNAVAILABLE", conn.getHost(), "" + conn.getPort()));
-
-            default:
-                log(ILogger.LL_FAILURE,
-                        "Ldap error encountered. " + e.getMessage());
-                throw new ELdapException(
-                        CMS.getUserMessage("CMS_LDAP_OTHER_LDAP_EXCEPTION",
-                                e.errorCodeToString()));
-            }
-        }
-    }
-
-    /**
-     * Returns a list of configuration parameter names.
-     * The list is passed to the configuration console so instances of
-     * this implementation can be configured through the console.
-     *
-     * @return String array of configuration parameter names.
-     */
-    public String[] getConfigParams() {
-        return (mConfigParams);
-    }
-
-    /**
-     * Returns array of required credentials for this authentication manager.
-     *
-     * @return Array of required credentials.
-     */
-    public String[] getRequiredCreds() {
-        return mRequiredCreds;
-    }
-
-}
diff --git a/base/server/cmscore/src/com/netscape/cmscore/apps/Setup.java b/base/server/cmscore/src/com/netscape/cmscore/apps/Setup.java
index cddcfca..d5d7b7f 100644
--- a/base/server/cmscore/src/com/netscape/cmscore/apps/Setup.java
+++ b/base/server/cmscore/src/com/netscape/cmscore/apps/Setup.java
@@ -40,7 +40,6 @@ public class Setup {
             { "auths.impl._002", "##" },
             { "auths.impl.UidPwdDirAuth.class", "com.netscape.cms.authentication.UidPwdDirAuthentication" },
             { "auths.impl.UidPwdPinDirAuth.class", "com.netscape.cms.authentication.UidPwdPinDirAuthentication" },
-            { "auths.impl.UdnPwdDirAuth.class", "com.netscape.cms.authentication.UdnPwdDirAuthentication" },
             { "auths.impl.CMCAuth.class", "com.netscape.cms.authentication.CMCAuth" },
             { "auths.impl.AgentCertAuth.class", "com.netscape.cms.authentication.AgentCertAuthentication" },
             { "auths.impl.PortalEnroll.class", "com.netscape.cms.authentication.PortalEnroll"
diff --git a/base/server/cmscore/src/com/netscape/cmscore/connector/RequestTransfer.java b/base/server/cmscore/src/com/netscape/cmscore/connector/RequestTransfer.java
index b3479ae..d11ec05 100644
--- a/base/server/cmscore/src/com/netscape/cmscore/connector/RequestTransfer.java
+++ b/base/server/cmscore/src/com/netscape/cmscore/connector/RequestTransfer.java
@@ -52,7 +52,6 @@ public class RequestTransfer {
             IRequest.CERT_FILTER,
             "keyRecord",
             "uid", // UidPwdDirAuthentication.CRED_UID,
-            "udn", // UdnPwdDirAuthentication.CRED_UDN,
     };
 
     public static boolean isProfileRequest(IRequest request) {
diff --git a/base/tks/shared/conf/CS.cfg b/base/tks/shared/conf/CS.cfg
index 346cc58..17e5ccd 100644
--- a/base/tks/shared/conf/CS.cfg
+++ b/base/tks/shared/conf/CS.cfg
@@ -124,7 +124,6 @@ auths.impl.AgentCertAuth.class=com.netscape.cms.authentication.AgentCertAuthenti
 auths.impl.CMCAuth.class=com.netscape.cms.authentication.CMCAuth
 auths.impl.PortalEnroll.class=com.netscape.cms.authentication.PortalEnroll
 auths.impl.TokenAuth.class=com.netscape.cms.authentication.TokenAuthentication
-auths.impl.UdnPwdDirAuth.class=com.netscape.cms.authentication.UdnPwdDirAuthentication
 auths.impl.UidPwdDirAuth.class=com.netscape.cms.authentication.UidPwdDirAuthentication
 auths.impl.UidPwdPinDirAuth.class=com.netscape.cms.authentication.UidPwdPinDirAuthentication
 auths.impl.UserPwdDirAuth.class=com.netscape.cms.authentication.UserPwdDirAuthentication
diff --git a/base/tps/shared/conf/CS.cfg b/base/tps/shared/conf/CS.cfg
index 90d1747..6b8a8e2 100644
--- a/base/tps/shared/conf/CS.cfg
+++ b/base/tps/shared/conf/CS.cfg
@@ -31,7 +31,6 @@ auths.impl.CMCAuth.class=com.netscape.cms.authentication.CMCAuth
 auths.impl.PortalEnroll.class=com.netscape.cms.authentication.PortalEnroll
 auths.impl.SSLclientCertAuth.class=com.netscape.cms.authentication.SSLclientCertAuthentication
 auths.impl.TokenAuth.class=com.netscape.cms.authentication.TokenAuthentication
-auths.impl.UdnPwdDirAuth.class=com.netscape.cms.authentication.UdnPwdDirAuthentication
 auths.impl.UidPwdDirAuth.class=com.netscape.cms.authentication.UidPwdDirAuthentication
 auths.impl.UidPwdPinDirAuth.class=com.netscape.cms.authentication.UidPwdPinDirAuthentication
 auths.instance.AgentCertAuth.agentGroup=Certificate Manager Agents
-- 
2.5.0

