Showing posts with label Directory Server. Show all posts
Showing posts with label Directory Server. Show all posts

Monday, November 28, 2011

Global Password Policy in Sun Directory Server 5.2

Global Password Policy in Sun Directory Server 5.2
 
bash-3.00# ldapsearch -p 389 -D "cn=Directory Manager" -b "cn=Password Policy,cn=config" objectclass=*
Enter bind password: 
version: 1
dn: cn=Password Policy,cn=config
objectClass: top
objectClass: passwordPolicy
cn: Password Policy
passwordInHistory: 0
passwordStorageScheme: SSHA
passwordUnlock: on
passwordMustChange: off
passwordNonRootMayResetUserpwd: off
passwordWarning: 86400
passwordExpireWithoutWarning: on
passwordLockout: off
passwordMinLength: 6
passwordMaxFailure: 3
passwordMaxAge: 8640000
passwordResetFailureCount: 600
passwordisglobalpolicy: off
passwordChange: on
passwordExp: off
passwordLockoutDuration: 3600
passwordCheckSyntax: off
passwordMinAge: 0
passwordRootdnMayBypassModsChecks: off

Monday, November 21, 2011

Active Directory and LDAP

Active Directory and LDAP------
Provides a directory for a Microsoft network:
Centrally manage
Central security
Central user administration
Integrates with DNS
Information replication
Provides all the services a domain controller did

LDAP vs Databases

LDAP vs Databases

·       Read-write ratio - LDAP is read optimized
·         Extensibility - LDAP schemas are more easily changed
·         Distribution - with LDAP data can be near where it is
·         needed, and highly distributed
·         Replication - with LDAP data can be stored in multiple
·         locations
·         Different performance - directories used for many
·         different applications, and queries are usually simpler,
·         but many more of them
·         Data sharing - LDAP is designed for sharing data,
·         databases designed for one application
·         Database objects have complex relationships
·         Transaction model - LDAP transactions are simple -
usually changing one entry, databases can modify
much more
·         Size of information - LDAP is better at storing small bits
of information
·         Type of information - LDAP stores information in
attributes
·         Naming model - LDAP is hierachical
·         Schemas - database schemas are entirely user defined,
directories have core schemas to help interoperability
·         Standards are more important for directories - LDAP
clients can talk to any LDAP server.

Friday, November 11, 2011

What is DSML

DSML
Directory Service Markup Language combines directory services technology (LDAP ) with XML syntax to provide an easy way to share and use personalized data across company and technology boundaries.
The DSML effort was announced by creator Bowstreet on July 12, 1999. Initiative supporters include AOL-Netscape, Sun Microsystems, Oracle, Novell, Microsoft, and IBM
Q:What is a "Directory Service Markup Language"?A vocabulary and schema (a structured framework) for describing the structure and content of directory services information in an XML Document. Directory information can then be easily used by any application that makes use of XML, including browsers and e-commerce applications - enabling frictionless e-commerce.
Q:What is DSML.org?
This Web site is intended to provide more information on the DSML spec, its partners and future developments. Here you will find most recent news and events surrounding the DSML initiative.
Q: How can I view the specification?
To download a zip file containing the full DSML 1.0 specification, the DTD and the Biztalk schema formats, click here.

Q:Who were the founding members of the standard?Bowstreet introduced the initial draft of the DSML specification. The founding members at the time were IBM, Microsoft, Novell, Oracle and the Sun-Netscape Alliance. The working group of dsml.org has sent the final draft of the specification to OASIS.
Q:Who is developing and working on DSML 2.0?
Many organizations, including the founding members of DSML.org have signed up to work on the technical committe, which will further develop the DSML standard.
Q: Why has DSML been created?
To standardize the way directory services information is represented in XML. With a recognized standard, applications can be written to make use of DSML and capture the scalability, replication, security and management strengths of directory services.

Q: What's special about DSML that makes it an essential building block for e-commerce applications?
Directories are the best tools for managing the meta-data about resources. XML is the best way to describe application/resource data for use on the Web. DSML is the markup language that provides the missing piece that allows these two to work together, and provides a common ground for all XML-based applications to make better use of directories.

Q: What is the difference between LDAP and DSML?
The Lightweight Directory Access Protocol (LDAP) is intended to provide a means for accessing directory information. DSML provides the means for reading and understanding directory content in XML. So, DSML is actually very synergistic with LDAP.

Q: You say it's synergistic, but how?
DSML is an XML-Schema, not an access protocol. DSML still depends on an access protocol such as LDAP to get data from individual directories. DSML provides a standard for creating XML documents from the information that LDAP delivers.

Q: When will DSML-compatible products be available?The Bowstreet Web Automation FactoryTM is the first commercial product to support DSML. Oracle has also announced that it has entered a joint development agreement with Siemens to create a new directory product based on DSML.
Q: How do consumers benefit from DSML-compliant Web businesses?
DSML will enable customers to use directory information from, and exchange directory information with, their customers and partners, regardless of the specific directories at the remote sites. DSML also fosters a new computing approach in which XML-enabled applications leverage business functionality and services, managed in directories and delivered via the Web.

Q: How does the DSML effort relate to the Directory Interoperability Forum?
These two efforts focus on different aspects of directory services standards. DSML is focused on specifying how directory content and structure is described using XML. DIF is focused on extending the core LDAP protocol to include more cross directory SDKs and synchronization. There is no dependency or overlap between the two efforts.

Q: Why are directories a good foundation for e-commerce Web applications?
Directory services provide an optimal way of naming, describing and finding information and resources while managing the relationship between the resources. Typically, directory services software stores and manages access to detailed information about a company's IT assets, including people and business processes and resources - for internal use. But analysts believe that directory services software is also the best way to store this type of information for expanding e-business or e-commerce purposes. Since directory services software offers high levels of security, location independence, granular access and easy replication, and combined with the advantages of XML, it can become a powerful enabler of e-commerce and e-business.

Directory services software is a mature, time-tested technology that's been in use in client/server environments for several years. So, many customers already have directories that can be extended to manage applications over extranets. All the leading directory service vendors - including Novell, IBM and Microsoft - are working on solutions that extend directories to e-business.
Q: What are DSML applications suited for?
DSML enables directories to support whole new classes of XML-based applications, such as:

  • e-commerce and e-business
  • Distributed Web Applications
  • Internet Native Network Management
  • Customer Support Federated Directory Management
  • Supply Chain Management
