[Contents] [Previous] [Next] [Index]

Chapter 5
Planning Security Policies

Part of any directory deployment is determining the security policy that you will use for your directory. Security policy means the rules that you use to grant and restrict directory access to individual users or, more frequently, groups of users.

In this chapter you will learn about the implementation of security policies and how you can represent security policies in your directory. This chapter includes the following sections:

Security Policy Overview

The security policy that you use for your directory is a reflection of the:

You can keep your directory as secure or relaxed as is dictated by the situation in your enterprise. The planning that you performed for your directory data will form the foundation for your security policy. In addition, the general attitude at your enterprise regarding security will also drive the nature of your directory's security policy.

The Netscape Directory Server provides an extremely flexible access-control mechanism that you can use to define virtually any security policy, from the very simple to the very complex.

Because of the flexibility of the access-control mechanism, plan some time during your deployment phase during which you can apply your access-control information and make sure that it adequately represents your security desires. During this time, become familiar with the intricacies of the access-control mechanism and make sure that the access-controls that you add to your directory are as easy to administer as possible.

Your security policy should be strong enough to prevent sensitive information from being modified or retrieved by unauthorized users while simple enough that you can easily administer it. Ease of administration is very important when it comes to your security policy. A complex security policy can lead to mistakes that either prevent people from accessing information that you want them to access or, worse, allow people to modify or retrieve directory information that you do not want them to access.

Directory Access Rules

It is useful to understand how LDAP clients bind (authenticate) to the directory before examining how you can control access to your directory.

Note that the mechanism used for directory authentication is the same for both people and LDAP-aware applications (such as any Netscape SuiteSpot server that is configured to use the directory).

User Authentication

In general you must authenticate to the directory server before you can access the directory's contents. The only exception to this is if you have set up anonymous access for your directory.

Conceptually, directory authentication can be thought of as logging in to the directory. LDAP directory servers, however, usually refer to this operation as binding to the directory.

Generally, bind operations consist of providing the equivalent of a user ID and a password. However, in the case of an LDAP directory, the user ID is actually a distinguished name. The distinguished name used to access the directory is referred to as the bind DN. It is generally true that the bind DN corresponds to the name of an entry in the directory, although this is not always the case. When you bind as the root DN, for example, there is no corresponding directory entry.

Also, the bind DN most frequently corresponds to an entry that represents a person, but again this is also not always true. Some directory administrators find it useful to bind as an organizational entry rather than as a person. The only real requirement is that the bind DN and the corresponding password must somehow be known to the directory. This means that the entry represented by the bind DN must use an object class structure that allows the userPassword attribute.

Note, too, that most LDAP clients go to some lengths to hide the bind DN from the user because DNs are often long strings that are hard to remember and easy to mistype. When a client attempts to hide the bind DN from the user, it uses a bind algorithm such as the following:

  1. The user enters a unique identifier such as a user ID (For example, fchen).

  2. The LDAP client searches the directory for that identifier and returns the associated distinguished name (such as uid=fchen, ou=people, o=airius.com).

  3. The LDAP client binds to the directory using the retrieved distinguished name and the password supplied by the user.
Both the directory server gateway and the administration server Users and Groups gateway use this type of authentication mechanism to bind the user to the directory. In addition, any SuiteSpot server that is using the directory for user-authentication purposes also follows this algorithm.

Certificate-Based Authentication

An alternate form of directory authentication involves using security certificates to bind to the directory. Instead of providing a user name and a password, the user is prompted for a password the first time he attempts to access the directory. However, this password is not matched to a password stored in the directory. Instead, it is the password that opens the user's certificate database.

If the password supplied by the user is correct, the directory client obtains authentication information from the certificate database. The client and the directory server then use this information to identify the user by mapping the user's certificate to a directory DN. Directory access is allowed or denied based on the directory DN that is discovered based on this identification process.

For more information on certificates and SSL, see Managing Netscape Servers.

Authenticating Using Directory Server for NT

If you are not using the NT Synchronization Service, you can skip this section.

