Contained WithinFind More DocumentationFeatured Support Resources | Scarica il manuale in formato PDF (4117 KB)
Chapter 19 Configuring Security and Access ControlMessaging Server supports a full range of flexible security features that allow you to keep messages from being intercepted, prevent intruders from impersonating your users or administrators, and permit only specific people access to specific parts of your messaging system. The Messaging Server security architecture is part of the security architecture of Sun Java System servers as a whole. It is built on industry standards and public protocols for maximum interoperability and consistency. To implement Messaging Server security policies, therefore, you will need not only this chapter but several other documents as well. In particular, information in Sun ONE Server Console 5.2 Server Management Guide is required for setting up Messaging Server security. This chapter contains the following sections: About Server SecurityServer security encompasses a broad set of topics. In most enterprises, ensuring that only authorized people have access to the servers, that passwords or identities are not compromised, that people do not misrepresent themselves as others when communicating, and that communications can be held confidential when necessary are all important requirements for a messaging system. Perhaps because the security of server communication can be compromised in many ways, there are many approaches to enhancing it. This chapter focuses on setting up encryption, authentication, and access control. It discusses the following security-related Messaging Server topics:
Not all security and access issues related to Messaging Server are treated in this chapter. Security topics that are discussed elsewhere include the following:
There are a large number of documents that cover a variety of security topics. For additional background on the topics mentioned here and for other security-related information, see documentation web site at http://docs.sun.com. About HTTP SecurityMessaging Server supports user ID/password authentication, client certificate authentication, and Access Manager. There are some differences, however, in how the protocols handle network connections between client and server. When a POP, IMAP, or SMTP client logs in to Messaging Server, a connection is made and a session is established. The connection lasts for the duration of the session; that is, from login to logout. When establishing a new connection, the client must reauthenticate to the server. When an HTTP client logs in to Messaging Server, the server provides a unique session ID to the client. The client uses the session ID to establish multiple connections during a session. The HTTP client need not reauthenticate for each connection; the client need only reauthenticate if the session is dropped and the client wants to establish a new session. (If an HTTP session remains idle for a specified time period, the server will automatically drop the HTTP session and the client is logged out; the default time period is 2 hours.) The following techniques are used to improve the security of HTTP sessions:
For information about specifying configuration parameters for improved connection performance, see Chapter 5, Configuring POP, IMAP, and HTTP Services For information on Access Manager see Chapter 6, Enabling Single Sign-On (SSO) Configuring Authentication MechanismsAn authentication mechanism is a particular method for a client to prove its identity to a server. Messaging Server supports authentication methods defined by the Simple Authentication and Security Layer (SASL) protocol and it supports certificate-based authentication. The SASL mechanisms are described in this section. For more information about certificate-based authentication, see Configuring Encryption and Certificate-Based Authentication. Messaging Server supports the following SASL authentication methods for password-based authentication.
Note – This feature is deprecated and will be removed in a future release.
With a challenge/response authentication mechanism, the server sends a challenge string to the client. The client responds with a hash of that challenge and the user's password. If the client's response matches the server's own hash, the user is authenticated. The hash isn't reversible, so the user's password isn't exposed when sent over the network. Note – The POP, IMAP, and SMTP services support all SASL mechanisms. The HTTP service supports only the plaintext password mechanism. Table 19–1 shows some SASL and SASL-related configutil parameters. For the latest and most complete listing of configutil parameters, see the configutil Parameters in Sun Java System Messaging Server 6 2005Q4 Administration Reference. Table 19–1 Some SASL and SASL-related configutil Parameters
To Configure Access to Plaintext PasswordsTo work, the CRAM-MD5, DIGEST-MD5, or APOP SASL authentication methods require access to the users’ plaintext passwords. You need to perform the following steps:
|
# echo "password" > /opt/SUNWmsgsr/config/sslpassword |
where password is your specific password.
Move to the sbin directory and generate the certificate database (cert8.db) and key database (key3.db). For example:
# cd /opt/SUNWmsgsr/sbin # ./certutil -N -d /opt/SUNWmsgsr/config -f /opt/SUNWmsgsr/config/sslpassword |
Generate a default self-signed root Certificate Authority certificate. Example:
# ./certutil -S -n SampleRootCA -x -t "CTu,CTu,CTu" -s "CN=My Sample Root CA, O=sesta.com" -m 25000 -o /opt/SUNWmsgsr/config/SampleRootCA.crt -d /opt/SUNWmsgsr/config -f /opt/SUNWmsgsr/config/sslpassword -z /etc/passwd |
Generate a certificate for the host. For example:
../certutil -S -n Server-Cert -c SampleRootCA -t "u,u,u" -s "CN=hostname.sesta.com, o=sesta.com" -m 25001 -o /opt/SUNWmsgsr/config/SampleSSLServer.crt -d /opt/SUNWmsgsr/config -f /opt/SUNWmsgsr/config/sslpassword -z /etc/passwd |
where hostname.sesta.com is the server host name.
Validate the certificates. For example:
# ./certutil -V -u V -n SampleRootCA -d /opt/SUNWmsgsr/config # ./certutil -V -u V -n Server-Cert -d /opt/SUNWmsgsr/config |
List the certificates. For example:
# ./certutil -L -d /opt/SUNWmsgsr/config # ./certutil -L -n Server-Cert -d /opt/SUNWmsgsr/config |
Use modutil to list the available security modules (secmod.db). For example:
# ./modutil -list -dbdir /opt/SUNWmsgsr/config |
Change the owner of the certificate database files to the mail server user and group, as shown in the example.
chown mailsrv:mail /opt/SUNWmsgsr/config/cert8.db chown mailsrv:mail /opt/SUNWmsgsr/config/key3.db |
Restart the messaging services to enable the SSL.
Previously, certificates and key files were always located in the Messaging Server configuration directory. It is now possible to specify the location of the these files using local.ssldbpath (specifies the location of the certificate and key files) and local.ssldbprefix (specifies the prefixes of the certificate and key files.)
You can use Console to enable SSL and to select the set of encryption ciphers that Messaging Server can use in its encrypted communications with clients.
A cipher is the algorithm used to encrypt and decrypt data in the encryption process. Some ciphers are stronger than others, meaning that a message they have scrambled is more difficult for an unauthorized person to unscramble.
A cipher operates on data by applying a key—a long number—to the data. Generally, the longer the key the cipher uses during encryption, the harder it is to decrypt the data without the proper decryption key.
When a client initiates an SSL connection with a Messaging Server, the client lets the server know what ciphers and key lengths it prefers to use for encryption. In any encrypted communication, both parties must use the same ciphers. Because there are a number of cipher-and-key combinations in common use, a server should be flexible in its support for encryption. Messaging Server can support up to 6 combinations of cipher and key length.
Table 19–2 lists the ciphers that Messaging Server supports for use with SSL 3.0. The table summarizes information that is available in more detail in the Introduction to SSL section of Managing Servers with iPlanet Console.
Table 19–2 SSL Ciphers for Messaging Server|
Cipher |
Description |
|---|---|
|
RC4 with 128-bit encryption and MD5 message authentication |
The fastest encryption cipher (by RSA) and a very high-strength combination of cipher and encryption key. |
|
Triple DES with 168-bit encryption and SHA message authentication |
A slower encryption cipher (a U.S. government-standard) but the highest-strength combination of cipher and encryption key. |
|
DES with 56-bit encryption and SHA message authentication |
A slower encryption cipher (a U.S. government-standard) and a moderate-strength combination of cipher and encryption key. |
|
RC4 with 40-bit encryption and MD5 message authentication |
The fastest encryption cipher (by RSA) and a lower-strength combination of cipher and encryption key. |
|
RC2 with 40-bit encryption and MD5 message authentication |
A slower encryption cipher (by RSA) and a lower-strength combination of cipher and encryption key. |
|
No encryption, only MD5 message authentication |
No encryption; use of a message digest for authentication alone. |
Unless you have a compelling reason for not using a specific cipher, you should support them all. However, note that export laws restrict the use of certain encryption ciphers in certain countries. Also, some client software produced before the relaxation of United States Export Control laws cannot use the higher strength encryption. Be aware that while the 40-bit ciphers might hinder the casual eavesdropper, they are not secure and therefore will not stop a motivated attack.
To enable SSL and select encryption ciphers, follow these command line steps:
To enable or disable SSL:
configutil -o nsserversecurity -v [ on | off ]
To enable or disable RSA ciphers:
configutil -o encryption.rsa.nssslactivation -v [ on | off ]
To specify a token:
configutil -o encryption.rsa.nsssltoken -v tokenname
To specify a certificate:
configutil -o encryption.rsa.nssslpersonalityssl -v certname
Note that if you enable RSA ciphers, you must also specify a token and a certificate.
To choose a cipher preference:
configutil -o encryption.nsssl3ciphers -v cipherlist
where cipherlist is a comma-separated list of ciphers.
To enable SSL encryption for outgoing messages, you must modify the channel definition to include the tls channel keywords, such as maytls, musttls, and so on. For more information, see the Transport Layer Security Manual.
In addition to password-based authentication, Sun Java System servers support authentication of users through examination of their digital certificates. In certificate-based authentication, the client establishes an SSL session with the server and submits the user’s certificate to the server. The server then evaluates whether the submitted certificate is genuine. If the certificate is validated, the user is considered authenticated.
To set up your Messaging Server for certificate-based login:
Obtain a server certificate for your server. (For details, see Obtaining Certificates through the Administration Console
Run the Certificate Setup Wizard to install the certificates of any trusted certificate authorities that will issue certificates to the users your server will authenticate. (For details, see To Install Certificates of Trusted CAs
Note that as long as there is at least one trusted CA in the server’s database, the server requests a client certificate from each connecting client.
Turn on SSL. (For details, see To Enable SSL and Selecting Ciphers
(Optional) Edit your server’s certmap.conf file so that the server appropriately searches the LDAP user directory based on information in the submitted certificates.
Editing the certmap.conf file is not necessary if the email address in your users’ certificates matches the email address in your users’ directory entries, and you do not need to optimize searches or validate the submitted certificate against a certificate in the user entry.
For details of the format of certmap.conf and the changes you can make, see the SSL chapter of Managing Servers with iPlanet Console.
Once you have taken these steps, when a client establishes an SSL session so that the user can log in to IMAP or HTTP, the Messaging Server requests the user’s certificate from the client. If the certificate submitted by the client has been issued by a CA that the server has established as trusted, and if the identity in the certificate matches an entry in the user directory, the user is authenticated and access is granted (depending on access-control rules governing that user).
There is no need to disallow password-based login to enable certificate-based login. If password-based login is allowed (which is the default state), and if you have performed the tasks described in this section, both password-based and certificate-based login are supported. In that case, if the client establishes an SSL session and supplies a certificate, certificate-based login is used. If the client does not use SSL or does not supply a certificate, the server requests a password.
Most sites should not use the SMTP proxy as it adds additional latency to the SMTP protocol. However, a large-scale site which makes heavy use of SSL to protect SMTP connections may wish to maximize their investment in SSL accelerator hardware by performing all SSL operations for all protocols on a server which does nothing other than SSL and proxy. The SMTP proxy allows SSL to be processed by a front end proxy server while the mail queues are on a separate MTA machine. This way hardware optimized for each task can be separately configured and purchased.
See Enabling POP Before SMTP for instructions on how to install the SMTP Proxy.
The Network Security Services are a set of open source libraries and tools used to implement and deploy applications for Internet security based on open standards. The security tools help to perform diagnostics, manage certificates, keys and cryptography modules, and debug SSL- and TLS-based applications. These tools are found in /usr/sfw/bin.
The tools described in this section store, retrieve and protect the keys and certificates on which encryption and identification rely.
The Certificate Database Tool, certutil, is a command-line utility that can create and modify the cert8.db and key3.db database files. The key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database. More information on certutil can be found at:
http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html
The cmsutil command-line utility uses the S/MIME Toolkit to perform basic operations, such as encryption and decryption, on Cryptographic Message Syntax (CMS) messages. It performs basic certificate management operations such as encrypting, decrypting, and signing messages. More information on cmsutil can be found at:
http://www.mozilla.org/projects/security/pki/nss/tools/cmsutil.html
The Security Module Database Tool, modutil, is a command-line utility for managing the database of PKCS #11 modules (secmod.db files). You can use the tool to add and delete PKCS #11 modules, change passwords, set defaults, list module contents, enable or disable slots, enable or disable FIPS-140-1 compliance, and assign default providers for cryptographic operations. More information on modutil can be found at:
http://www.mozilla.org/projects/security/pki/nss/tools/modutil.html
The pk12util command-line utility imports and exports both keys and certificates, defined by the PKCS #12 standard, to and from their respective database and file formats. More information on pk12util can be found at:
http://www.mozilla.org/projects/security/pki/nss/tools/pk12util.html
The SSL Debugging Tool, ssltap, is an SSL-aware command-line proxy. It can proxy requests for an SSL server and display the contents of the messages exchanged between the client and server. It watches TCP connections and displays the data going by. If a connection is SSL, the data display includes interpreted SSL records and handshaking. More information can be found at:
http://www.mozilla.org/projects/security/pki/nss/tools/ssltap.html
This section mostly pertains to the Sun Java System LDAP Schema v. 1. This section contains the following subsections:
This section describes how to control the ways in which server administrators can gain access to Messaging Server. Administrative access to a given Messaging Server and to specific Messaging Server tasks occurs within the context of delegated server administration.
Delegated server administration is a feature of most Sun Java System servers; it refers to the capability of an administrator to provide other administrators with selective access to individual servers and server features. This chapter briefly summarizes delegated server tasks. For more detailed information, see the chapter on delegating server administration in Managing Servers with iPlanet Console.
When you install the first Sun Java System server on your network, the installation program automatically creates a group in the LDAP user directory called the Configuration Administrators group. By default, the members of the Configuration Administrators group have unrestricted access to all hosts and servers on your network.
The Configuration Administrators group is at the top of an access hierarchy, such as the following, that you can create to implement delegated administration (if Sun Java System LDAP Schema v. 1 is used) for Messaging Server:
Configuration administrator. The “super user” for the network of Sun Java System servers. Has complete access to all resources.
Server administrator. A domain administrator might create groups to administer each type of server. For example, a Messaging Administrators group might be created to administer all Messaging Servers in an administrative domain or across the whole network. Members of that group have access to all Messaging Servers (but no other servers) in that administrative domain.
Task administrator. Finally, any of the above administrators might create a group, or designate an individual user, with restricted access to a single Messaging Server or a set of Messaging Servers. Such a task administrator is permitted to perform only specific, limited server tasks (such as starting or stopping the server only, or accessing logs of a given service).
Console provides convenient interfaces that allow an administrator to perform the following tasks:
Grant a group or an individual access to a specific Messaging Server, as described in “Providing Access to the Server as a Whole” (next).
Restrict that access to specific tasks on a specific Messaging Server, as described in To Restrict Access to Specific Tasks.
This section describes to give a user or group permission to access a given instance of Messaging Server.
Log in to Console as an administrator with access to the Messaging Server you want to provide access to.
Select that server in the Console window.
From the Console menu, choose Object, then choose Set Access Permissions.
Add or edit the list of users and groups with access to the server.
(For more complete instructions, see the chapter on delegating server administration in Managing Servers with iPlanet Console.)
Once you have set up the list of individuals and groups that have access to the particular Messaging Server, you can then use ACIs, as described next, to delegate specific server tasks to specific people or groups on that list.
An administrator typically connects to a server to perform one or more administrative tasks. Common administrative tasks are listed in the Messaging Server Tasks form in Console.
By default, access to a particular Messaging Server means access to all of its tasks. However, each task in the Task form can have an attached set of access-control instructions (ACIs). The server consults those ACIs before giving a connected user (who must already be a user with access permissions to the server as a whole) access to any of the tasks. In fact, the server displays in the Tasks form only those tasks to which the user has permission.
If you have access to a Messaging Server, you can create or edit ACIs on any of the tasks (that is, on any of the tasks to which you have access), and thus restrict the access that other users or groups can have to them.
Log in to the Console as an administrator with access to the Messaging Server you want to provide restricted access to.
Open the server and select a task in the server’s Tasks form by clicking on the Task text.
From the Edit menu, choose Set Access Permissions, and add or edit the list of access rules to give a user or group the kind of access you want them to have.
Repeat the process for other tasks, as appropriate.
(For more complete instructions, see the chapter on delegating server administration in Managing Servers with iPlanet Console.)
ACIs and how to create them are described more fully in the chapter on delegating server administration in Managing Servers with iPlanet Console.
This section contains the following subsections:
Messaging Server supports sophisticated access control on a service-by-service basis for its IMAP, POP, and HTTP services so that you can exercise far-ranging and fine-grained control over which clients can gain access to your server.
If you are managing messaging services for a large enterprise or an Internet service provider, these capabilities can help you to exclude spammers and DNS spoofers from your system and improve the general security of your network. For control of unsolicited bulk email specifically, see also Chapter 17, Mail Filtering and Access Control
If controlling access by IP address is not an important issue for your enterprise, you do not have to create any of the filters described in this section. If minimal access control is all you need, see Mostly Allowing for instructions on setting it up.
The Messaging Server access-control facility is a program that listens at the same port as the TCP daemon it serves; it uses access filters to verify client identity, and it gives the client access to the daemon if the client passes the filtering process.
As part of its processing, the Messaging Server TCP client access-control system performs (when necessary) the following analyses of the socket end-point addresses:
Reverse DNS lookups of both end points (to perform name-based access control)
Forward DNS lookups of both end points (to detect DNS spoofing)
Identd callback (to check that the user on the client end is known to the client host)
The system compares this information against access-control statements called filters to decide whether to grant or deny access. For each service, separate sets of Allow filters and Deny filters control access. Allow filters explicitly grant access; Deny filters explicitly forbid access.
When a client requests access to a service, the access-control system compares the client’s address or name information to each of that service’s filters—in order—using these criteria:
The search stops at the first match. Because Allow filters are processed before Deny filters, Allow filters take precedence.
Access is granted if the client information matches an Allow filter for that service.
Access is denied if the client information matches a Deny filter for that service.
If no match with any Allow or Deny filter occurs, access is granted—except in the case where there are Allow filters but no Deny filters, in which case lack of a match means that access is denied.
The filter syntax described here is flexible enough that you should be able to implement many different kinds of access-control policies in a simple and straightforward manner. You can use both Allow filters and Deny filters in any combination, even though you can probably implement most policies by using almost exclusively Allows or almost exclusively Denies.
The following sections describe filter syntax in detail and give usage examples. The section To Create Access Filters for Services gives the procedure for creating access filters.
Filter statements contain both service information and client information. The service information can include the name of the service, names of hosts, and addresses of hosts. The client information can include host names, host addresses, and user names. Both the server and client information can include wildcard names or patterns.
The very simplest form of a filter is:
service: hostSpec
where service is the name of the service (such as smtp, pop, imap, or http) and hostSpec is the host name, IP address, or wildcard name or pattern that represents the client requesting access. When a filter is processed, if the client seeking access matches client, access is either allowed or denied (depending on which type of filter this is) to the service specified by service. Here are some examples:
imap: roberts.newyork.siroe.com pop: ALL http: ALL
If these are Allow filters, the first one grants the host roberts.newyork.siroe.com access to the IMAP service, and the second and third grant all clients access to the POP and HTTP services, respectively. If they are Deny filters, they deny those clients access to those services. (For descriptions of wildcard names such as ALL, see Wildcard Names.)
Either the server or the client information in a filter can be somewhat more complex than this, in which case the filter has the more general form of:
serviceSpec: clientSpec
where serviceSpec can be either service or service@hostSpec, and clientSpec can be either hostSpec or user@hostSpec. user is the user name (or a wildcard name) associated with the client host seeking access. Here are two examples:
pop@mailServer1.siroe.com: ALL imap: srashad@xyz.europe.siroe.com
If these are Deny filters, the first filter denies all clients access to the SMTP service on the host mailServer1.siroe.com. The second filter denies the user srashad at the host xyz.europe.siroe.com access to the IMAP service. (For more information on when to use these expanded server and client specifications, see Server-Host Specification and Client User-Name Specification
Finally, at its most general, a filter has the form:
serviceList: clientList
where serviceList consists of one or more serviceSpec entries, and clientList consists of one or more clientSpec entries. Individual entries within serviceList and clientList are separated by blanks and/or commas.
In this case, when a filter is processed, if the client seeking access matches any of the clientSpec entries in clientList, then access is either allowed or denied (depending on which type of filter this is) to all the services specified in serviceList. Here is an example:
pop, imap, http: .europe.siroe.com .newyork.siroe.com
If this is an Allow filter, it grants access to POP, IMAP, and HTTP services to all clients in either of the domains europe.siroe.com and newyork.siroe.com. For information on using a leading dot or other pattern to specify domains or subnet, see Wildcard Patterns.
You can also use the following syntax:
“+” or “-” serviceList:*$next_rule
+ (allow filter) means the daemon list services are being granted to the client list.
- (deny filter) means the services are being denied to the client list.
* (wildcard filter) allow all clients to used these services.
$ separates rules.
This example enables multiple services on all clients.
+imap,pop,http:*
This example shows multiple rules, but each rule is simplified to have only one service name and uses wildcards for the client list. (This is the most commonly used method of specifying access control in LDIF files.)
+imap:ALL$+pop:ALL$+http:ALL
An example of how to disallow all services for a user is:
-imap:*$-pop:*$-http:*
You can use the following wildcard names to represent service names, host names or addresses, or user names:
Table 19–3 Wildcard Names for Service Filters|
Wildcard Name |
Explanation |
|---|---|
|
ALL, * |
The universal wildcard. Matches all names. |
|
LOCAL |
Matches any local host (one whose name does not contain a dot character). However, if your installation uses only canonical names, even local host names will contain dots and thus will not match this wildcard. |
|
UNKNOWN |
Matches any user whose name is unknown, or any host whose name or address is unknown. Use this wildcard name carefully: Host names may be unavailable due to temporary DNS server problems—in which case all filters that use UNKNOWN will match all client hosts. A network address is unavailable when the software cannot identify the type of network it is communicating with—in which case all filters that use UNKNOWN will match all client hosts on that network. |
|
KNOWN |
Matches any user whose name is known, or any host whose name and address are known. Use this wildcard name carefully: Host names may be unavailable due to temporary DNS server problems—in which case all filters that use KNOWN will fail for all client hosts. A network address is unavailable when the software cannot identify the type of network it is communicating with—in which case all filters that use KNOWN will fail for all client hosts on that network. |
|
DNSSPOOFER |
Matches any host whose DNS name does not match its own IP address. |
You can use the following patterns in service or client addresses:
A string that begins with a dot character (.). A host name is matched if the last components of its name match the specified pattern. For example, the wildcard pattern.siroe.com matches all hosts in the domain siroe.com.
A string that ends with a dot character (.). A host address is matched if its first numeric fields match the specified pattern. For example, the wildcard pattern 123.45. matches the address of any host in the subnet 123.45.0.0.
A string of the form n.n.n.n/m.m.m.m. This wildcard pattern is interpreted as a net/mask pair. A host address is matched if net is equal to the bitwise AND of the address and mask. For example, the pattern 123.45.67.0/255.255.255.128 matches every address in the range 123.45.67.0 through 123.45.67.127.
The access-control system supports a single operator. You can use the EXCEPT operator to create exceptions to matching names or patterns when you have multiple entries in either serviceList or clientList. For example, the expression:
list1 EXCEPT list2
means that anything that matches list1 is matched, unless it also matches list2.
Here is an example:
ALL: ALL EXCEPT isserver.siroe.com
If this were a Deny filter, it would deny access to all services to all clients except those on the host machine isserver.siroe.com.
EXCEPT clauses can be nested. The expression:
list1 EXCEPT list2 EXCEPT list3
is evaluated as if it were:
list1 EXCEPT (list2 EXCEPT list3)
You can further identify the specific service being requested in a filter by including server host name or address information in the serviceSpec entry. In that case the entry has the form:
service@hostSpec
You might want to use this feature when your Messaging Server host machine is set up for multiple internet addresses with different internet host names. If you are a service provider, you can use this facility to host multiple domains, with different access-control rules, on a single server instance.
For client host machines that support the identd service as described in RFC 1413, you can further identify the specific client requesting service by including the client’s user name in the clientSpec entry in a filter. In that case the entry has the form:
user@hostSpec
where user is the user name as returned by the client’s identd service (or a wildcard name).
Specifying client user names in a filter can be useful, but keep these caveats in mind:
The identd service is not authentication; the client user name it returns cannot be trusted if the client system has been compromised. In general, do not use specific user names; use only the wildcard names ALL, KNOWN, or UNKNOWN.
identd is not supported by most modern client machines and thus provides little added value in modern deployments. We are considering removal of identd support in a future version, so please inform Sun Java System if this feature is of value to your site.
User-name lookups take time; performing lookups on all users may slow access by clients that do not support identd. Selective user-name lookups can alleviate this problem. For example, a rule like:
serviceList: @xyzcorp.com ALL@ALL
would match users in the domain xyzcorp.com without doing user-name lookups, but it would perform user-name lookups with all other systems.
The user-name lookup capability can in some cases help you guard against attack from unauthorized users on the client’s host. It is possible in some TCP/IP implementations, for example, for intruders to use rsh (remote shell service) to impersonate trusted client hosts. If the client host supports the ident service, you can use user-name lookups to detect such attacks.
The examples in this section show a variety of approaches to controlling access. In studying the examples, keep in mind that Allow filters are processed before Deny filters, the search terminates when a match is found, and access is granted when no match is found at all.
The examples listed here use host and domain names rather than IP addresses. Remember that you can include address and netmask information in filters, which can improve reliability in the case of name-service failure.
In this case, access is denied by default. Only explicitly authorized hosts are permitted access.
The default policy (no access) is implemented with a single, trivial deny file:
ALL: ALL
This filter denies all service to all clients that have not been explicitly granted access by an Allow filter. The Allow filters, then, might be something like these:
ALL: LOCAL @netgroup1 ALL: .siroe.com EXCEPT externalserver.siroe.com
The first rule permits access from all hosts in the local domain (that is, all hosts with no dot in their host name) and from members of the group netgroup1. The second rule uses a leading-dot wildcard pattern to permit access from all hosts in the siroe.com domain, with the exception of the host externalserver.siroe.com.
In this case, access is granted by default. Only explicitly specified hosts are denied access.
The default policy (access granted) makes Allow filters unnecessary. The unwanted clients are listed explicitly in Deny filters such as these:
ALL: externalserver.siroe1.com, .siroe.asia.com ALL EXCEPT pop: contractor.siroe1.com, .siroe.com
The first filter denies all services to a particular host and to a specific domain. The second filter permits nothing but POP access from a particular host and from a specific domain.
You can use the DNSSPOOFER wildcard name in a filter to detect host-name spoofing. When you specify DNSSPOOFER, the access-control system performs forward or reverse DNS lookups to verify that the client’s presented host name matches its actual IP address. Here is an example for a Deny filter:
ALL: DNSSPOOFER
This filter denies all services to all remote hosts whose IP addresses don’t match their DNS host names.
If your messaging installation uses virtual domains, in which a single server instance is associated with multiple IP addresses and domain names, you can control access to each virtual domain through a combination of Allow and Deny filters. For example, you can use Allow filters like:
ALL@msgServer.siroe1.com: @.siroe1.com ALL@msgServer.siroe2.com: @.siroe2.com ...
coupled with a Deny filter like:
ALL: ALL
Each Allow filter permits only hosts within domainN to connect to the service whose IP address corresponds to msgServer.siroeN.com. All other connections are denied.
You can create Allow and Deny filters for the IMAP, POP, or HTTP services. You can also create them for SMTP services, but they have little value because they only apply to authenticated SMTP sessions. See Chapter 17, Mail Filtering and Access Control
In Console, open the Messaging Server that you want to create access filters for.
Click the Configuration tab.
Open the Services folder in the left pane and select IMAP, POP, or HTTP beneath the Services folder.
Click the Access tab in the right pane.
The Allow and Deny fields in the tab show the existing Allow and Deny filters for that service. Each line in the field represents one filter. For either of the fields, you can specify the following actions:
Click Add to create a new filter. An Allow Filter window or Deny filter window opens; enter the text of the new filter into the window, and click OK.
Select a filter and click Edit to modify the filter. An Allow Filter window or Deny filter window opens; edit the text of the filter displayed in the window, and click OK.
Select a filter and click Delete to remove the filter.
Note that if you need to rearrange the order of Allow or Deny filters, you can do so by performing a series of Delete and Add actions.
For a specification of filter syntax and a variety of examples, see Filter Syntax and Filter Examples.
Command Line
You can also specify access and deny filters at the command line as follows:
To create or edit access filters for services:
configutil -o service.service.domainallowed -v filter |
where service is pop, imap, or http and filter follows the syntax rules described in Filter Syntax.
To create or edit deny filters for services:
configutil -o service.service.domainnotallowed -v filter |
where service is pop, imap, or http and filter follows the syntax rules described in Filter Syntax.
Any store administrator can proxy authenticate to any service. (For more information about store administrators, see Specifying Administrator Access to the Store authenticate to the service if their client host is granted access via a proxy authentication access filter.
Proxy authentication allows other services, such as a portal site, to authenticate users and pass the authentication credentials to the HTTP login service. For example, assume a portal site offers several services, one of which is Messenger Express web-based email. By using the HTTP proxy authentication feature, end users need only authenticate once to the portal service; they need not authenticate again to access their email. The portal site must configure a login server that acts as the interface between the client and the service. To help configure the login server for Messenger Express authentication, Sun Java System offers an authentication SDK for Messenger Express.
This section describes how to create allow filters to permit HTTP proxy authentication by IP address. This section does not describe how to set up your login server or how to use the Messenger Express authentication SDK. For more information about setting up your login server for Messenger Express and using the authentication SDK, contact your Sun Java System representative.
In Console, open the Messaging Server that you want to create access filters for.
Click the Configuration tab.
Open the Services folder in the left pane and select HTTP beneath the Services folder.
Click the Proxy tab in the right pane.
The Allow field in the tab shows the existing Allow filters for proxy authentication.
To create a new filter, click Add.
An Allow filter window opens. Enter the text of the new filter into the window and click OK.
To edit an existing filter, select the filter and click Edit.
An Allow filter window opens. Edit the text of the filter display in the window, and click OK.
To delete an existing filter, select a field from the Allow field, and click Delete.
When you are finished making changes to the Proxy tab, click Save.
For more information about allow filter syntax, see Filter Syntax.
Command Line
You can also specify access filters for proxy authentication to the HTTP service at the command line as follows:
configutil -o service.service.proxydomainallowed -v filter |
where filter follows the syntax rules described in Filter Syntax.
SMTP Authentication, or SMTP Auth (RFC 2554) is the preferred method of providing SMTP relay server security. SMTP Auth allows only authenticated users to send mail through the MTA. However, some legacy clients only provide support for POP before SMTP. If this is the case for your system, you may enable POP before SMTP as described below. If possible, however, encourage your users to upgrade their POP clients rather than using POP before SMTP. Once POP before SMTP is deployed at a site users will become dependent on clients which fail to follow Internet security standards, putting end users at greater risk of hacking and slowing your site with the unavoidable performance penalty because of the necessity of having to track and coordinate IP addresses of recent successful POP sessions.
The Messaging Server implementation of POP before SMTP is completely different from either SIMS or Netscape Messaging Server. POP before SMTP is supported by configuring a Messaging Multiplexor (MMP) to have both a POP and SMTP proxy. When an SMTP client connects to the SMTP proxy, the proxy will check an in-memory cache of recent POP authentications. If a POP authentication from the same client IP address is found, the SMTP proxy will inform the SMTP server that it should permit messages directed to both local and non-local recipients.
Install a Messaging Multiplexor (MMP).
See the Sun Java Enterprise System 2005Q4 Installation Guide for instructions.
Enable the SMTP proxy on the MMP.
Add the string:
msg_svr_base/lib/SmtpProxyAService@25|587
to the ServiceList option in the msg_svr_base/config/AService.cfg file. That option is one long line and can’t contain line breaks.
When the MMP is upgraded, four new files which correspond to the existing four configuration files for the MMP. The new files are:
AService-def.cfg, ImapProxyAService-def.cfg, PopProxyAService-def.cfg, and SmtpProxyAService-def.cfg
These files are created by the installer, the four configuration files described in the docs are not created or affected by the install process. When the MMP starts up, it will look for the normal configuration file (as currently documented). If it doesn’t find the normal configuration file, it will attempt to copy the respective *AService-def.cfg file to the corresponding *AService.cfg file name.
Set the PROXY_PASSWORD option in the SMTP channel option file tcp_local_option at each SMTP relay server.
When the SMTP proxy connects to the SMTP server, it has to inform the SMTP server of the real client IP address and other connection information so that the SMTP server can correctly apply relay blocking and other security policy (including POP before SMTP authorization). This is a security sensitive operation and must be authenticated. The proxy password configured on both the MMP SMTP Proxy and the SMTP server assures that a third party cannot abuse the facility.
Example: PROXY_PASSWORD=A_Password
Make sure the IP address that the MMP uses to connect to the SMTP server is not treated as “internal” by the INTERNAL_IP mapping table.
See the To Add SMTP Relaying of the Chapter 17, Mail Filtering and Access Control for information about the INTERNAL_IP mapping table.
Configure the SMTP proxy to Support POP before SMTP.
Edit the msg_svr_base /config/SmtpProxyAService.cfg configuration file.
The following SMTP proxy options operate identically to the same options for the IMAP and POP proxies (see Chapter 7, Configuring and Administering Multiplexor Services these options in the Encryption (SSL) Option section in the Encryption (SSL) Option in Sun Java System Messaging Server 6 2005Q4 Administration Reference.
LdapURL, LogDir, LogLevel, BindDN, BindPass, Timeout, Banner, SSLEnable, SSLSecmodFile, SSLCertFile, SSLKeyFile, SSLKeyPasswdFile, SSLCipherSpecs, SSLCertNicknames, SSLCacheDir, SSLPorts, CertMapFile, CertmapDN, ConnLimits, TCPAccess
Other MMP options not listed above (including the BacksidePort option) do not currently apply to the SMTP Proxy.
Add the following five options:
SmtpRelays is a space-separated list of SMTP relay server hostnames (with optional port) to use for round-robin relay. These relays must support the XPROXYEHLO extension. This option is mandatory with no default.
Example: default:SmtpRelays manatee:485 gonzo mothra
SmtpProxyPassword is a password used to authorize source channel changes on the SMTP relay servers. This option is mandatory with no default and must match the PROXY_PASSWORD option on the SMTP servers.
Example: default:SmtpProxyPassword A_Password
EhloKeywords option provides a list of EHLO extension keywords for the proxy to pass through to the client, in addition to the default set. The MMP will remove any unrecognized EHLO keywords from the EHLO list returned by an SMTP relay. EhloKeywords specifies additional EHLO keywords which should not be removed from the list. The default is empty, but the SMTP proxy will support the following keywords, so there is no need to list them in this option: 8BITMIME, PIPELINING, DSN, ENHANCEDSTATUSCODES, EXPN, HELP, XLOOP, ETRN, SIZE, STARTTLS, AUTH
The following is an example that might be used by a site which uses the rarely used “TURN” extension:
Example: default:EhloKeywords TURN
PopBeforeSmtpKludgeChannel option is set to the name of an MTA channel to use for POP before SMTP authorized connections. The default is empty and the typical setting for users who want to enable POP before SMTP is tcp_intranet. This option is not required for optimizing SSL performance (see How to Optimize SSL Performance Using the SMTP Proxy.
Example: default:PopBeforeSmtpKludgeChannel tcp_intranet
ClientLookup option defaults to no. If set to yes, a DNS reverse lookup on the client IP address will be performed unconditionally so the SMTP relay server doesn’t have to do that work This option may be set on a per hosted domain basis.
Example: default:ClientLookup yes
Set the PreAuth option and the AuthServiceTTL option in PopProxyAService.cfg configuration file. This option is not required for optimizing SSL performance. (See How to Optimize SSL Performance Using the SMTP Proxy
These options specify how long in seconds a user is authorized to submit mail after a POP authentication. The typical setting is 900 to 1800 (15-30 minutes).
Example:
default:PreAuth yes default:AuthServiceTTL 900 |
You may optionally specify how many seconds the MMP will wait for an SMTP Relay to respond before trying the next one in the list.
The default is 10 (seconds). If a connection to an SMTP Relay fails, the MMP will avoid trying that relay for a number of minutes equivalent to the failover time-out (so if the failover time-out is 10 seconds, and a relay fails, the MMP won’t try that relay again for 10 minutes).
Example: default:FailoverTimeout 10
For information about configuring client access to SMTP services, see Chapter 17, Mail Filtering and Access Control
It is possible to do user/group directory lookups over SSL for MTA, MMP and IMAP/POP/HTTP services. The prerequisite is that Messaging Server must be configured in SSL mode. Set the following configutil parameters to enable this feature: local.service.pab.ldapport to 636, local.ugldapport to 636, local.ugldapusessl to 1.