Q:How does DSML relate to XML?
DSML is an XML-Schema for representing Directory Services content and structure. An XML-Schema is a format for specifying rules covering the structure and content of XML documents. DSML will be defined using a Document Content Description (DCD) (see W3C-DCD spec at http://www.w3.org/TR/NOTE-dcd ).
XML (for eXtensible Markup Language) is widely considered to be the core language of e-business. It is a syntax that standardizes how task-focused information is shared across the Internet. XML provides for both context and interoperability of data, thereby enabling dynamic activities. Also, since XML is self-describing, specific XML-based applications can interact with each other without special programming to integrate them.

Q: How are directory services relevant to enterprise Web deployments?
Directories enable corporate computing resources - including information and users - to be dynamically and securely matched over networks. By mixing that capability with XML, highly intelligent extranets can enable customized applications to be created "on the fly" with minimal programming.

Q: How does DSML relate to Novell's DirXML?
DirXML is a technology built on top of Novell's NDS eDirectory. It exposes NDS change events (additions, modifications, deletions) through an XML interface. DirXML also has a query interface which allows you to query and retrieve NDS information in XML format.
DSML is an open, industry standard specification that describes how directory data should be represented in XML format. Novell has publicly stated that it will be supporting DSML.
Q: What is the difference between DSML and SOAP?
The Simple Object Access Protocol (SOAP) defines the use of XML and HTTP to access services, objects, and servers in a platform-independent manner. It is designed as a programming protocol. DSML is a data definition specification which can be transported within SOAP.








Tuesday, October 11, 2011

Two Directory servers listening on ports 389/636, on one server

The following procedure outlines how to configure a two (or more instances) of Sun Java Directory Server, both listening on non-secure port 389 and secure port 636.
This is useful in application testing where all applications require port 389/636 but you need two distinct Directories to ensure that data and configurations do not collide.
This procedure requires that you add a second virtual network interface.

View the current network settings
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
dmfe0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.200.131.36 netmask ffffff00 broadcast 10.200.131.255
ether 0:3:ba:7a:bb:ed

Create the second virtual interface
# ifconfig dmfe0:1 plumb

Assign an ip address to it
# ifconfig dmfe0:1 10.200.131.82 up

Add the secondhostname to /etc/hosts(or DNS)
# Internet host table
#
127.0.0.1 localhost
10.200.132.101 10.200.132.101
10.200.131.36 firsthostname.example.com firsthostname loghost
10.200.131.82 secondhostname.example.com secondhostname


Confirm the network interface is working
# ping 10.200.131.82
10.200.131.82 is alive

# ping secondhostname
secondhostname is alive

Create an instance of DSEE.
  • Ensure that you specify the second host name with the -h parameter
  • Temporarily provide a secure and non-secure port that is not in use (otherwise the create command will fail since ports 389 and 636 are already in use)

#/opt/SUNWdsee/ds6/bin/dsadm create -h secondhostname -p 1389 -P 1636 /var/opt/SUNWdsee/dsins2


Edit the dse.ldif of the new instance
  • Add the two lines in blue below
  • Change the the port numbers to 389 and 636 respectively.
#vi /var/opt/SUNWdsee/dsins2/config/dse.ldif

dn: cn=config
cn: config
.
.
.
nsslapd-enquote-sup-oc: off
nsslapd-listenhost: secondhostname
nsslapd-securelistenhost: secondhostname
nsslapd-localhost: secondhostname
nsslapd-schemacheck: on
nsslapd-syntaxcheck: off
nsslapd-requires-bind-password: on
nsslapd-rewrite-rfc1274: off
nsslapd-return-exact-case: on
nsslapd-port: 389
nsslapd-localuser: root
.
.
.
nsslapd-security: on
nsslapd-secureport: 636


Start the second instance
#/opt/SUNWdsee/ds6/bin/dsadm start /var/opt/SUNWdsee/dsins2
# Waiting for server to start...
Server started: pid=9570

Sun Directory Server certificate installation and renewal

This posting serves to clarify confusion and provide tools and tips for testing SSL communication between Sun Directory Server and clients. This blog posting assumes basic SSL knowledge.Links to background information is provided in the references below.
For purposes of this blog posting assume:
Sun Directory Server commands: /opt/SUNWdsee/ds6/bin
Sun Directory Server instance: /var/opt/SUNWdsee/dsins1
Consequently, the Sun Directory Server certificate directory is : /var/opt/SUNWdsee/dsins1/alias
The following files are in the certificate directory:
cert8.db key3.db slapd-cert8.db
certmap.conf secmod.db slapd-key3.db


This blog posting uses
  • The Sun Directory commands located in /opt/SUNWdsee/ds6/bin
  • Certutil located in /usr/sfw/bin on Solaris 10. If certutil is not on your server, download the Sun Directory Resource kit
# unzip dsrk52-SunOS5.8_OPT.zip
# java DSRK

You can install the resource kit into any directory you choose. The following notes assume that the installation location is: the /opt/dsrk directory. Add /opt/dsrk/lib to your LD_LIBRARY_PATH environment variable.

Server configuration

List certificates in the database

Using dsadm:

# ./dsadm list-certs -i /var/opt/SUNWdsee/dsins1
Alias Valid from Expires on Self-signed? Issued by Issued to
----------- ---------------- ---------------- ------------ ------------------------------------------------------------------- -------------------------------------------------------------------------------------
defaultCert 2008/01/22 19:15 2008/04/22 19:15 y CN=myserver,CN=636,CN=Directory Server,O=Sun Microsystems Same as issuer


Using certutil


# /usr/sfw/bin/certutil -L -P slapd- -d /var/opt/SUNWdsee/dsins1/alias
defaultCert CTu,u,u

The certificate listed above, defaultCert, is the self-signed certificate, valid for 90 days, that is installed with the Directory Server.

View certificates

View the certificates in the certificate database as follows

Using dsadm


In humanly readable format

# cd /opt/SUNWdsee/ds6/bin
# ./dsadm show-cert -F readable /var/opt/SUNWdsee/dsins1 defaultCert



In ASCII format


# ./dsadm show-cert -i -F ascii /var/opt/SUNWdsee/dsins1 defaultCert
-----BEGIN CERTIFICATE-----
MIICJjCCAY+gAwIBAgIFAIiKjf8wDQYJKoZIhvcNAQEEBQAwVzEZMBcGA1UEChMQ
U3VuIE1pY3Jvc3lzdGVtczEZMBcGA1UEAxMQRGlyZWN0b3J5IFNlcnZlcjEMMAoG
A1UEAxMDNjM2MREwDwYDVQQDEwhzczcyZWQwMTAeFw0wODAxMjIxOTE1NTNaFw0w
ODA0MjIxOTE1NTNaMFcxGTAXBgNVBAoTEFN1biBNaWNyb3N5c3RlbXMxGTAXBgNV
BAMTEERpcmVjdG9yeSBTZXJ2ZXIxDDAKBgNVBAMTAzYzNjERMA8GA1UEAxMIc3M3
MmVkMDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOGafiLwFn+EK9T2w6+/
+165oUnLDm4c8XP+AOIxLJJzqEtP5Avti4294JBdcwTKnKoJ2Fn8xKnhwwOsH8/K
LzmbKh+GwGQ/4LMwmSo1CQBoDerqk6q6OqEdjdz3TFR/yy7bY4arrPSvcegizzfp
cJHH1pkm1tRyGu8b+8Dvtk7FAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAa3c6RN/E
X/rxR12c/LetR2Cwxw6lxmEE13zMkOg7HC1xxKvVrhvhV2/Zeen0cJyla3udu7aT
IwwItZgKJhupESFZtQR4GXETmJT/W3ctyJyUMf9HjELYqc2v8R/o+t3QaF16g6ZY
qyJXWHPSe45blfTKoXG6afXi2XJfvfzQ4jg=
-----END CERTIFICATE-----

(note that der format, ./dsadm show-cert -i -F der /var/opt/SUNWdsee/dsins1 defaultCert, the output is not humanly readable and thus not demonstrated here.)

Using Certutil

The CertUtil utility will also display the certificates
# /usr/sfw/bin/certutil -L -n defaultCert -P slapd- -d /var/opt/SUNWdsee/dsins1/alias


Request and install certs from your Certificate Authority

This procedure describes how you request and install digial certificates from a Certificate Authority.

Certificate request

To install certificates from a certificate authority, proceed as follows:
Generate the certificate request. The format of the request, der or ascii, may depend on your certificate authority. The example below is in der format which is not humanly readable. The request is PKCS 10 format.


/opt/SUNWdsee/ds6/bin/dsadm request-cert --city "My City" --country "US" -F der --name myserver --org "my org" -o /tmp/CertReq --state CA /var/opt/SUNWdsee/dsins1

The above request is in “DER” format (-F der) which is not humanly readable. If the request above was in ascii format (-F ascii) then the output file would read as follows:
# more /tmp/CertReq

Certificate request generated by Sun-Java(tm)-System-Directory/6.2
Common Name: myserver
Email: (not specified)
Phone: (not specified)
Organization:my organization
State: CA
Country: US

-----BEGIN NEW CERTIFICATE REQUEST-----
MIIBsDCCARkCAQAwcDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRQwEgYDVQQHEwtGb3N0ZXIgQ2l0eTEZMBcGA1UECxMQVW5peCBFbmdpbmVlcmluZzEQMA4GA1UEChMHSW5vdmFudDERMA8GA1UEAxMIc3M3MmVkMDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANLpKOwMCjxcnYd5LUO30Z3+m7RRfypec59qDKwVxVMQVnvAVlhz5u6ZFijlpBozcxXJ6iz4fZ9y/arZx4J7jB+3xGd2eKpS2crQ1NX+NPj3GtmbIA+VphP1UOcCr3Jf4j8KC6b4y/ZJOAyQqihn9saO6aN8HRt4XgZ6/D8yYRHhAgMBAAGgADANBgkqhkiG9w0BAQQFAAOBgQBVWjxx6LBau5C/ew0+lmgQ37GBYvDd+iHfdMggpjiyQs4fRxhqr5iU3AwptfpWsZuAtM4cXTqcE/3eTz8GkUYnjy+7YrggrUsFIYYSineQ5OyMYXd2KenPRq1aQGXeBEapKNFwwsuX6pG7xts5oIJ3xPWvtGmrJjLIa+QKCPs78Q==
-----END NEW CERTIFICATE REQUEST-----


Send the above to your certificate authority (CA)
The CA will then send a digital certificate for you to install in your Directory Server. This certificate allows clients to communicate with your server over SSL.
You should also request the signing certificate from your CA. This allows clients to trust the server certificate requested above. You may need multiple signing certificates, the rootCA certificate and any intermediary signing certificates, depending on the configuration of your CA.

Install CA certificates

To install the server and CA signing certificates proceed as follows

Upload the file to the Directory Server as /tmp/CertFile
Upload these to the Directory Server as /tmp/CACert

Installing the server certificate:



Using certutil
# /usr/sfw/bin/certutil –A –n exampleCert –t u,u,u -d /var/opt/SUNWdsee/dsins1/alias –i /tmp/CertFile


Using dsadm:
#/opt/SUNWdsee/ds6/bin/dsadm add-cert /var/opt/sun/dsins1 server-cert /tmp/CertFile

Setting the default certificate

Set the above server certificate as the default server certificate. This is required so that when the client communicates with the server, the server will present the CA certificate to the client. The client can then authenticate the certificate presented:
/opt/SUNWEdsee/ds6/bin/dsconf set-server-prop -e -p 389 ssl-rsa-cert-name:exampleCert

Installing the CA signing certificates:

 Using dsadm
/opt/SUNWdsee/ds6/bin dsadm add-cert -C /var/opt/sun/dsins1 CACert /tmp/CACert

Using certutil
# /usr/sfw/bin/certutil –A –n CA –t CT,, -d /var/opt/SUNWdsee/dsins1/alias –i /tmp/CACert


View the certificates :

Using certutil
/usr/sfw/bin/certutil -L -P slapd- -d /var/opt/SUNWdsee/dsins1/alias

defaultCert                                                  Ctu,u,u – default self signed certificate installed with Directory Server
ServerCert                                                     u,u,u – server certificate provided by your Certificate Authority
Root CA                                                 CT,, - RootCA signiing certificate



Using dsadm
# /opt/SUNWdsee/ds6/bin/dsadm list-certs /var/opt/SUNWdsee/dsins1

Restart Directory Server

/opt/SUNWdsee/dsadm restart /var/opt/SUNWdsee/dsins1


Clients

Now, you need to install the server and rootCA certificates on each client that wishes to communicate with the server over SSL

Create the certificate database.


Execute these commands as root to create the database in the directory: /var/ldap.

/opt/dsrk/lib/nss/bin/certutil -N -d /var/ldap

Set permissions to be readable by all.
chmod 644 /var/ldap/\*.db


Note that Solaris 8 & 9 use certificate databases in cert7.db format. The certutil utility that ships with the Solaris 9 OS in /usr/sfw/bin creates a cert8.db database. To create a cert7.db database, you must use the certutil utility in the Sun Directory Resource Kit. See introduction to this blog posting.

Retrieve the certificates from your Directory server as follows:

Export the server certificate and CA signing certificate.

./dsadm export-cert -o /tmp/ServerCert /var/opt/SUNWdsee/dsins1 myserver
Choose the PKCS#12 file password:
Confirm the PKCS#12 file password:


Copy the certificates to each client

Copy the from the file /tmp/ServerCert from the Directory server to the client.
Also copy the RootCA certificate you received from your CA above to the client

Import the certificates into the databases created above


Import both the Directory Server SSL certificate and the CA signing certificate into the certificate database created above. The example’s certificates are in ASCII PEM format.

certutil -A -a –i /tmp/RootCert -n “RootCA” -t “CT” -d /var/ldap

certutil -A -n "ServerCertificate" -i /var/tmp/ServerCert-a -t “CT” -d /var/ldap



List the newly imported certificates

To List the certificates you have stored in the key database:
# /usr/sfw/bin/certutil -L -d /var/ldap
RootCA CT,,
ServerCertificate CT,,

Test SSL connectivity

Using openSSL


Use the openSSL utility to test connectivity, where myserver.example.com is the name of your Directory Server. This command verifies connnectivity and displays all certificates, as I have highlighed in red font.

# /usr/sfw/bin/openssl s_client -host myserver.example.com -port 636 -showcerts -verify 3

verify depth is 3
CONNECTED(00000004)
depth=2 /C=US/O=example.com/OU=my organization/CN=Root CA
verify error:num=19:self signed certificate in certificate chain
verify return:1
depth=2 /C=US/O=example.com/OU=my organization/CN=Root CA
verify return:1
depth=1 /C=US/O=example.com/OU=my organization/CN=servercert
verify return:1
depth=0 /L=my City/ST=CA/C=US/O=example.com/OU=my organization/CN=myserver.example.com
verify return:1
---
Certificate chain
0 s:/L=my City/ST=CA/C=US/O=example.com/OU=my organization/CN=myserver.example.com
i:/C=US/O=example.com/OU=my organization/CN=servercert
-----BEGIN CERTIFICATE-----
MIID5jCCA0+gAwIBAgIQCTh7EiukoaUCIo4JE4L9ZTANBgkqhkiG9w0BAQUFADBi
MQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl
cm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xEzARBgNVBAMTClZJIENBVGVz
dDIwHhcNMDcwNzE3MTI1MTIxWhcNMTYwODIxMjI0NDQ1WjB8MRQwEgYDVQQHEwtG
b3N0ZXIgQ2l0eTELMAkGA1UECBMCQ0ExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdJ
bm92YW50MRkwFwYDVQQLExBVTklYIEVuZ2luZWVyaW5nMR0wGwYDVQQDExRzczU1
c2pzZHNxMS52aXNhLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxjCg
g3ajsBRadLJo3pqlPyPT4Y4b/5NKA1qWYIEDdsbbL6yJ1hcFfvPrsklaku9yR2Tu
I8bD6jpSRzgI1y3dGijepKYjSVsHLRlOmS6o2+FuxjJ+/F01K2+Rf6xMkdxBzvtx
8ozbgXRJvpzqYno9Y9rX0fOR/xR1042nt5zHGRsCAwEAAaOCAYEwggF9MB8GA1Ud
IwQYMBaAFOU0kJQJkbC6bQoi16wbr80+rYdyMAwGA1UdEwEB/wQCMAAwZQYDVR0g
BF4wXDBaBgQqAwQFMFIwFQYIKwYBBQUHAgEWCTEuMi4zLjQuNTA5BggrBgEFBQcC
AjAtMBgWEVJlcGxhY2UgVGhpcyBUZXh0MAMCAQEaEVJlcGxhY2UgVGhpcyBUZXh0
MIG1BgNVHR8Ega0wgaowKaAnoCWGI2h0dHA6Ly8xMC4yMDMuMTAxLjE5Ni9WSUNB
VEVTVDIuY3JsMH2ge6B5hndsZGFwOi8vMTAuMjAzLjEwMS4xOTY6Mzg5L2NuPVZJ
IENBVEVTVDIsYz1VUyxvdT1WaXNhIEludGVybmF0aW9uYWwgU2VydmljZSBBc3Nv
Y2lhdGlvbixvPVZJU0E/Y2VydGlmaWNhdGVSZXZvY2F0aW9uTGlzdDAOBgNVHQ8B
Af8EBAMCAzgwHQYDVR0OBBYEFC+QNOgvl88QGNULG/a3qD6ZhdeCMA0GCSqGSIb3
DQEBBQUAA4GBAF4VU0P7Y77FCFePK7nWzO3up6rmKiclucbFnzLiplX3bGrjsowK
GhMQObZz8oqJUvxNYIj5NfE+yOv1a/pRCGl3ss0+oyomYs9HcYVUTWiZwz4xEzDq
rzlIN/RzR4COQoYjDKmhLjcM6y1NKi7FiAXoUNsrwgU1jimMfzKMes47
-----END CERTIFICATE-----
1 s:/C=US/O=example.com/OU=my organization/CN=servercert
i:/C=US/O=example.com/OU=my organization/CN=Root CA
-----BEGIN CERTIFICATE-----
MIIEGjCCAwKgAwIBAgIQdtBxrG5ZtJqGl96G5ZEtMzANBgkqhkiG9w0BAQUFADB3
MQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl
cm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xKDAmBgNVBAMTH1RFU1QgVmlz
YSBJbmZvIERlbGl2ZXJ5IFJvb3QgQ0EwHhcNMDYwNTIyMTgyNzAyWhcNMjUwODEy
MjI0OTE0WjBiMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMm
VmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xEzARBgNVBAMT
ClZJIENBVGVzdDIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJRgW5/5yLoo
hjTS2Z0fQdDWokTVZ5klhOty8X+VjfaZBaYwCMjVQFv5g8c23I17PB80kfXaOgte
/PTKFpnSUSOTkGby8IX0dbay+wuoCSLtyOziJvMsbuuru54HMZCcgG6BbfO0WoOD
ZINeuDGD7MvJwnXFFp0CedqrvqkXbHeXAgMBAAGjggE5MIIBNTAfBgNVHSMEGDAW
gBS9YtV/j2zkYg7yp/mhmOrCuJ7nBTASBgNVHRMBAf8ECDAGAQH/AgEAMBIGA1Ud
IAQLMAkwBwYFZ4EDAgEwgboGA1UdHwSBsjCBrzB0oHKgcIZuTERBUDovL3N3NTUw
cWFwa2lsZG0xLnFhY2EuY29tOjM4OS9DTj1WSSUyMENBVGVzdDIsT1U9VmlzYSUy
MEludGVybmF0aW9uYWwlMjBTZXJ2aWNlJTIwQXNzb2NpYXRpb24sTz1WSVNBLEM9
VVMwN6A1oDOGMWh0dHA6Ly93d3cuaW50bC52aXNhY2EuY29tL2NybC9URVNUVklT
QVJPT1RDQS5jcmwwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTlNJCUCZGwum0K
ItesG6/NPq2HcjANBgkqhkiG9w0BAQUFAAOCAQEArgbWFm1MJ22W/+M/M1Dg9eij
ecRsa7rj+Lw+/60ajssjzYcQlwWSOOnlpp8aMFYEojUABcPtSzb81SQy2kkONJw2
GtPNTkFeCKnO0O+EraPZ+YETPkOJhM8xzr0lkeisfIg7+i4PCJcWHLZpJAUB9LGW
ZaoAe/XhXiiU1bOKSmyGHx5cUKYiKHuETou6EgEOeHWr9zlZiP5kdiO/JieG/Fft
fLClx2uJslKXzbnOlxEZ2gPBg20Bz3ykUgVL3mgHSchAwSTFjn6ZD7A4LkAuSLiA
7k4DEQXqwT7nX8c92WbKTTwWIrRIPMwUv2FcYPUkSwrqrbDJEWS9KsXv6oVymA==
-----END CERTIFICATE-----
2 s:/C=US/O=example.com/OU=my organization/CN=Root CA
i:/C=US/O=example.com/OU=my organization/CN=Root CA
-----BEGIN CERTIFICATE-----
MIID7zCCAtegAwIBAgIQU1BiyIG7uNak0ERa1HN39TANBgkqhkiG9w0BAQUFADB3
MQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl
cm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xKDAmBgNVBAMTH1RFU1QgVmlz
YSBJbmZvIERlbGl2ZXJ5IFJvb3QgQ0EwHhcNMDUwODE2MjI0ODUzWhcNMjUwODE1
MjI0ODUzWjB3MQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMm
VmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xKDAmBgNVBAMT
H1RFU1QgVmlzYSBJbmZvIERlbGl2ZXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDcvYrZ3WNJc/H6UOhuu2im3KY18IZlTo86wn9ICgF8
KPqnmOZPLY1Ehn9xoxZNag7mCMBnvAdwW3/N/mWFPa+S023KvikhgYYwDnLXnwwN
cG1pZdETx6w9OVRl/C8xHoQUYIJ/HNSn/mDUELpljhs8uavAXYkOBQtRX3pD/9h4
uJSZWm8R/1QUx51AIq+ly9a6/AWn7qj+bwD8XxjPRVRyYs71MEmIlmkIz3jAfA2p
xH8ZZ3I820VvdhE1AL/ffwFiy7AgN+oVomIlZPwB06L20zL7+1EVp61pTWDF9nmp
bo3r0lKeyRy+81NL675sylzePjPN4z/5Qo1N9pVOH551AgMBAAGjdzB1MA8GA1Ud
EwEB/wQFMAMBAf8wEgYDVR0gBAswCTAHBgVngQMCATAOBgNVHQ8BAf8EBAMCAQYw
HwYDVR0jBBgwFoAUvWLVf49s5GIO8qf5oZjqwrie5wUwHQYDVR0OBBYEFL1i1X+P
bORiDvKn+aGY6sK4nucFMA0GCSqGSIb3DQEBBQUAA4IBAQAa0cCJEFGiDSF9D4UT
BPXkBrvGGZy94MwsN0YKsvLJTBxCXX/PQXS9JX29nsY4a5PAAhgdNV76tUiqUSkb
VEULQfNz8HtlBSVRxkQoglxu2zOGdXeXpsxzr2xoZP3NVLleBntcb3YfA3E3caHB
6I2V1MIS1scOw4xwmz9VOM1I9FnLEbNuNJsgXmpdO1YoSs0mgf+XpsxM00sQXuYO
4bFqv/GIDHd6z0mzKiXYytcF6bXRwoQr2LUBs5LwvpErcgiDDzCMyyXDI/2MJdPZ
Mkko/VaTlXMCX9dMY5d3fxZAlHTLA7OcJbeZjqV2SWeKSaVXjgmvNJNytfx/pZ3M
5qcy
-----END CERTIFICATE-----
---
Server certificate
subject=/L=my City/ST=CA/C=US/O=example.com/OU=my organization/CN=myserver.example.com
issuer=/C=US/O=example.com/OU=my organization/CN=servercert
---
Acceptable client certificate CA names
/C=US/O=example.com/OU=my organization/CN=servercert – CA signed server certificate received with our request
/C=US/O=example.com/OU=my organization/CN=Root CA – root CA signing certificate
/O=Sun Microsystems/CN=Directory Server/CN=636/CN=myserver – default self signed certificate
---
SSL handshake has read 3554 bytes and written 334 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA
Server public key is 1024 bit
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : AES256-SHA
Session-ID: 5DBEF47FCD5B642D41F4974690EA4A8FA1B7964242C39898E86AA3492496C6BB
Session-ID-ctx:
Master-Key: 75B8E8BA280D6794F7177416679C3170B7F1A45F21EF1461D230221872E157EF5F1822C28E5FFF327244E8B818FAAB7C
Key-Arg : None
Start Time: 1214502072
Timeout : 300 (sec)
Verify return code: 19 (self signed certificate in certificate chain)


---

Using secure LDAP search



  • Solaris 8 default ldapsearch does not have SSL capability, unless you have the the ldapclient patch 108993
  • Solaris 9 default ldapsearch does not have SSL capability, but the iplanet ldapseach does in /usr/iplanet/ds5/shared/bin/ldapsearch
  • Solaris 10 default ldapsearch does have SSL support .

/usr/bin/ldapsearch -v -h myserver.example.com -p 636 -Z -P /var/ldap/cert8.db -b "dc=example,dc=com"  -D "cn=directory manager" -w <password> "objectclass=\*"

Sunday, October 9, 2011

How To Configure OpenLDAP to work with Check Point Devices

It is very good document to configure Check Point Devices with Open LDAP.If any body to read this document please provide mail id,I will send soft copy.


https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B5yx0EJNDzuSY2FhNjkyZjQtNjE1MC00N2MyLWJjNjYtNTdkZDBmNDI5MjQ2&hl=en_US

IT’S TIME TO UPGRADE TO ODSEE! (SUN Directory Server)

Directory server tunning with Etime script


This script very strong and use for various tuning in Sun DS---

-bash-3.00$ ./dseeEtimes.pl -t search_etime -o 101 -l /opt/SUNWdsee/13thOct_Logs_backup/
TITLE     : search_etime
RUN       : 9-13-2010
LOGDIR    : /opt/SUNWdsee/13thOct_Logs_backup/
TAG       : Search
UNIT      : sec
        0 :    587554
        1 :       775
        2 :       110
        3 :        37
        4 :        42
        5 :        15
        6 :        10
        7 :         7
        8 :         2
        9 :         3
-bash-3.00$

-bash-3.00$ ./dseeEtimes.pl -t extops_etime -o 120 -l /opt/SUNWdsee/13thOct_Logs_backup/
TITLE     : extops_etime
RUN       : 9-13-2010
LOGDIR    : /opt/SUNWdsee/13thOct_Logs_backup/
TAG       : Extend
UNIT      : sec
        0 :    308818
        1 :       684
        2 :        10
        3 :         2
        5 :         1
       11 :         1
       27 :         1
       49 :         1
       50 :        10
       51 :        11
       52 :         2
       60 :         6
       61 :         1
-bash-3.00$

-bash-3.00$ ./dseeEtimes.pl -t Bind_etime -o 97 -l /opt/SUNWdsee/13thOct_Logs_backup/
TITLE     : Bind_etime
RUN       : 9-13-2010
LOGDIR    : /opt/SUNWdsee/13thOct_Logs_backup/
TAG       : Bind
UNIT      : sec
        0 :    318814
        1 :      4668
        2 :       533
        3 :       250
        4 :       158
        5 :        66
        6 :        57
        7 :        28
        8 :        29
        9 :         5
       10 :         1
       11 :         2
-bash-3.00$


Logs Backup Location: /opt/SUNWdsee/13thOct_Logs_backup

-bash-3.00$ sudo more access.20101013-103640 | grep -i "etime=60"
[13/Oct/2010:11:14:39 +1100] conn=82436502 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60
[13/Oct/2010:11:15:16 +1100] conn=82437001 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60
[13/Oct/2010:11:15:54 +1100] conn=82437273 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60
[13/Oct/2010:11:16:38 +1100] conn=82438117 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60
[13/Oct/2010:11:17:19 +1100] conn=82439086 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60
[13/Oct/2010:11:17:59 +1100] conn=82439767 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60


-bash-3.00$
-bash-3.00$ sudo more access.20101013-103640 | grep "conn=82436502"
[13/Oct/2010:11:13:38 +1100] conn=82436502 op=-1 msgId=-1 - fd=81 slot=81 LDAPS connection from 172.17.8.22:40985 to 172.17.67.231
[13/Oct/2010:11:13:38 +1100] conn=82436502 op=-1 msgId=-1 - SSL 256-bit AES-256
[13/Oct/2010:11:13:39 +1100] conn=82436502 op=0 msgId=1 - BIND dn="" method=128 version=3
[13/Oct/2010:11:13:39 +1100] conn=82436502 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=1 dn=""
[13/Oct/2010:11:13:39 +1100] conn=82436502 op=1 msgId=2 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(uid=root)" 
attrs=ALL
[13/Oct/2010:11:13:39 +1100] conn=82436502 op=1 msgId=2 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:13:39 +1100] conn=82436502 op=2 msgId=3 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(&(objectClass=posixGroup)(memberUid=root))" attrs="cn userPassword memberUid uniqueMember gidNumber"
[13/Oct/2010:11:13:39 +1100] conn=82436502 op=2 msgId=3 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:14:39 +1100] conn=82436502 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60
[13/Oct/2010:11:14:39 +1100] conn=82436502 op=-1 msgId=-1 - closing from 172.17.8.22:40985 - B1 - Client request contains an ASN.1 BER tag that is corrupt or connection aborted -
[13/Oct/2010:11:14:39 +1100] conn=82436502 op=-1 msgId=-1 - closed.
-bash-3.00$
-bash-3.00$ sudo more access.20101013-103640 | grep "conn=82437001"
[13/Oct/2010:11:14:16 +1100] conn=82437001 op=-1 msgId=-1 - fd=76 slot=76 LDAPS connection from 172.17.8.23:50789 to 172.17.67.231
[13/Oct/2010:11:14:16 +1100] conn=82437001 op=-1 msgId=-1 - SSL 256-bit AES-256
[13/Oct/2010:11:14:16 +1100] conn=82437001 op=0 msgId=1 - BIND dn="" method=128 version=3
[13/Oct/2010:11:14:16 +1100] conn=82437001 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0 dn=""
[13/Oct/2010:11:14:16 +1100] conn=82437001 op=1 msgId=2 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(uid=root)" attrs=ALL
[13/Oct/2010:11:14:16 +1100] conn=82437001 op=1 msgId=2 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:14:16 +1100] conn=82437001 op=2 msgId=3 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(&(objectClass=posixGroup)(memberUid=root))" attrs="cn userPassword memberUid uniqueMember gidNumber"
[13/Oct/2010:11:14:16 +1100] conn=82437001 op=2 msgId=3 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:15:16 +1100] conn=82437001 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60
[13/Oct/2010:11:15:16 +1100] conn=82437001 op=-1 msgId=-1 - closing from 172.17.8.23:50789 - B1 - Client request contains an ASN.1 BER tag that is corrupt or connection aborted -
[13/Oct/2010:11:15:16 +1100] conn=82437001 op=-1 msgId=-1 - closed.
-bash-3.00$