The directory server is capable of performing NT pass-through authentication if all the proper conditions are met. NT pass-through authentication is the process by which the directory server contacts an NT domain and confirms a user's authentication with that domain. If the user's authentication credentials are confirmed by the NT domain, the user is granted access to the directory.

When users authenticate to a directory server running on NT, the directory server first attempts to confirm the user's identity using the normal directory server authentication mechanisms. If this authentication fails, the directory server attempts to confirm authentication with the appropriate NT Primary Domain Controller if the following conditions are true:

In the event that the previous conditions are met, the directory server:

  1. Contacts the NT domain identified on the user's NTUserDomainId attribute.

  2. Attempts to authenticate to the NT domain using the user ID stored on the NTUserDomainId attribute and the password provided by the user on the original authentication attempt.
If the NT pass-through authentication succeeds, then the user is granted access to the directory server. Access is granted based on the permissions granted for the user's bind entry.

Anonymous Access

Anonymous access can be configured for the directory such that anyone can access the directory without providing bind credentials. That is, clients do not need to provide a bind DN or password to gain access. When a bind DN and password are not provided to the directory, the directory assumes a null bind DN and a null password, and the access that it allows or denies depends on the permissions that you have set up for anonymous access.

Note that anonymous access is also granted if the user authenticates using a bind entry that does not include a userPassword attribute-data pair and the user does not provide a password on the bind attempt.

However, the directory server fails the bind attempt if the user authenticates using a bind entry that does not include a userPassword attribute-data pair and the user provides any non-null string for the password.

Usually directory administrators only allow anonymous access for read, search, and compare privileges (not for write, add, delete, or selfwrite). Also, the access is usually limited to a subset of attributes that contain information generally useful across the enterprise, such as person names, telephone numbers, email addresses, and so forth. Anonymous access should never be allowed for more sensitive data such as government identification numbers (social security numbers in the US), home telephone numbers and addresses, salary information, and so forth.

The various privileges that you can set for the directory are described in "Permissions". For general advice for allowing or denying access to specific attributes, see "Setting Permissions".

Root DN Authentication

The root DN is the distinguished name for the privileged directory user. After authentication, the root DN has complete access to the database regardless of the access-controls in use on the database.

It is not required that a root DN be configured for the directory. In general, though, the root DN is configured when the directory server is configured. As a general rule, you should use your root DN to initially populate your database and set up access-controls for normal directory entries. As soon as you have configured at least one entry that has full access to the directory, then you should stop using the root DN for normal directory operations.

Warning If you configure a root DN at server installation time, you must also provide a root password. However, it is possible for the root password to be deleted from slapd.conf by direct editing of the file. This can create operational problems with your server. Always be sure to provide a root password in slapd.conf when you configure a root DN for your directory.
For more information on database usage and your directory server, see the Netscape Directory SDK Programmer's Guide.

Access-Control Lists

Access-Control Lists (ACLs) provide you with the ability to control access to your directory. You can either allow or deny access to your directory using ACLs. Your directory's ACL is composed of a series of one or more access-control information (ACI) statements that either allow or deny permissions such as read, write, search, and compare to specified entries and their attributes.

Using the ACL, you can set permissions for:

In addition, you can set permissions for a specific user, all users belonging to a specific group, or for all users of the directory. Finally, you can also define access for a network locations such as an IP address or a DNS name.

Setting Permissions

By default all users are denied access rights of any kind. The exception to this is the root DN. For this reason, you must set some ACIs for your directory if you want your users to be able to access your directory.

The following sections describe the access-control mechanism provided by your directory server. For information on how to set ACIs in your directory, see the Netscape Directory Server Administrator's Guide.

The Precedence Rule

When a user attempts any kind of access to a directory entry, the directory server examines the access-control set in the directory from the entry being accessed back to the top, or root, or the directory tree held by the server.

Because the ACL allows you to set permissions that denies as well as grant access, it is important to remember the precedence rule:

Precedence Rule If two permissions exist and are in conflict, the permission that denies access always takes precedence over the permission that grants access.
For example, if you deny write permission at the directory's root level, and you make that permission applicable to everyone accessing the directory, then no user can write to the directory regardless of any other permissions that you may allow for a user. To allow a specific user write permissions to the directory, you have to restrict the scope of the original deny-for-write so that it does not include the user. Then you have to create an additional allow-for-write permission for the user in question.

Because of this, and because by default users are denied access anyway, you should use deny permissions sparingly in order to avoid potential confusion.

Allowing or Denying Access

You can either explicitly allow access or you can explicitly deny access to your directory tree. Be careful of explicitly denying access to the directory. Because of the precedence rule, if the directory can find any rules explicitly forbidding access, it will do so regardless of any conflicting permissions that may grant access. It can be very confusing to set a rule that allows access, only to find that access is not permitted because another rule explicitly denies the access from some other point in the directory.

Because of the precedence rule and the administrative problems an explicit deny can create, and because access is denied by default anyway, it is best to limit the scope of your allow access rules to include only the smallest possible subset of users or clients. For example, you can set permissions that allow users to write to any attribute on their directory entry, but then deny all users except members of the Directory Administrators group the privilege of writing to the uid attribute. A better approach is to write two access rules that allow write access in the following ways:

By providing only allow privileges that carefully restrict the scope of the privilege, you avoid the need to set an explicit deny privilege and therefore avoid possible administrative problems.

When to Explicitly Deny Access

Because of the reasons stated above, there are very few situations when it is desirable to set an explicit deny. Even so, you may find an explicit deny to be useful in the following situations:

Where to Place Access-Control Rules

Access-control rules can be placed on any entry in the directory. For the most common usages of the directory server, access-control rules are placed on entries of type country, organization, organizationalUnit, inetOrgPerson, or group.

To simplify your ACL administration, try to group these rules together as much as possible. Since a rule generally applies to its target entry and to all that entry's children, it is best to place access-control rules on root points in the directory or on directory branch points, rather than scatter them across individual leaf (such as person) entries.

Using Filtered Access-Control Rules

One of the more powerful features of the directory server ACI model is the ability to use LDAP search filters to set access-control. This feature allows you to set a type of access to any directory entry that matches a defined set of criteria.

For example, you could allow read access for any entry that contains an organizationalUnit attribute that is set to Marketing.

One of the more powerful uses of filtered access-control rules is that you can use this feature to predefine types of access. For example, suppose your directory contains home address and telephone number information. Some people will want to publish this information, while others will want to be "unlisted." You can handle this situation by doing the following:

For more information on using LDAP search filters, and on using LDAP search filters with ACIs, see the Netscape Directory Server Administrator's Guide.

The ACI Format

When designing your security policy, it is helpful to have a broad understanding of how ACIs are represented in your directory. It is also helpful to understand what permissions you can set in your directory. Note that this section is not intended to provide you with a detailed description of the Netscape ACL mechanism. For a complete description of the ACL format, see the Netscape Directory Server Administrator's Guide.

Directory ACIs take the following general form:

   <target> <permission> <bind rule>
Each of these parts of an ACI are:

Taken together, ACIs are expressible as follows:

"For the directory object <target>, allow or deny <permission> if the <bind rule> is true."
Note that <permission> and <bind rule> are set as a pair, and you can have multiple <permission>-<bind rule> pairs for every target. This allows you to efficiently set multiple access-controls for any given target. For example:

   <target>(<permission><bind rule>)(<permission><bind rule>)...

Targets

You must decide what entry is targeted by each and every ACI that you create in your directory. If you target a directory entry that represents a directory branch point, then that branch point as well as all of its child entries are included in the scope of the permission. If you do not explicitly specify a target entry for the ACI, then the ACI is targeted to the directory entry that contains the ACI statement. Also, the default set of attributes targeted by the ACI is any attribute available in the targeted entry's object class structure.

For every ACI, you can target only one entry or only those entries that match a single LDAP search filter.

In addition to targeting entries, you can also target attributes on the entry. This allows you to set a permission that applies to only a subset of attribute values. You can target sets of attributes by explicitly naming those attributes that are targeted, or by explicitly naming the attributes that are not targeted by the ACI. Use the latter case if you want to set a permission for all but a few attributes allowed by an object class structure.

Permissions