-bash-3.00$ sudo more access.20101013-103640 | grep "conn=82437273"
[13/Oct/2010:11:14:54 +1100] conn=82437273 op=-1 msgId=-1 - fd=58 slot=58 LDAPS connection from 172.17.8.24:40994 to 172.17.67.231
[13/Oct/2010:11:14:54 +1100] conn=82437273 op=-1 msgId=-1 - SSL 256-bit AES-256
[13/Oct/2010:11:14:54 +1100] conn=82437273 op=0 msgId=1 - BIND dn="" method=128 version=3
[13/Oct/2010:11:14:54 +1100] conn=82437273 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0 dn=""
[13/Oct/2010:11:14:54 +1100] conn=82437273 op=1 msgId=2 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(uid=root)" attrs=ALL
[13/Oct/2010:11:14:54 +1100] conn=82437273 op=1 msgId=2 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:14:54 +1100] conn=82437273 op=2 msgId=3 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(&(objectClass=posixGroup)(memberUid=root))" attrs="cn userPassword memberUid uniqueMember gidNumber"
[13/Oct/2010:11:14:54 +1100] conn=82437273 op=2 msgId=3 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:15:54 +1100] conn=82437273 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60
[13/Oct/2010:11:15:54 +1100] conn=82437273 op=-1 msgId=-1 - closing from 172.17.8.24:40994 - B1 - Client request contains an ASN.1 BER tag that is corrupt or connection aborted -
[13/Oct/2010:11:15:54 +1100] conn=82437273 op=-1 msgId=-1 - closed.
-bash-3.00$
-bash-3.00$ sudo more access.20101013-103640 | grep "conn=82438117"
[13/Oct/2010:11:15:38 +1100] conn=82438117 op=-1 msgId=-1 - fd=56 slot=56 LDAPS connection from 172.17.8.25:59805 to 172.17.67.231
[13/Oct/2010:11:15:38 +1100] conn=82438117 op=-1 msgId=-1 - SSL 256-bit AES-256
[13/Oct/2010:11:15:38 +1100] conn=82438117 op=0 msgId=1 - BIND dn="" method=128 version=3
[13/Oct/2010:11:15:38 +1100] conn=82438117 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0 dn=""
[13/Oct/2010:11:15:38 +1100] conn=82438117 op=1 msgId=2 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(uid=root)" attrs=ALL
[13/Oct/2010:11:15:38 +1100] conn=82438117 op=1 msgId=2 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:15:38 +1100] conn=82438117 op=2 msgId=3 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(&(objectClass=posixGroup)(memberUid=root))" attrs="cn userPassword memberUid uniqueMember gidNumber"
[13/Oct/2010:11:15:38 +1100] conn=82438117 op=2 msgId=3 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:16:38 +1100] conn=82438117 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60
[13/Oct/2010:11:16:38 +1100] conn=82438117 op=-1 msgId=-1 - closing from 172.17.8.25:59805 - B1 - Client request contains an ASN.1 BER tag that is corrupt or connection aborted -
[13/Oct/2010:11:16:38 +1100] conn=82438117 op=-1 msgId=-1 - closed.
-bash-3.00$

-bash-3.00$ sudo more access.20101013-103640 | grep "conn=82439086"
[13/Oct/2010:11:16:18 +1100] conn=82439086 op=-1 msgId=-1 - fd=90 slot=90 LDAPS connection from 172.17.8.26:40986 to 172.17.67.231
[13/Oct/2010:11:16:18 +1100] conn=82439086 op=-1 msgId=-1 - SSL 256-bit AES-256
[13/Oct/2010:11:16:18 +1100] conn=82439086 op=0 msgId=1 - BIND dn="" method=128 version=3
[13/Oct/2010:11:16:18 +1100] conn=82439086 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0 dn=""
[13/Oct/2010:11:16:18 +1100] conn=82439086 op=1 msgId=2 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(uid=root)" attrs=ALL
[13/Oct/2010:11:16:18 +1100] conn=82439086 op=1 msgId=2 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:16:18 +1100] conn=82439086 op=2 msgId=3 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(&(objectClass=posixGroup)(memberUid=root))" attrs="cn userPassword memberUid uniqueMember gidNumber"
[13/Oct/2010:11:16:18 +1100] conn=82439086 op=2 msgId=3 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:17:19 +1100] conn=82439086 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60
[13/Oct/2010:11:17:19 +1100] conn=82439086 op=-1 msgId=-1 - closing from 172.17.8.26:40986 - B1 - Client request contains an ASN.1 BER tag that is corrupt or connection aborted -
[13/Oct/2010:11:17:19 +1100] conn=82439086 op=-1 msgId=-1 - closed.
-bash-3.00$