You allow or deny permissions. In general, you should avoid denying permissions for the reasons explained in "Allowing or Denying Access".

You can allow or deny the following permissions:

Bind Rules

While targets indicate what directory object the ACI applies to, bind rules indicate the bind situations that the ACI applies to. Normally this means that the bind rule indicates which bind DNs the permission applies to.

For example, you can set a permission that allows anyone binding as Babs Jensen to write to Babs Jensen's telephone number. The bind rule in this permission is that part that states "if you bind as Babs Jensen." The target is Babs Jensen's phone number, and the permission is write access.

Bind rules allow you to easily express that the ACI applies only to a user's own entry. You can use this to allow users to update their own entries without running the risk of a user updating another user's entry.

However, bind rules can be used to express more complex bind situations than just bind DNs.

Using bind rules, you can indicate that the ACI is applicable:

The following keywords are provided to help you more easily express these kinds of access:

Using ACIs: Some Hints and Tricks

The following are some ideas that you should keep in mind when you implement your security policy. They can help to lower the administrative burden of managing your directory security model and improve your directory's performance characteristics.

Note that some of the following hints have already been described earlier in this chapter. They are included in this list for completeness.

Creating a Security Policy

Now that you have a general idea of how access-control is handled in the directory, you can begin generating your security policy.

When you performed your data analysis (see "Analyzing Your Site Survey"), you should have made some basic decisions about who can read and write the individual pieces of data in your directory. This information now forms the basis of your security policy.

Planning Your Groups

When you perform your data analysis, you make some basic decisions on what groups of people can read and write information. You should now formally identify all the groups that you need in your directory. As you formally identify and name your groups, make sure you document your decisions. Make sure you know the formal name of each group, the general permissions you want each group to have, and the people who you immediately will want to add to each group.

Note While they are implemented in essentially the same way, there are two types of groups that your directory will contain. One is used for identifying access- control permissions for a defined set of people. Another is used for managing mailing lists. This latter group typically uses the mailGroup object class. Its usage is not discussed in this manual.
For example, many directories commonly have an Administrator's group (SuiteSpot servers actually require this group for certain kinds of server administration. For more information, see Managing Netscape Servers). Usually the Administrator's group is granted complete access to the directory. By adding users to this group, you are granting those users full read, write, search, and compare privileges to the entire directory. Typically you will want this group to contain just a small number of users (3-10, depending on the size of your enterprise).

In addition to the Administrator's group, you may also want to create groups of users that have some, but not complete, write access to the directory. One such group may be Department Administrators. Some enterprises use Department Administrators to manage a subset of employee information, such as fax numbers, department numbers, and physical location information. By distributing these administration burdens to a select, identifiable group of people, you are make your directory easier to manage and ensure that you have data consistency at least at the department level.

Some other groups that you might need include:

In addition, if you want to allow local management of directory data, then you need to consider the administrative groups needed at each individual site. This is especially true if you are allowing directory data to be managed at local sites around your enterprise. This situation is especially likely to occur if you are replicating data to geographically separate locations.

Group Usage Advice

As you plan your groups, make sure you do the following:

Determining General Directory Access

A basic decision you need to make regarding your security policy is how will users generally access the directory. In short, will you allow anonymous access, or will you require every person who uses your directory to bind to the directory?

Consider these key points:

Determining Points of Access

Many enterprises restrict directory updates to clients running at a given IP address or from a specific DNS hostname. This ensures that the directory cannot be updated unless the person has access to a specific machine or sets of machines.

You may want to restrict read and search access to your directory to only a specific IP address, subnet, or domain name. This allows you to ensure that only people physically inside your enterprise can access your directory. To support this, the Netscape Directory Server ACL model allows wildcard patterns on IP addresses and DNS hostnames.

Note that you may feel that this level of access-control is unnecessary for a wide variety of reasons. However, you should consider this level of directory access if any of the following apply to you:


[Contents] [Previous] [Next] [Index]

Last Updated: 02/17/98 15:41:59


Copyright © 1997 Netscape Communications Corporation




Изменено 19-Mar-98 10:06
Copyright (С) 1999 Оптилинк