-bash-3.00$ sudo more access.20101013-103640 | grep "conn=82439767"
[13/Oct/2010:11:16:59 +1100] conn=82439767 op=-1 msgId=-1 - fd=57 slot=57 LDAPS connection from 172.17.8.27:40979 to 172.17.67.231
[13/Oct/2010:11:16:59 +1100] conn=82439767 op=-1 msgId=-1 - SSL 256-bit AES-256
[13/Oct/2010:11:16:59 +1100] conn=82439767 op=0 msgId=1 - BIND dn="" method=128 version=3
[13/Oct/2010:11:16:59 +1100] conn=82439767 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0 dn=""
[13/Oct/2010:11:16:59 +1100] conn=82439767 op=1 msgId=2 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(uid=root)" attrs=ALL
[13/Oct/2010:11:16:59 +1100] conn=82439767 op=1 msgId=2 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:16:59 +1100] conn=82439767 op=2 msgId=3 - SRCH base="ou=msg,dc=aaa,dc=telstra,dc=com" scope=2 filter="(&(objectClass=posixGroup)(memberUid=root))" attrs="cn userPassword memberUid uniqueMember gidNumber"
[13/Oct/2010:11:16:59 +1100] conn=82439767 op=2 msgId=3 - RESULT err=0 tag=101 nentries=0 etime=0
[13/Oct/2010:11:17:59 +1100] conn=82439767 op=3 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=60
[13/Oct/2010:11:17:59 +1100] conn=82439767 op=-1 msgId=-1 - closing from 172.17.8.27:40979 - B1 - Client request contains an ASN.1 BER tag that is corrupt or connection aborted -
[13/Oct/2010:11:17:59 +1100] conn=82439767 op=-1 msgId=-1 - closed.
-bash-3.00$

From the above we can see that all the etime=60 connections are LDAPS connections. I presume this is a problem with RSA key size or the present harware is not capable of handling 2058 bit RSA key encryption.


Directory Server Security


Directory Server Security
Several security considerations must be taken into account when configuring the
iPlanet™ Directory Server to support Solaris™ Operating Environment (Solaris OE)
native Lightweight Directory Access Protocol (LDAP) clients. To protect naming
service data from intruders, users must be authenticated before gaining access, and
once authenticated must be authorized to perform operations on the naming service
data. Since the LDAP security model for user authentication and authorization is
different than the NIS model that administrators are familiar with, this article
provides an overview of what the LDAP security model consists of and what
security changes need to be made to accommodate the Solaris OE naming service
requirements.
LDAP Security Model
There are two aspects of directory security that affect how native LDAP clients
interact with the directory server: authentication and authorization. Authentication
is the process of identity validation, that is, proving a user’s identity. Authorization
is the granting of access rights to authenticated users. In the NIS naming service,
clients bind to an NIS server without the need for authentication and all clients are
granted the same permissions. All NIS maps are readable by all clients and the
password shadow map is writable by users through the rpc.yppasswdd process
which runs on NIS servers.
Compared to NIS, the iPlanet Directory Server provides a much more flexible
security model. Clients can either be authenticated by one of several methods or
connect to the directory server anonymously. Permissions, or access rights, can be set
for the entire directory content, directory entries, or even data items within an entry.
LDAP Authentication
Clients authenticate to an LDAP server by attempting a bind operation. A connection
between the client and the server is established if the bind is successful. As part of
the bind request, the client chooses which authentication method it wants to use and
supplies the credentials required by that method. If a method is not specified,
credentials are not sent and the client is bound as an anonymous user. The available
methods in iPlanet Directory Server 4.12 are simple name/passwords and digital
certificates using secure socket layer (SSL).
The simple authentication method is the easiest to implement and the only method
currently supported when the native LDAP client is serviced by the iPlanet
Directory Server is used as the server. This method requires a distinguished name
(DN) -and a password associated with the entry identified by the DN. The password
is stored on the directory server in one of three formats: 1) clear text, 2) SHA-1, or 3)
UNIX® crypt. When the server receives the password, either in clear text or in one of
the hashed formats, a comparison is made. If a match is successful, then the
authentication succeeds.
Unlike the Solaris OE, LDAP does not require a specific user account format. Any
directory entry which contains the userPassword attribute can be specified as the
bind DN. One exception to this is the root DN which has the common name (cn) of
Directory Manager. This entry resides outside the directory information tree
(DIT) and has privileges similar to what root has in the Solaris OE. Users who bind
to the directory with this DN have unlimited access rights and can establish rights
for other users.
LDAP Authorization
Authorization to directory objects is based on an access control list (ACL) which is
maintained in the DIT. The ACL is composed of a series of access control
instructions (ACIs). The ACI is an attribute that can be assigned to any directory
object. Each ACI defines a set of access rules and multiple ACIs can be assigned to
the same object. To define access rights for the entire directory, an ACI is set for the
directory suffix of the DIT.
Since there can be, and usually are, multiple ACIs per DIT, rules are established to
determine which ACIs take precedence. ACIs set on objects which appear lower in
the DIT, take precedence over ACIs on objects above them. For example, you may
LDAP Security Model 3
grant read permission for everyone at the top of the DIT, but restrict read access for
subtrees that contain sensitive data. Access can be specified as allow or deny. If there
is a conflict between ACIs, deny always takes precedence.
Note – The ACI is not defined in the LDAP standard and is only used in the iPlanet
Directory Server implementation. Other LDAP servers have their own mechanism
for assigning access rights.
The ACI Structure
Since ACIs are so fundamental to securing directory data, it is helpful to understand
them in detail. During the configuration of the iPlanet Directory Server to support
native LDAP clients, several ACIs are created or modified. While access rights on
certain objects must be set correctly for native LDAP to work, other access rights are
optional and are only recommended. You should have sufficient knowledge of how
ACIs work to customize access rights in accordance with your company’s security
policy.
ACI Format
ACIs are in this general format:
<target> <permission> <bind rules>
n <target>—Specifies the entry to which the ACI is targeted. This is usually a
subtree and/or an attribute that is targeted. In addition, an LDAP search filter can
be specified.
n <permissions>—Defines what the access rights are. These include:
n Read
n Write
n Search
n Compare
n Selfwrite
n Add
n Delete
n <bind rules>—Indicates which bind situation the ACI applies to.
The target is usually expressed as the path to the directory entry it applies to
followed by the attribute(s) it applies to. Wildcards can be used to specify several or
all attributes within an entry. Multiple attributes can be specified to target more than
one specific attribute. If you wish to exclude certain attributes, the not (!) operator
can be used.
Permissions are expressed by either allowing or denying access. Seven types of
access are defined. Use these to restrict whether the data is used in searches and
compares or whether values are modified or deleted. The purpose of one type listed
above, called Selfwrite, may not be obvious. If Selfwrite is set, then users can add/
delete themselves from groups.
The bind rules define which user(s) or bind DN, the ACI applies to along with what
type of access is acceptable. Users can be placed in groups with permissions set for
members of the groups. In addition to restricting or allowing access to user and
groups, you can specify other binding criteria. For example, you could only allow
connections from clients with particular IP addresses or restrict access to certain
times of the day.
Use bind rules to set permissions for all users who successfully bind to the directory.
They can also set permissions for users who do not supply a bind DN, which is also
called an anonymous bind. It is important to note that these are two different
situations although the keywords used, all and anyone, sound similar. If allowing
anonymous binding is desired, the anyone keyword is required.
How Native LDAP Clients Bind
Before the native LDAP client can access naming service data in the iPlanet
Directory Server, it must first perform a bind operation. Since this occurs during the
boot sequence, a user is not logged in at the time. Therefore, the client must have a
LDAP Security Model 5
bind DN and password stored locally to use the data. The client obtains this
information from client profiles that are stored on the directory server. The following
is a sample profile in LDAP Data Interchange Format (LDIF) format.
The sample profile LDIF is generated by the ldap_gen_profile command. Of
interest in the output is the DN:
cn=proxyagent,ou=people,dc=blueprints,dc=com
This is the DN the client will use to bind with. Associated with the bind DN is a
password stored in the SolarisBindPassword attribute. This is stored in a hashed
format and sent over the network to the iPlanet Directory Server along with the DN
for the entry cn=proxyagent. This entry could be named anything, but the name
proxyagent gives it some meaning. The entry is set up using the following LDIF:
dn: cn=default,ou=profile,dc=blueprints,dc=com
SolarisBindDN:
cn=proxyagent,ou=people,dc=blueprints,dc=com
SolarisBindPassword: {NS1}c53708877bc6
SolarisLDAPServers: 129.148.181.130
SolarisSearchBaseDN: dc=blueprints,dc=com
SolarisAuthMethod: NS_LDAP_AUTH_SIMPLE
SolarisTransportSecurity: NS_LDAP_SEC_NONE
SolarisSearchReferral: NS_LDAP_FOLLOWREF
SolarisSearchScope: NS_LDAP_SCOPE_ONELEVEL
SolarisSearchTimeLimit: 30
SolarisCacheTTL: 43200
cn: default
ObjectClass: top
ObjectClass: SolarisNamingProfile
dn: cn=proxyagent,ou=people,dc=blueprints,dc=com
cn: proxyagent
userpassword: secret
objectclass: top
objectclass: person

In the previous LDIF example, the objectclass person is used to create the entry, but
any objectclass which contains the userpassword attribute will work. The profile
information for binding is stored in the /var/ldap/ldap_client_cred file as
shown below:
The Proxy Agent ACI
Since the native LDAP client is binding as cn=proxyagent, this DN needs to be
able to access user passwords so that Solaris OE users can be authenticated. To
enable this, an ACI must be created similar to the following LDIF.
This ACI will be added to the top entry (suffix) of the directory server. It is
important to note that compare, read, and search permissions must be granted.
Self Entry Modification
If the iPlanet Directory Server is installed using the Typical option, an ACI is
automatically created that grants write permission to the entry which the user binds
to the directory with. Leaving this ACI unchanged creates a security hole since the
blueprints# more ldap_client_cred
#
# Do not edit this file manually; your changes will be lost.Please
use ldapclient (1M) instead.
#
NS_LDAP_BINDDN= cn=proxyagent,ou=people,dc=blueprints,dc=com
NS_LDAP_BINDPASSWD= {NS1}c53708877bc6
dn: dc=blueprints,dc=com
changetype: modify
add: aci
aci: (target="ldap:///dc= blueprints,dc=com")
(targetattr="userPassword")
(version 3.0; acl "password read"; allow (compare,read,search)
userdn = "ldap:///
cn=proxyagent,ou=people,dc=blueprints,dc=com"; )
LDAP Security Model 7
user would be able to change the uidNumber attribute in the entry to 0. This
effectively grants root permissions to that user. To prevent this, the default ACI is
changed as reflected in the following LDIF.
The userPassword attribute is excluded in the previous LDIF example, because
users must still be able to change their passwords.
VLV Control Access
Another modification needed to the default ACI settings is to allow anonymous
access to the Virtual List View (VLV) control object. As discussed in the Directory
Server Indexing article , VLVs are used to create browsing indexes that are frequently
used by the native LDAP client when accessing data. By default, an ACI is set to
allow all users who successfully bind to the directory permission to access the VLV
control object. However, during client initialization, an anonymous bind is required
since a bind DN has not been established.
To allow anonymous binding, the userdn field needs to be changed from all to
anyone as shown below.
dn: dc=blueprints,dc=com
changetype: modify
replace: aci
aci: (targetattr != "cn || uid || uidNumber || gidNumber ||
gidNumber || homeDirectory || shadowLastChange || shadowMin ||
shadowWarning || shadowInactive || shadowExpire || shadowFlag ||
memberUid") (version 3.0; acl "Allow self entry modification";
allow (write) userdn = "ldap:///self"; )
dn: oid=2.16.840.1.113730.3.4.9,cn=features,cn=config
changetype: modify
replace: aci
aci: (targetattr != "aci")(version 3.0; acl "VLV Request
Control"; allow( read ,
search, compare ) userdn = "ldap:///anyone";)

Authenticating Solaris OE Users
After the native LDAP client binds to the directory server, account information
stored there is used to authenticate users attempting to log in. There are two options
for authentication: 1) Traditional UNIX system-based and 2) LDAP-based. Which
authentication method is used depends on the client’s Pluggable Authentication
Module (PAM) configuration. The PAM UNIX (pam_unix) module has been
enhanced so that passwords stored in UNIX crypt format are retrieved from an
LDAP server instead of an NIS or NIS+ server. A new PAM module, PAM LDAP
(pam_ldap), is used to perform the authentication on the LDAP server.
While the PAM LDAP module is capable of performing authentication using
sophisticated methods such as Challenge Response Authentication Mechanism,
Message digest 5 (CRAM-MD5), the iPlanet Directory Server version 4.12 does not
support this method. Simple username/password pairs are the only method
currently supported through thePAM UNIX module. However, the use of this
method is discouraged since passwords are transmitted in clear text over the
network. Instead, use the enhanced PAM UNIX module since only the crypt format
is sent over the network.
Conclusion
The LDAP security model is measurably different than any previous naming service
supported by the Solaris OE. The iPlanet Directory Server provides a flexible
mechanism for controlling access to directory data, but this mechanism can be quite
complex and requires becoming well-acquainted with it. When configuring the
iPlanet Directory Server to support native LDAP clients, modifications to the default
ACIs is required. Understanding what these modifications do and why they are
necessary will help you diagnose directory access problems you may encounter in
the future.
e�@0t8@� �� ack'>VLV Implementation
The VLV mechanism is implemented as a control in the iPlanet Directory Server.
Clients wishing to use this mechanism do so by accessing the VLV control. To do
this, the client must have permission to access it.
Note – By default, the VLV control does not grant anonymous access. Since the
Solaris OE LDAP client requires an anonymous bind during initialization, the ACI
for the VLV control must be modified.
Through the VLV control, the client has access to two object classes: vlvSearch and
vlvIndex. The vlvSearch object class specifies the result set of the search and the
vlvIndex object class specifies how the returned result set is sorted. This is done
through the vlvSort attribute.
Creating a VLV requires a pair of entries which include the vlvSearch and
vlvIndex object classes. The vlvSearch entry includes a search base and the
vlvFilter attribute which specifies the object class that contains the attribute(s)
you intend to sort. The vlvIndex object class includes the vlvSort attribute which
specifies one or more attributes to sort and in which order to sort them (a minus “-”
sign denotes reverse order).
The following is an example of the LDIF which creates the getpwent VLV index
that is used by the Solaris OE LDAP client when retrieving a list of user login IDs or
common names. The entries are always stored in the directory information tree
(DIT) under cn=config,cn=ldbm and must each be given a unique name. The
vlvBase is an attribute which reflects where your naming service data is stored
and varies depending on your configuration.
Virtual List Views 9
Note – The distinguished name (DN) given to the vlvIndex entry is confusing
since it also contains the component cn=getpwent. However, this is the naming
convention chosen and it must be adhered to.
TABLE 2 lists the other VLV indexes recommended along with the changes to the
search base, filter, and attributes to be sorted on.
After you create an LDIF file with the information provided in TABLE 2, you need to
import it into your directory server, it assumes the LDIF file name of vlv.ldif (see
example here).
dn: cn=getpwent,cn=config,cn=ldbm
objectclass: top
objectclass: vlvSearch
cn: getpwent
vlvBase: ou=people,dc=blueprints,dc=com
vlvScope: 1
vlvFilter: (objectclass=posixAccount)
aci: (target="ldap:///
cn=getpwent,cn=config,cn=ldbm")(targetattr="*)
(version 3.0; acl
"Config";allow(read,search,compare)userdn="ldap:///anyone";)
dn: cn=getpwent,cn=getpwent,cn=config,cn=ldbm
cn: getpwent
vlvSort: cn uid
objectclass: top
objectclass: vlvIndex
TABLE 2 Solaris OE LDAP Client VLV Indexes
VLV Name Search Base: Filter on: Sort on:
getpwent ou=people posixAccount cn.uid
getgrent ou=group posixGroup cn,gidNumber
gethostent ou=hosts ipHost cn,ipHostNumber
getnetent ou=networks ipNetwork cn,ipNetworkNumber
getspent ou=people posixAccount cn,uidNumber
# ldapmodify -a -D “cn=Directory Manager” -w password -f vlv.ldif
10 Directory Server Indexing • November 2000
Once the VLV indexes are added to the directory, you still need to enable them
before they can be used. To do this, run the vlvindex command as shown here.
Since it is always a good practice to verify that the VLV indexes have been defined,
run the ldapsearch command and observe the vlvsearch lines as shown here.
You should also observe the creation of the new db files.
Viewing Index Activity
The iPlanet Directory Console provides a convenient way to monitor the database
cache activity. Cumulative statistics are displayed which show how often the indexes
have been accessed and what the cache hit ratio is. Once the caches are full, you
should see close to a 100% hit ratio with no pages being written out. If you do not,
# install-dir/slapd-instance/vlvindex getpwent
# install-dir/slapd-instance/vlvindex getgrent
# install-dir/slapd-instance/vlvindex gethostent
# install-dir/slapd-instance/vlvindex getnetent
# install-dir/slapd-instance/vlvindex getspent
# ldapsearch -s base -b "" objectclass=\*
. . .
vlvsearch: cn=getspent,cn=config,cn=ldbm
vlvsearch: cn=getpwent,cn=config,cn=ldbm
vlvsearch: cn=getnetent,cn=config,cn=ldbm
vlvsearch: cn=gethostent,cn=config,cn=ldbm
vlvsearch: cn=getgrent,cn=config,cn=ldbm
. . .
# cd install-dir slapd-instance/db
# ls -l | grep vlv
-rw------- 1 nobody nobody 16384 Sep 8 10:07 vlv#gethostent.db2
-rw------- 1 nobody nobody 16384 Sep 8 10:07 vlv#getgrent.db2
-rw------- 1 nobody nobody 16384 Sep 8 10:07 vlv#getnetent.db2
-rw------- 1 nobody nobody 16384 Sep 8 10:07 vlv#getpwent.db2
-rw------- 1 nobody nobody 16384 Sep 8 10:07 vlv#getspent.db2
#
Conclusion 11
this could be an indication that the database cache is too small and should be
enlarged. Little or no activity on an index is an indication that the index is not
being used and it may be a candidate for removal.
You can view the following screen by going to the Status-—>Performance
Counters—>Database tab in the Directory Console. Only a portion of the screen
is shown here and it displays three of the VLV indexes that were created. Since
this was taken just after the VLV indexes were created, there is no current activity.
Conclusion
Indexing plays an important role in optimizing the performance of your directory
server. Both types of indexing discussed in this article, attribute and VLV, should be
deployed when configuring a directory server to support the native LDAP naming
service which is included in the Solaris 8 OE.
After indexes are created you should always verify that they were configured
correctly by examining the DIT and verifying that the associated index files were
created. Since it is not always obvious that a poorly indexed server is the root cause
of a performance problem, careful monitoring is also recommended.