ABCs of Z.os System Programming Volume6
ABCs of Z.os System Programming Volume6
Paul Rogers
Rui Feio
Oerjan Lundgren
Rita Pleus
Karan Singh
ibm.com/redbooks
International Technical Support Organization
August 2008
SG24-6986-00
Note: Before using this information and the product it supports, read the information in “Notices” on
page vii.
This edition applies to Version 1, Release 7 of of z/OS (5694-A01), Version 1 Release 7 of z/OS.e (5655-G52),
and to all subsequent releases and modifications until otherwise indicated in new editions.
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
The team that wrote this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Contents v
6.6 LDAP servers on z/OS (Integrated Security Server LDAP
plus IBM Tivoli Directory Server) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
6.7 LDAP server back ends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
6.8 Capabilities of the Tivoli Directory Server LDAP server (1/2) . . . . . . . . . . . . . . . . . . . 294
6.9 Capabilities of the Tivoli Directory Server LDAP server (2/2) . . . . . . . . . . . . . . . . . . . 297
6.10 LDAP configuration by utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
6.11 Utility ldapcnf restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
6.12 Utility dsconfig restrictions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
6.13 Utility invocation and outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
6.14 Configuration roles and responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
6.15 The LDAP schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
6.16 Schema attribute types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
6.17 LDAP directory schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
6.18 Authentication with an LDAP server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
6.19 LDAP authentication with RACF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
6.20 z/OS LDAP server native authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
6.21 Enabling LDAP native authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
6.22 Native authentication configuration options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
6.23 More native authentication configuration options . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
6.24 LDAP server-side Kerberos bind. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
6.25 LDAP Kerberos configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
6.26 LDAP Kerberos directory schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
6.27 LDAP Kerberos: Mapping algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
6.28 LDAP Kerberos: LDBM and TDBM mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
6.29 Configuring access control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
6.30 How to set up a Kerberos directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
6.31 Access control lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
6.32 Access evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
6.33 Managing ACLs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
6.34 Running the LDAP server in z/OS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
6.35 Referrals and replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
6.36 LDAP change logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult
your local IBM representative for information on the products and services currently available in your area. Any
reference to an IBM product, program, or service is not intended to state or imply that only that IBM product,
program, or service may be used. Any functionally equivalent product, program, or service that does not
infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to
evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document. The
furnishing of this document does not give you any license to these patents. You can send license inquiries, in
writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of
express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may make
improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time
without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in any
manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the
materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring
any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm the
accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the
capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them
as completely as possible, the examples include the names of individuals, companies, brands, and products.
All of these names are fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the sample
programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore,
cannot guarantee or imply reliability, serviceability, or function of these programs.
The following terms are trademarks of the International Business Machines Corporation in the United States,
other countries, or both:
AIX® MVS™ S/390®
CICS® NetView® System z™
DB2® OS/390® System z9®
DFSMS™ OS/400® Tivoli®
DFSORT™ Parallel Sysplex® TotalStorage®
Domino® PowerPC® VTAM®
eServer™ RACF® WebSphere®
IBM® RDN™ z/Architecture®
IMS™ Redbooks® z/OS®
Language Environment® Redbooks (logo) ® z9™
Lotus® REXX™ zSeries®
MQSeries® RMF™
PostScript, and Portable Document Format (PDF) are either registered trademarks or trademarks of Adobe
Systems Incorporated in the United States, other countries, or both.
Novell, the Novell logo, and the N logo are registered trademarks of Novell, Inc. in the United States and other
countries.
SAP, and SAP logos are trademarks or registered trademarks of SAP AG in Germany and in several other
countries.
Active Directory, Windows, and the Windows logo are trademarks of Microsoft Corporation in the United
States, other countries, or both.
Intel, Intel logo, Intel Inside logo, and Intel Centrino logo are trademarks or registered trademarks of Intel
Corporation or its subsidiaries in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Linux is a trademark of Linus Torvalds in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
Paul Rogers is a is a Consulting IT Specialist at the ITSO, Poughkeepsie Center, and has
worked for IBM® for 39 1/2 years. He writes extensively and teaches IBM classes worldwide
on various aspects of z/OS, JES3, Infoprint Server, and z/OS UNIX. Before joining the ITSO
19 1/2 years ago, Paul worked in the IBM Installation Support Center in Greenford, England,
providing OS/390® and JES support for IBM EMEA and in the Washington Systems Center in
Gaithersburg, Maryland.
Rui Feio is an IT Specialist working at IBM Portugal. He has six years of experience in the
MVS™, OS/390, and z/OS fields. He provides support to IBM customers in Portugal. His
Oerjan Lundgren joined IBM in 1969 and has focused on performance and security related
topics. Oerjan was on assignment in Poughkeepsie for three years during the 1980s and has
since participated in a number of IBM Redbooks® publication projects. Since 2000, Oerjan
has been working for Pulsen Systems AB, which is an IBM Business Partner in Sweden, as a
senior consultant in infrastructure design projects. Oerjan frequently teaches WLM and RMF
workshops for ITSO around the world and also all System z related courses for customers as
well as for universities.
Rita Pleus is a Senior IT Specialist in IBM Global Services in IBM Germany. She has IT
experience since 1986 in a variety of areas, including systems programming and operations
management. Before joining IBM in 2001, she worked for a German S/390® customer. Rita
holds a degree in Computer Science from the University of Applied Sciences in Dortmund.
Her areas of expertise include z/OS, its subsystems, and systems management. She was
one of the authors of ABCs of z/OS System Programming Volume 3, SG24-6983.
Karan Singh is a Project Leader with the ITSO, Poughkeepsie Center. He was formerly a
mainframe systems programmer with IBM Global Services with over 10 years of experience.
He holds an M.S. degree in the Teaching of English.
Paola Bari
ITSO, Poughkeepsie Center
Thanks to the authors of the IBM Redbooks publication, System z Cryptographic Services
and z/OS PKI Services:
Patrick Kappeler
Jonathan Barney
Jean Marc Darees
Pekka Hanninen
Robert Herman
Guillaume Hoareau
Nikhil V Kapre
MuHyun Kim
Gerard Laumay
Joel Porterie
Vicente Ranieri Jr.
Dominique Richard
Daniel Turkenkopf
Gregory P. Boyd
Advanced Technical Support, IBM
Your efforts will help increase product acceptance and customer satisfaction. As a bonus, you
will develop a network of contacts in IBM development labs, and increase your productivity
and marketability.
Find out more about the residency program, browse the residency index, and apply online at:
ibm.com/redbooks/residencies.html
Comments welcome
Your comments are important to us!
We want our books to be as helpful as possible. Send us your comments about this book or
other IBM Redbooks in one of the following ways:
Use the online Contact us review Redbooks form found at:
ibm.com/redbooks
Send your comments in an e-mail to:
[email protected]
Mail your comments to:
IBM Corporation, International Technical Support Organization
Dept. HYTD Mail Station P099
2455 South Road
Poughkeepsie, NY 12601-5400
Preface xi
xii ABCs of z/OS System Programming Volume 6
1
With estimates of over 80% of corporate data residing or originating on mainframes, security
and data integrity are on top of the list of critical business requirements. Thus, organizations
need to deliver advanced security features with an array of user identification, authentication,
auditing, and administration capabilities, combined with advancements in data encryption,
intrusion detection, and overall system integrity. These capabilities are designed to sustain
customer-facing, high-volume transaction rates at high service levels.
In this book, we explain how IBM System z is designed with built-in security capabilities to
help protect your business.
Traditionally, when we think of security, we often think of home security—keeping the doors
closed and locked, controlling access by limiting the number and distribution of keys, installing
burglar alarms to detect physical intrusion, and installing smoke and carbon monoxide alarms
to detect intrusion by other harmful substances. In many ways, IT security works in a similar
fashion. You need systems that are designed to control access to the system, to detect and
prevent intrusion into the system by unauthorized users, and to protect the system from
corruption by unauthorized programs and viruses. In other words, you need to close and lock
the doors and install a rigid and comprehensive set of fences and alarms to help protect
against various types of intrusion.
This chapter provides a brief overview of z/OS basic security and the additional Security
Services under z/OS. z/OS security services comprise a variety of security-related products,
which are grouped into three elements, which we explain in detail in the following chapters:
Chapter 2, “z/OS Security Server RACF” on page 9, an optional feature of z/OS
Integrated security services:
– Chapter 4, “Kerberos” on page 193
– Chapter 6, “LDAP” on page 283
– Chapter 7, “EIM” on page 357
Chapter 5, “Cryptographic Services” on page 237, a base element
Integrity
Program property table (PPT)
Authorized program facility (APF)
Authorized programs
System authorization facility (SAF)
Auditing
Logs (hardcopy, system)
Generalized trace facility (GTF)
System management facility (SMF)
Important: You need to verify that only those programs that are authorized to bypass
password protection are, in fact, able to do so. Such programs are normally communication
and database control programs or other system control programs. You can also verify that
only those programs that need to run in a system key are authorized to do so.
Authorized programs
Many system functions are sensitive (for example restricted SVCs). Therefore, these sensitive
functions can be used only by authorized programs. A program is authorized if one of the
conditions is true:
Program runs in supervisor state (bit 15 in PSW=0).
Program runs in system protection key (bits 8-11 in PSW contains key 0-7).
Program runs as part of an authorized job step task (JSCBAUTH=1). This task is set if the
initial program is marked AC=1 and if it is loaded from an APF authorized library or from
the LPA.
Auditing
z/OS has the following basic functions that provide information useful for auditing purposes:
Logs (hardcopy and system)
Generalized trace facility (GTF)
System management facility (SMF)
The z/OS Security Server RACF is an optionally priced feature that allows an installation to
control access to protected resources.
RACF helps meet your needs for security by providing the ability to:
Identify and verify users
Authorize users to access the protected resources
Control the means of access to resources
Log and report attempts to access protected resources
Administer security to meet an installation’s security goals
RACF provides these functions when the installation defines the users and the resources to
be protected.
The Integrated Security Services consists of the components described in the remainder of
this section.
LDAP Server
The LDAP function was shipped originally as the base function of the z/OS Directory Server.
A new base element, IBM Tivoli® Directory Server for z/OS, was introduced in z/OS V1R8. It
contains a rewritten LDAP server, an LDAP client, and LDAP client utilities. The LDAP server
in Integrated Security Services continues to exist in V1R8 and later. However, the LDAP client
and LDAP client utilities do not. In V1R8 and later, they are only in IBM Tivoli Directory Server
for z/OS.
The LDAP server is required to maintain information about Public Key Infrastructure (PKI)
Services certificates in a centralized location. The z/OS LDAP server is preferred, but you can
use a non-z/OS LDAP server if it can support the object classes and attributes that PKI
Services requires. Typical PKI Services usage requires an LDAP directory server that
supports the LDAP (Version 2) protocol (and the PKIX schema), such as the z/OS LDAP
Note: The Firewall Technologies component was removed from the system with z/OS
V1R8.
Cryptographic Services
Cryptography is the transformation of data to conceal its meaning. In z/OS, the base element
Cryptographic Services provides the following cryptographic functions:
Data secrecy
Data integrity
Personal identification
Digital signatures
The management of cryptographic keys
This base element supports keys as long as 56 bits. Keys longer than 56 bits are supported
by the optional feature z/OS Security Level 3.
The application calls ICSF for a cryptographic function and provides the data to be processed
along with the cryptographic key to be used.
Chapter 3, “Digital certificates and PKI” on page 111 explains this topic.
System SSL invokes the hardware cryptographic coprocessor, if present on the system, to
assist in performing the asymmetric and symmetric cryptographic algorithms.
RACF helps meet the needs for security by providing the ability to:
Identify and verify users
Authorize users to access the protected resources
Control the means of access to resources
Log and report attempts to access protected resources
Administer security to meet an installation's security goals
RACF provides these functions when the installation defines the users and the resources to
be protected.
A specific RACF user, called the security administrator, has the responsibility to define users
and resources to RACF. The security administrator also specifies the rules that RACF uses to
control access to the resources.
The responsibility to implement the guidelines falls to the system programmer, who provides
technical support for RACF. The system programmer installs RACF on the system and
maintains the RACF database. This person oversees the programming aspects of system
protection and provides technical input on the feasibility of the implementation plan. In
addition, the technical support person can write and implement RACF installation exit
routines to extend the security infrastructure. RACF retains information about the users,
resources, and access authorities in profiles in the RACF database and refers to the profiles
when deciding which users are permitted access to a protected system resources. The
auditor monitors the security controls and examines that the security goals are met.
SECURITY
POLICIES
What is RACF
RACF is an add-on software product that provides the basic security to a z/OS system. Other
security software products are available, such as from Computer Associates, ACF2, and Top
Secret. RACF is included as part of the base z/OS system but requires a separate licence to
be activated.
RACF provides the ability to implement the security policies that you choose on your system.
Note: Your system will not be secure by simply installing RACF. The quality of the system
protection depends on the way that you use the RACF functions.
User identification
and authentication
Resource authorization
RACF checking and system
access control
RACF
Security administration
(local or remote)
RACF database
Audit reports Primary and backup Security console
integrity reports Local and remote sharing Violation reporting
RACF functions
RACF protects resources by granting access only to authorized users of the protected
resources. To accomplish this, RACF gives you the ability to accomplish the tasks described
in this section.
Resource authorization
Having identified and verified the user, RACF then controls interaction to the system
resources. RACF must authorize the users who can access resources and also the way users
can access them, which depends on the purpose of each user (for example, reading or
updating). RACF can also authorize when a user can access resources, by either time or day.
Security administration
RACF can be administered either in a centralized or decentralized manner. In a centralized
approach, the RACF administrator (user attribute SPECIAL) controls the access to all users,
groups and resources.
RACF database
The RACF database holds all RACF access control information. RACF processing uses the
information from the database each time a RACF-defined user enters a system and each time
a user wants to access a RACF-protected resource. Some of this information can be cached
in storage.
You maintain the RACF database through commands, macros, and utilities.
The RACF database is a non-VSAM, single extent data set that is made up of 4 KB blocks
and must be cataloged.
RACF allows you to provide a backup database to which you can switch without a re-IPL in
case your primary RACF database fail. A backup RACF database reflects the contents of the
primary database. After the installation has created the backup database, RACF can maintain
it automatically.
The Interactive System Productivity Facility (ISPF) primary menu displays. From this menu,
choose option R for RACF.
Note: Although this method is the usual way to access RACF panels, your installation
might have this implemented through a different path.
The RACF panel interface is similar in use to all other ISPF panel options. Therefore, we do
not go into detail here on to how to use it.
You can access help information for the RACF panels. Help panels exist for each individual
panel. If you have a question about the information that you should provide on the panel,
either press PF1 or type HELP on the command line. The help panels give more information
about the terms on the panel and the information that you need to enter.
Users
Groups
Connections
RRESOURCES
ESOURCES::USERS,
USERS,
GROUPS, DATASETS,
GROUPS, CONNECTIONS,
Data sets (Files) DATASETS, GENERAL
GENERESOURCES
RAL RESOURCES
General resources:
programs, transactions,
databases, etc.
General resources are all of the resources that are defined in the class descriptor table. For
example, general resources include DASD and tape volumes, load modules (programs),
terminals, and others.
RACF maintains information entries, called profiles, in the RACF database. It uses profiles to
protect DASD and tape data sets and general resources, such as tape volumes and
terminals:
Data set profiles contain security information about DASD and tape data sets.
General resource profiles contain security information about general resources.
Each RACF-defined resource has a profile, though you can optionally use single profile to
protect multiple resources.
RACF commands or the RACF ISPF panels can be used to create and modify general
resource profiles.
RACF
RACF commands
For each resource type, a set of commands is available to define, modify, list, and delete
resources.
In general, you must have authority for a RACF entry in order to display it. A normal TSO user
can display only the RACF data relevant to himself. A user with SPECIAL authority can
display almost anything.
You can get online help for RACF commands. To get online help for a command, type:
HELP command-name
For example, to see online help for the PERMIT command, enter:
HELP PERMIT
To limit the information displayed, use the SYNTAX operand on the HELP command:
HELP command-name SYNTAX
For example, to see only the syntax of the PERMIT command, enter:
HELP PERMIT SYNTAX
Where the following command lists generic profile MARTIN and its access list:
LD DA('MARTIN.*') AUTHUSER
And, the following command displays the basic RACF data for user ID MARTIN:
LU MARTIN
User authentication
logon
logon user ID Resource
manager
password /
password phrase
OID CARD
RACF
RACF DB
RACF identifies and authenticates users accessing the system when the various system
resource managers (such as TSO logon) request it. RACF determines the following
conditions:
Whether the user is defined to RACF.
If the user has supplied a valid password or Pass Ticket or operator identification card
(OIDCARD) and belongs to a valid group. RACF has support for a password phrase that
can be up to 100 characters long.
If the user accesses a UNIX System Services resources, then the user also must have a
valid UID and GID (if this is not provided by a default user and group ID).
Whether the user ID is in REVOKE status, which prevents a RACF-defined user from
entering the system at all or entering the system with certain groups.
If the user can use the system on this day and at this time of the day (an installation can
impose restrictions).
If the user is authorized to access the terminal (which can also include day and time
restrictions for accessing that terminal).
If the user is authorized to access the application.
TSO S
DB2 A Access?
Unix System Services F
RACF call
JES RACF
Yes / No Check
Console Services RACF RC
VTAM
Figure 2-8 Resource managers
RACF can also authorize when a user can access resources, by either time or day as follows:
A user is identified and verified to the RACF-protected system.
A user wants to modify an existing RACF-protected resource.
The user issues a command to the system to access the resource.
The system resource manager (such as data management) processes the request.
The resource manager “asks” RACF whether the user can access the resource.
RACF checks one profile to verify that the user can access the resource and to determine
whether the user has the required authorization to modify the contents.
RACF returns the results of its check to the resource manager.
The resource manager, based on what RACF indicates, either grants or denies the
request.
User Resource
Request Manager
S
A RACF
(IMS F
DFHSM
CICS JES
Request .....)
In-Storage
Response
Profiles
RACF Database
Figure 2-9 System Authorization Facility (SAF)
Resource managers are responsible for calling SAF to determine whether a user or group is
allowed access to the system or resource.
Note: The resource manager is responsible for initiation of the authorization check.
Figure 2-9 illustrates the SAF function. Based on the original user’s request, the resource
manager formulates a request to SAF. Depending on the request, SAF can respond directly
or pass the request to RACF.
Note: In either case, the user receives the response from the resource manager.
Examples of resource managers are shown in 2.7, “Resource managers” on page 20.
New Class?
RACF-Lab Developer
RACF-Database Product(XYZ)
class - USER
class - GROUP
class - DATASET
.
class -DASDVOL
New Class!
class - TAPEVOL
class - XYZ
Profile
Product
XYZ
RACF database
RACF stores information about users, groups and resources in the RACF database. The
information is normally kept in storage to enhance performance. The drawback is that this
data has to be refreshed when data is changed.
RACF - Administrator
To protect resources the RACF Administrator needs to know in which classes a resource
manager keeps the RACF information. This information is normally documented in the
reference manuals.
The RACF administrator defines user profiles in the RACF class USER, group profiles in the
class GROUP, resource profiles for data sets in the class DATASET and resource profiles for
tapes in the class TAPEVOL.
It is possible to define additional classes. You can do this by modifying the Class Descriptor
Table and then activating the updated table. The IBM supplied class descriptor table can be
found in Appendix A of z/OS Security Server RACF Systems Programmer’s Guide,
SA22-7681.
Define users RA
R CFF
AC
Define groups
COMMANDS
data sets
System
Options
general resources
RACF
DB
ISPF Panels, RACF
Profiles: Users,
commands, TSO
Groups, Data sets,
commands, optionally General Resources
additional product like Consul
Figure 2-11 Security administration with RACF
A RACF security administrator performs the tasks that we describe in this section.
When defining a user it is mandatory to name the default group of the user. Each RACF
defined user belongs at least to his default group, but can be a member of multiple groups.
Furthermore it is necessary to have an owner of the user profile. Normally the default group is
chosen as owner.
Define groups
A user is connected to one or more groups. The information about the group is stored in the
group profile. A RACF group normally contains a number of users who share common
access requirements. It is important to consider the basic purpose of a group, for example
whether it is an administrative group, a holding group, a data control group, a functional group,
or a user group? Beyond this consideration, it is necessary to specify the owner of the group.
Important: The owner in RACF relates to the profile. The owner of a profile can update the
profile.
Note: In most cases, multiple resources are protected with a single profile, referred to as
generic profiles.
The RACF operator commands allow you to perform functions in the RACF subsystem. You
can enter these commands from an operator console. These commands allow an z/OS
operator to perform certain RACF operations in the RACF subsystem. The RACF subsystem
prefix in front of the command identifies the RACF subsystem as the processing environment.
Many RACF commands can be entered using TSO/E.
User Identification
User ID = string of characters uniquely
identifying a user to a system ?
Uniqueness allows individual
accountability
Digital Certificate
User Verification
Via something the user knows - password
Via something the user has - magnetic
?
card, smart card, biometrics
RACF installation exits can augment
RACF user
As a general objective, all users should be defined to RACF. Users who are not defined to
RACF can use the system virtually without verification, unless, of course, they attempt to
access data to which they are unauthorized.
User identification
RACF uses an alphanumeric user ID for its user identification. The user ID identifies the
person to the system as a RACF user. From a security point of view, the user ID is unique and
must not be shared by different users. This uniqueness provides individual accountability.
Valid users
Normally, when you define a user to RACF, you assign a user ID and a temporary password.
There are exceptions. Therefore, RACF provides the RESTRICTED parameter, which we
explain in 2.13, “RACF user attributes” on page 29.
Furthermore, you can have installations exits that expand user verification.
Note: It is the installations responsibility to accomplish and monitor security guidelines (for
example, unique user IDs and password rules).
User profile
RACF stores information in its database. For each defined user ID, RACF keeps a user profile
in the class USER. The profile consists of the RACF base segment and optionally additional
segments which hold informations related to the different resource manager.
RACF base segment
The RACF base segment contains the following fields:
user ID The user ID is at the same time the name of the profile.
owner The owner of the profile has the authority to change the profile.
Every profile in RACF needs an owner.
password The password entry is one-way encrypted. It is not possible to
decrypt the password. If a user forgets the password phase or
password, the administrator has to set a new temporary password
and the user has to change this at the next logon.
attributes This field contains extraordinary attributes. The attributes
SPECIAL, OPERATIONS and AUDITOR should be given only to a
few selected user IDs. Further information is provided in 2.13,
“RACF user attributes” on page 29.
groups A user ID belongs at least to his default group, but can be a
member of more groups. This field contains the groups to which the
user ID is connected.
security classification Security classification is a further step of security and is described
as mandatory security control compared to the discretionary
security control.
AT GROUP
SYSTEM WIDE LEVEL
User attributes
User attributes are extraordinary capabilities, limitations, or environments that can be
assigned to a user either system wide or when the user is connected to a specific group or
groups. When an attribute is to apply system wide, it is specified at the system level and is
called a user attribute. When an attribute is to apply only to a specified group or groups, it is
specified at the group level and is called a group-related user attribute.
User attributes that you specify in an ADDUSER or ALTUSER command are stored in the
user’s profile and are in effect regardless of the group to which the user is connected.
However, attributes that you specify in a CONNECT command are valid only for this group.
Note: Users with the SPECIAL attribute do not have access to all resources, but they can
use commands to give themselves access to all resources.
AUDITOR The AUDITOR attribute is given to users who are responsible for auditing
RACF security controls and functions. To provide a check and balance on
RACF security measures, you should give the AUDITOR attribute to
Note: Because the OPERATIONS attribute can permit access to a wide range of
resources, use this attribute very carefully. In some cases, you need to audit these users.
REVOKE You can prevent a RACF user from entering the system by assigning the
REVOKE attribute. This attribute is useful when you want to prevent a user
from entering the system, but you can or will not use the DELUSER
command because the user still owns RACF resource profiles.
You can also assign the REVOKE attribute on a group level by using the
CONNECT command. If the user has the REVOKE attribute for a group,
the user cannot enter the system by connecting to that particular group or
access resources as a member of that group.
Note: RACF allows you to specify a future date for a REVOKE to occur (at both the system
and the group level). You can also specify a future date to remove the REVOKE attribute by
using the RESUME operand on the ALTUSER command (for example, when you want to
inhibit a user from entering the system during a long absence).
CLAUTH Users receive the CLAUTH attribute on a class-by-class basis. You cannot
assign the CLAUTH attribute at the user or group level.
If a user has the CLAUTH attribute in a class, RACF allows the user to
define profiles in that class.
RESTRICTED You can prevent RACF users from gaining access to protected resources
they are not specifically authorized to access by assigning the
RESTRICTED attribute on the ADDUSER or ALTUSER command.
PROTECTED You cannot log on to a protected user. This attribute is used mainly for
started tasks to prevent a user ID from being revoked due to multiple
unsuccessful logon attempts.
WHEN Specifies days of the week and hours of the day during which the user has
access to the system.
ACCTNUM CONSNAME
OPIDENT UID
COMMAND CTL
TIMEOUT HOME
PROC DOMAINS
And so PROGRAM
And so And so forth
forth
forth
The base RACF segment is the part of the RACF profile that contains the fundamental
information about a user, group, or resource and is common to several applications.
Password Management
Allows user to select own password phrase and/or
password
Only user knows his password phrase and/or
password
Security administrator cannot read, but can reset
password and password phrase
Password and Password Phrase Control
Interval, history, syntax rules, expiration warning,
suppression
Last logon message
Revoke invalid attempts
DES one-way encryption
EXIT - check or generate passwords
In RACF, users select their own password (and optionally a password phrase) and only the
user knows these values. If a password or password phrase needs to be reset, the security
administrator either resets it to the default or sets a temporary password (and optionally a
password phrase). This profile is normally in an expired state, thus forcing the user to enter a
new password or password phrase on the first logon.
You can set a variety of rules for forming valid passwords, using the SETROPS command (for
system-wide settings) or the PASSWORD command (to affect only one user). You can
change such things as the number of days a password is valid, how long to maintain
password history to prevent the user from reusing the same password again, and so on.
The syntax rules for password phrases are “hard coded” but can be controlled by use of an
exit.
The password and password phrase is one-way encrypted using a DES algorithm. The key
being used is the password itself. The encrypted password and password phrase are stored
in the user profile.
The command adds a profile for the new user to the RACF database and creates a connect
profile that connects the user to whichever default group you specify. The user profile consists
of a RACF segment and, optionally, other segments such as a TSO segment, a DFP
segment, or an OMVS segment. You can use this command to define information in any
segment of the user’s profile.
Figure 2-17 shows sample output from the following ADDUSER command when the
LISTUSER is issued:
ADDUSER JAMES NAME('BROWN JAMES') DFLTGRP(MFG)
OWNER(ADMUSERS) PASSWORD(NEW2DAY)
This command adds a new user ID, JAMES, into default group, MFG.
T CONNECT ATTRIBUTES=NONE
REVOKE DATE=NONE RESUME DATE=NONE
SECURITY-LEVEL=NONE SPECIFIED
CATEGORY-AUTHORIZATION
NONE SPECIFIED
SECURITY-LABEL=NONE SPECIFIED
You can use the RACF ISPF panels to reset passwords but it is easier to use the following
commands:
PASSWORD When used to reset another user’s password, the only option is to set the
password equal to the user’s default group name. The default group name
is often SYS1. So, if the PASSWORD command is used to reset a user’s
password, the password is probably SYS1, which has obvious security
consequences.
ALTUSER You set the password phrase or the password. You can also specify
whether the user must specify the passwords again. This is indicated by
EXPIRED or NOEXPIRED.
In both cases, the password is marked automatically as expired, by default. Thus, the user is
forced to select a new password when logging on to the system the next time. With the ALU
command, you can also set an unexpired password, which is password one that the user can
use until changing it for some reason.
You need to tell Martin the new password that you assigned. Martin needs the new password
to log on but is forced to change the password immediately to a password of his own selection
(unless you used the NOEXPIRED option). The PASSWORD NOINTERVAL command
prevents this user’s password from ever expiring. You need SPECIAL authority to issue these
commands.
When the panel shown in Figure 2-19 displays, carry on from this point.
Remember that the password that you assign must be changed by the user when that user
logs on to the system the next time. You can use this same panel, and other panels that
displays after you press Enter, to change the same elements as the ALTUSER command.
When you change a user’s level of authority in a group (using the AUTHORITY operand),
RACF updates the appropriate group profile. When you change a user’s default universal
access authority for a group (using the UACC operand), RACF changes the appropriate
connect profile. For all other changes, RACF changes the user’s profile.
Figure 2-20 shows sample output from the following ALTUSER command which adds the
attribute of AUDITOR to the user ID ROGERS:
ALTUSER ROGERS AUDITOR
O
U USER=JAMES NAME=BROWN JAMES OWNER=ADMUSERS CREATED=99.041
T DEFAULT-GROUP=MFG PASSDATE=00.000 PASS-INTERVAL=60
ATTRIBUTES=NONE
P
...
U ...
T
The value that you specify here cannot exceed the value, if any, that your installation has
specified using the INTERVAL operand on the SETROPTS command. The initial system
default after RACF initialization is 30 days.
Figure 2-21 shows sample output from the following PASSWORD command, which sets the
password expiration date for user ID James to 60 days:
PASSWORD USER(JAMES) INTERVAL(60)
Overriding any system default password expiring setting is set by the SETROPTS command.
O
U
T UNABLE TO LOCATE USER ENTRY JAMES
P
U
T
There are, however, other places in the RACF database where the user’s user ID might
appear. The DELUSER command does not delete the user ID from all these places.
Specifically, the user could be the owner of a group, the owner of a user’s profile, the owner of
a group data set, or in an access list for any resource. Before issuing DELUSER, you must
first issue the REMOVE command to assign new owners for any group data sets the user
owns in groups other than his default group. You can use the RACF Remove ID utility
(IRRRID00) to remove all of the occurrences of a user ID. For information about using the
RACF Remove ID utility, see z/OS Security Server RACF Security Administrator's Guide,
SA22-7683.
To use the DELUSER command, at least one of the following must be true:
You must have the SPECIAL attribute.
The user profile to be deleted must be within the scope of a group in which you have the
group-SPECIAL attribute.
You must be the owner of the user’s profile.
Figure 2-22 shows sample output from the following DELUSER command, which deletes the
user ID James.
DELUSER JAMES
ADDUSER
ALTUSER
CONNECT
DELUSER
REMOVE
LISTUSER
PERMIT
PASSWORD
RACF commands
You define users to RACF by issuing RACF commands that include various user attributes, as
well as other control information that RACF uses. Some of the commands that you might use
in your user-definition tasks include:
ADDUSER Add a user profile to RACF.
ALTUSER Change a user’s RACF profile.
CONNECT Connect a user to a group.
DELUSER Delete a user profile from RACF and remove connection to a group.
REMOVE Remove a user from a group and assign a new owner for group data sets
owned by the removed user.
LISTUSER Display the contents of a user’s profile.
PERMIT Permit a user to access a resource (or deny access to a resource).
PASSWORD Change a user’s password.
In addition to defining individual users, you can define groups of users. Group members can
share common access authorities to a protected resource.
Group advantages:
Reduces administrative efforts
Allows decentralized administration by delegation of
administrative authority
RACF groups
With RACF, all defined users belong to at least one group. You can think of the groups forming
a hierarchical, or “tree” structure, where each group is owned by a superior group. Groups
can also own resources as well as users in another group.
SYS1
PROD DEVELOP
POU KGN
- TOM (with group special
attribute)
TEST MFG
- JOE - SALLY
- MARY - FRANK
- SALLY - RICH
When you define a group, consider the basic purpose of the group. Is it an administrative
group, a holding group, a data control group, a functional group, or a user group? When
setting up RACF groups, keep in mind that the maximum number of users that you can
connect to any one group is approximately 5900.
You should map your groups to your organization’s structure and arrange them hierarchically,
with the IBM-supplied SYS1 group as the highest group, so that each group is a subgroup of
another group.
A user can be connected in more than one group (in Figure 2-25, SALLY is connected to MFG
and TEST groups).
In Figure 2-25, GROUP, DESIGN, TEST, and MFG are all owned by group POU. Tom is
connected to group POU as special, which gives Tom (who is the RACF administrator) control
over all POU resources DESIGN, TEST, and MFG.
Add a group:
ADDGROUP EXPED OWNER(ADMGRPS)
SUPGROUP(POU)
List the group:
LISTGRP EXPED
Group profiles consist of a RACF segment and, optionally, other segments such as DFP and
OMVS. You can use this command to specify information in any segment of the profile.
To use the ADDGROUP command, you must meet at least one of the following conditions:
Have the SPECIAL attribute
Have the group-SPECIAL attribute and the superior group is within your group-SPECIAL
scope
Be the owner of the superior group
Have JOIN authority in the superior group
Figure 2-26 shows sample output from the ADDGROUP command, adds a new group named
EXPED and is a subgroup to group POU:
ADDGROUP EXPED OWNER(ADMGRPS) SUPGROUP(POU)
Alter a group:
ALTGROUP EXPED SUPGROUP(KGN)
List the group:
LISTGRP EXPED
O
INFORMATION FOR GROUP EXPED
U SUPERIOR GROUP=KGN OWNER=ADMGRPS
T NO INSTALLATION DATA
NO MODEL DATA SET
P TERMUACC
U NO SUBGROUPS
NO USERS
T
To change the superior group of a group, you must meet at least one of the following
conditions:
You must have the SPECIAL attribute
All the following group profiles must be within the scope of a group in which you have the
group-SPECIAL attribute:
– The group whose superior group you are changing
– The current superior group
– The new superior group
You must be the owner of, or have JOIN authority in, both the current and the new superior
groups.
Figure 2-27 shows sample output from the ALTGROUP command, which moves the group
named EXPED from being a subgroup of group PGN to a subgroup to group KGN:
ALDGROUP EXPED SUPGROUP(KGN)
Delete a group:
DELGROUP EXPED
List the group:
LISTGRP EXPED
O
U
T NAME NOT FOUND IN RACF DATA SET
P
U
T
There are, however, other places in the RACF database where the group name might appear,
and DELGROUP processing does not delete these other occurrences of the group name. For
example, the group name could be in the access list for any resource. You can use the RACF
Remove ID utility (IRRRID00) to remove all occurrences of a group name. For information
about using the RACF Remove ID utility, see z/OS Security Server (RACF) Security
Administrator’s Guide, SA22-7683.
Figure 2-28 shows sample output from the DELGROUP command, which deletes the EXPED
group:
DELGROUP EXPED
To use the CONNECT command, one of the following conditions must be true:
The SPECIAL attribute
The group-SPECIAL attribute in the group
The ownership of the group
JOIN or CONNECT authority in the group
Figure 2-29 shows sample output from the CONNECT command, which connects user
James to group TEST:
CONNECT JAMES GROUP(TEST)
...
...
To use the REMOVE command, one of the following conditions must be true:
The SPECIAL attribute
The group-SPECIAL attribute in the group
The ownership of the group
JOIN or CONNECT authority in the group
Figure 2-30 shows sample output from the following REMOVE command:
REMOVE JAMES GROUP(TEST)
RACF-protected resources can be divided into two categories: data sets and general
resources. General resources are all of the resources that are defined in the class descriptor
table. For example, general resources include DASD and tape volumes, load modules
(programs), terminals, and others.
RACF allows the installation to set its own rules for controlling the access to its resources by
defining what is controlled at what level. The installation can tailor RACF to interact with its
present operating environment and assign security responsibilities either on a system-wide or
a group-wide basis.
Your installation can add new class descriptor table (CDT) entries or modify or delete existing
entries that you have added in the installation-defined class descriptor table (ICHRRCDE).
When you define a new resource class, you can optionally designate that class as either a
resource group class or a resource member class. For a resource group class, each user or
group of users that is permitted access to that resource group is permitted access to all
It is possible to define dynamic class descriptor table (CDT) entries. This is done by defining
profiles in the CDT class. Profiles in this class have a CDTINFO segment which contains all
the parameters that could be defined in the installation-defined class descriptor table
(ICHRRCDE).
Profiles contain:
The owner of the profile
The auditing parameters
The Universal Access authority
An access list with users and groups
A "warning" indicator
A security classification
A real-time notification information
An erase-on-scratch indication for PROGRAM
CALL ABC
data sets ...
...
END
Resource-to-Profile Matching
Rule (if generic is active for the class):
Discrete profile - If it does not exist
Fully qualified generic profile - If it does not exist
The most specific generic profile
Example : SALES.YEARLY.QUOTA data set =>
profile ??
1. Discrete profile SALES.YEARLY.QUOTA
SALES.YEARLY.QUOTA ?
See z/OS Security Server (RACF) Security Administrator's Guide, SA22-7683, for more detail
about how this process works.
Some of the generic profile naming for general resources has been enhanced with some of
the same concepts as generics for data set profiles as valid generic characters as follows:
* You can have an asterisk (*) within a profile name, representing one qualifier of a
resource name, or specify * in the profile name to match more than one character in
the same position of the resource name.
** You can also use a double asterisk (**) to represent zero or more qualifiers within a
general resource generic profile or at the end of such a profile, or specify ** in the
profile name to match more than one character in the same position of the resource
name. Use of the double asterisk (**) in general resource generic profiles is not
controlled by the SETROPTS EGN option, which applies only to the data set profiles.
% Specify % any single non-blank character (except a period) in the same position of
the resource name
In Figure 2-33, a resource manager issues a security check for the data set
SALES.YEARLY.QUOTA. Three different types of profiles can be defined in the RACF
database:
A discrete profile
A fully qualified generic profile
The most specific generic profile
The example shows that RACF looks for a profile in the order shown. If no discrete profile is
found, check for a fully qualified profile. If not found, then find the most specific generic profile,
which is the second one in the example, SALES.YEARLY.%%%%%.
Note: By using generic profiles, your installation can reduce both the number of profiles
that are required to protect data sets and the size of the RACF database, thus making
RACF protection easier to administer. In addition, generic profiles are loaded into storage
when first needed, are not deleted when the data set they protect is deleted, and are not
volume-specific (that is, data sets protected by a generic profile can reside on any volume).
You can create a profile with a generic name when the following is true for the class of the
profile:
SETROPTS GENERIC(DATASET) option is in effect.
This option allows the creation of generic profiles and also causes RACF to use generic
profiles during authorization checking.
The ADDSD command adds a profile for the data set to the RACF database to control access
to the data set. It also places the user ID on the access list and gives ALTER authority to the
resource unless SETROPTS NOADDCREATOR is in effect.
Each data set profile defined to RACF requires a RACF-defined user or group as the owner of
the profile. The owner (if a user) has full control over the profile, including the access list.
If the owner of the data set profile is a group, users with group-SPECIAL in that group have
full control over the profile.
Ownership of data set profiles is assigned when the profiles are defined to RACF. Note that
ownership of a data set profile does not mean that the owner can automatically access that
data set. To access a data set, the owner must still be authorized in the profile’s access list,
unless the high-level qualifier of the profile name is the owner's user ID.
To allow users to have access to the data set, the PERMIT command shown specifies that
user ID JANE has only READ access to the data set, ACC(READ). User ID JANE exists in the
access list for the data set profile using the PERMIT command.
ALTER END
R
Meaning of each access level depends on
the resource type
Using the PERMIT command maintains a list of users and groups authorized to access a
particular resource. RACF provides two types of access lists:
Standard The standard access list includes the user IDs and group names
authorized to access the resource and the level of access granted to
each.
Conditional The conditional access list includes the user and group names
authorized to access the resource and the level of access granted to
each when a certain condition is met.
U AUDITING
T FAILURES(READ)
P NOTIFY
NO USER TO BE NOTIFIED
U
YOUR ACCESS CREATION GROUP DATASET TYPE
T NONE SYS2 NON-VSAM
GLOBALAUDIT
NONE
NO INSTALLATION DATA
The descriptions of naming conventions are followed by rules for protecting and allocating
user and group data sets.
By default, RACF expects a data set name (and the data set profile name) to consist of at
least two qualifiers. RACF also expects the high-level qualifier of the data set profile name to
be either a RACF-defined user or a RACF-defined group name.
This command added a generic profile for data sets with a high level qualifier of JAMES.*.
The asterisk (*) character is a valid generic character for more than one character in this
position.
ADDSD 'JAMES.*'
GLOBALAUDIT
NONE
NO INSTALLATION DATA
Figure 2-37 shows the output for the following command to alter the auditing options for the
previously data set, JAMES.*:
ALTDSD'JAMES.*' AUDIT(S(U),F(R))
The command also specifies which new access attempts you want to log to the SMP data set.
SUCCESS S(U) Indicates that you want to log authorized accesses to UPDATE
FAILURES F(R) Indicates that you want to log detected unauthorized access attempts
to read
Figure 2-37 shows a sample output from the ALTDSD command, which shows the auditing
options as:
SUCCESS(UPDATE),FAILURE(READ)
O
U JAMES.PRIVATE.RECORDS
T JAMES.PRIVATE.* (G)
discrete
P JAMES.* (G)
U
T generic
MASK specifies the strings of alphanumeric characters used to search the RACF database.
This data defines the range of profile names selected. The two-character strings together
must not exceed 44 characters for a tape or DASD data set name, or, for general resource
classes, the length specified in the class descriptor table.
The visual shows a SEARCH command with the search criteria, MASK.
SEARCH MASK(JAMES) CLASS(DATASET)
This command allows RACF to list profiles starting with the MASK, in this case JAMES.
A second example allows RACF to list all profiles containing the filter string.
SEARCH FILTER(JAMES) CLASS(DATASET)
DSNS specifies that you want to list the cataloged data sets protected by the profile specified
in the DATASET, ID, or PREFIX operand.
This command allows Bill and the DESIGN group update access to the files protected by the
James.* data set profile. Mark, Laurie, and Walt part of the DESIGN group will have UPDATE
access, unless the access list contains their user ID with another level of access.
PERMIT 'JAMES.*' ID(PAT) ACCESS(READ)DSNS
Pat has read access to the files that are protected by the JAMES.* profile.
INSTALLATION DATA
-----------------
NONE .../...
Setting NOPADCHK means that RACF will not check for program-accessed data sets when a
user is executing the control programs.
The UACC is the default access to a resource if the user or group is not specifically permitted
access to the resource. The ALTER command has set the default access of MYMUSIC at
READ.
T PMBR
...
P ...
ID ACCESS
U -------- -------
T MARVIN NONE
Despite the UACC(READ) on the resource profile, MARVIN cannot access the resource
because NONE is specified in the access list.
Authorization required
SETROPTS command
RACF provides many system-wide options for controlling the way it works on your system.
You specify most of these options by issuing the SETROPTS command with the appropriate
operands. One example is to set the system-wide valid password interval:
SETROPTS PASSWORD INTERVAL(30)
The INTERVAL suboperand specifies the system default for the number of days that the
user’s password is to remain valid. The example specifies that each user’s password remains
valid for 30 days.
CLASSACT parameter
When you install a new RACF system, initially only a few RACF classes are active (for
example USER, GROUP, and DATASET), other classes (for example TAPEVOL and
TSOPROC) are inactive. For example, if you want your tape volumes to be protected by
RACF, you have to activate the TAPEVOL class using the following command:
SETROPTS CLASSACT(TAPEVOL)
The following example updates the profile in the class TSOPROC dynamically:
SETROPTS RACLIST(TSOPROC) REFRESH
Authorization
The SETROPTS command is very powerful and, therefore, most of the options require the
SPECIAL attribute.
Note: For further information about the required authority, refer toz/OS Security Server
RACF Command Language Reference, SA22-7687. The description for each RACF
command contains a heading called Authorization Required.
The following pages show some examples (but not all) of system-wide settings. They are
grouped to:
STATISTIC related options
PASSWORD options
Data set related options
CLASS related options
AUTHORIZATION Checking options
TAPE related options
Other initial setup related options
Security Label related options
AUDITOR related options
(INITSTATS)
Revoking unused user IDs (INACTIVE)
Attention: Remember that the initiation of STATISTICS is system-wide for all discrete
profiles within a particular resource class across your system. Depending on the number of
discrete profiles in the various resource classes, turning on STATISTICS can negatively
affect performance.
Tip: It is recommended that you keep STATISTICS off until your installation has had an
opportunity to evaluate the need for STATISTICS versus the potential impact on
performance.
For details seez/OS Security Server RACF Systems Programmer’s Guide, SA22-7681.
INITSTATS is required if your installation wants to take advantage of the following options:
SETROPTS INACTIVE option
SETROPTS PASSWORD option with parameter REVOKE, HISTORY, and WARNING
If you issue the SETROPTS INACTIVE(30) command and if a user has not done any of the
following activities in 31 days, that user is considered revoked:
Logged on
Submitted a job
Changed the user’s password by any method
Attempted an unsuccessful logon
Received a directed command or output from RACF
The INACTIVE option applies also to new RACF defined user IDs if the new user ID is not
used within the number of days specified by SETOPTS INACTIVE.
Note: The user is not actually revoked. RACF revokes the user the next time the user
attempts to enter the system.
SETROPTS PASSWORD
Allowing mixed-case passwords
SYSTEM
SYSTEM
Establishing syntax rules OPTIONS
OPTIONS
SETROPTS PASSWORD
The examples in this section show some of the SETROPTS PASSWORD parameter, which
gives you the possibility to specify system-wide options regarding passwords. An optional
password phrase can be used. Most of the information for password also controls password
phrases.
Attention: If you want to allow mixed-case passwords, be sure that mixed-case content is
permitted by your password syntax rules.
Note: z/OS 1.7 is the first release that supports mixed-case passwords. If you share the
RACF database with downlevel systems that do not support mixed-case RACF passwords
or if you use a mix of applications that do and do not support mixed-case passwords, do
not activate the SETROPTS PASSWORD(MIXEDCASE) option.
Note: Your changes will take effect for current users only when they change their
passwords. For new users, the changes will take effect when the new user logs on for the
first time.
Note: z/OS 1.7 is the first release that supports MINCHANGE. The installation default is
zero (0) days for minimum change interval. The value MINCHANGE(0) allows users to
change passwords more than once each day.
The HISTORY suboperand specifies the number of previous passwords (in the following
example, 10) that RACF saves and compares with an intended new password:
SETROPTS PASSWORD(HISTORY(10))
REVOKE specifies how many consecutive password verification attempts RACF permits
before it revokes a user ID on the next attempt:
SETROPTS PASSWORD(REVOKE(3))
(EGN)
Note: IBM strongly recommends that you do not deactivate enhanced generic naming
after data set profiles have been created while enhanced generic naming was active.
Note: Before activating this option, activate generic profile checking also for the DATASET
class as shown in the following command:
SETROPTS GENERIC(DATASET)
For further considerations on the PROTECTALL option, see z/OS Security Server RACF
Security’s Administrator’s Guide, SA22-7683.
Note: We recommend the NOADSP option because it reduces the number of data set
profiles in the RACF database. Using generic data set profiles is generally more efficient.
You can change the installation default using the following command:
SETROPTS NOADSP
Note: Because of the big impact this option can have on data processing, it might be
reasonable to specify CATDSNS(WARNING) before you plan to activate it in failure mode.
RACF internally modifies single-qualifier names by adding the high-level qualifier (in this case
myhlq) when it processes requests for the data set. The prefix must be an existing group
name and cannot be the name used as the high-level qualifier of any actual data sets or data
set profiles.
In these cases, if the TEMPDSN class is active, only users with the OPERATIONS attribute
can scratch any residual DFP-managed temporary data sets remaining on a volume.
Note: The user with the OPERATIONS attribute can access the data set only to scratch the
data set. No other access is allowed (such as would be allowed by READ or UPDATE
access authority to the data set).
Important: Plan carefully when to activate the TEMPDSN class to avoid a situation where
current users or jobs are using temporary data sets. Otherwise, you might cause users or
jobs to receive an ABEND.
Important: We do not recommend that you activate all RACF classes. Activate only those
classes that are important to your installation, because some classes have a default return
code of eight. Activate those classes only after you define the necessary profiles to allow
access to resources, using the following command:
SETROPTS NOCLASSACT(TERMINAL)
Generic profile command processing is activated automatically for all classes for which
generic profile checking is activated.
NOGENERIC and NOGENCMD are in effect when a RACF database is first initialized using
IRRMIN00.
Tip: We recommend that you use generic profiles, if possible, to protect multiple resources
and, thus, to ease the administration. Consider issuing SETROPTS GENERIC(*) so that
generic profiles and generic command processing are usable in all classes.
For more information, see z/OS Security Server RACF Security’s Administrator’s Guide,
SA22-7683.
Attention: Because RACF performs global access checking before many of the other
kinds of access authority checks, such as security label checking or access list checking,
global access checking might allow access to a resource you are otherwise protecting. To
avoid a security exposure to a sensitive resource, do not create an entry in the global
access checking table for a resource that is protected by a profile containing a security
level, security category, or security label.
Important: When global access checking allows a request, RACF performs no logging
other than that requested by the SETROPTS LOGOPTIONS command. See also
“LOGOPTIONS: Activating auditing for access attempts by class” on page 90.
For further consideration before activation of global access checking, see z/OS Security
Server RACF Security’s Administrator’s Guide, SA22-7683.
Note: RACF does not allow you to specify SETROPTS GENLIST and SETROPTS
RACLIST for the same general resource class at the same time.
For more information about when to use RACLIST and GENLIST processing, see z/OS
Security Server RACF Systems Programmer’s Guide, SA22-7681. Classes for which
RACLIST processing is recommended are listed there.
Note: A general resource class must be active before you can activate SETROPTS
GENLIST or SETROPTS RACLIST processing for that class.
To activate refreshing of SETROPTS RACLIST processing for the TSOPROC and TSOAUTH
classes, use this command:
SETROPTS RACLIST(TSOPROC TSOAUTH) REFRESH
Restricting the creation of general resource profiles (GENERICOWNER)
RACF provides the possibility to restrict the creation of profiles in general resource
classes.You have to issue the SETROPTS GENERICOWNER command and define a double
asterisk (**) profile for the class with yourself as owner.
Note: The GENERICOWNER operand does not affect the DATASET class. It cannot be
activated for individual classes. When active, GENERICOWNER affects all general
resource classes except the PROGRAM class and general resource grouping classes.
Note: We recommend that you use the NOADDCREATOR option. If the creating user
needs access to the profile being defined, then access to the profile should be done
separately, and if possible, by specifying a group and not an individual user ID.
(WHEN(PROGRAM))
Activating Terminal Control
(TERMINAL(READ/NONE))
Note: If list-of-groups checking is activated and if a user is in more than one group and
tries to access a resource, RACF uses the highest authority that is allowed by the user’s list
of groups and the resource’s access list.
NOGRPLIST is in effect when RACF is using a newly-initialized database. You can change
this option using the following command:
SETROPTS GRPLIST
Tip: We recommend that you use the GRPLIST option because it eases administration
and minimizes the number of times the user might have to log off and log back on to
access resources.
When program control is active, RACF provides access control to load modules, and program
access sets and SERVAUTH resources.
Access control to load modules allows only authorized users to load and execute specified
load modules (programs). RACF uses profiles in the PROGRAM general resource class to
control access to programs.
Program access to data sets allows an authorized user or group of users to access specified
data sets in conjunction with the user’s authority to execute a certain program. That is, some
users can access specified data sets at a specified access level only while executing a certain
program.
Program access to SERVAUTH class resources allows an authorized user or group of users
to access certain IP addresses in conjunction with the user’s authority to execute a certain
program. That is, some users can access specified IP addresses at a specified access level
only while executing a certain program.
Note: We recommend that you implement the general resource class PROGRAM from a
security point of view. There are a lot of system programmer related programs, for example
AMASPZAP or some RACF utilities, which should not be used by unauthorized users.
For details on program control, seez/OS Security Server RACF Security’s Administrator’s
Guide, SA22-7683.
The following command sets the TERMINAL class of resource in RACF to an active,
system-wide status:
SETROPTS CLASSACT(TERMINAL) TERMINAL(READ)
All subsystems that use RACF to control access to terminals now have terminal checking
active when this command is issued. The READ option of the TERMINAL operand indicates
how RACF is to view terminals that are not defined to RACF. READ indicates that if RACF
cannot find a profile for that terminal, access to the terminal is to be allowed.
To prevent undefined terminals from being used for logging on, use the following command:
SETROPTS TERMINAL(NONE)
Attention: Before you specify NONE, be sure that you define some terminals to RACF and
give the appropriate users and groups proper authorization to use them. Otherwise, no one
can log on to your system.
If your installation uses dynamic IP addresses instead of static VTAM defined terminal names,
it is not easy to administrate profiles in the RACF class TERMINAL.
(TAPEVOL )
Establishing a Security Retention Period
for Tape Data Sets (RETPD)
RACF allows you to establish access requirements for both tape data sets and tape volumes.
NOTAPEDSN is in effect when a RACF database is first initialized using IRRMIN00. In this
case, RACF cannot protect individual tape data sets, although it can protect tape volumes.
If both the TAPEVOL class and TAPEDSN are active, RACF maintains profiles in both the
TAPEVOL and DATASET classes. Data fields within these two profiles (data set name in the
TAPEVOL profile and volume serial in a discrete data set profile) link the two profiles to each
other. The following example shows how to activate tape volume protection:
SETROPTS CLASSACT(TAPEVOL)
For more information, see “Choosing Which Tape-Related Options to Use” in z/OS Security
Server RACF Security’s Administrator’s Guide, SA22-7683.
Authorization required
Unlike the SETROPTS command, the RVARY command needs no special user attribute for
the submitting user ID. However, the operator (at the operator console or security console)
If the RVARY command changes RACF or its database status (ACTIVE/INACTIVE), RACF
issues an informational message, and the operator is required to enter the password that is
defined by RVARYPW STATUS(status-pw) to authorize the change.
If the RVARY command switches the RACF data sets (SWITCH) or changes the RACF
operating mode (DATASHARE/NODATASHARE), RACF issues an informational message,
and the operator is required to enter the password that is defined by RVARYPW
SWITCH(switch-pw).
RACF allows you to specify separate passwords for switching the databases and for changing
RACF status. The following example specifies HAPPY as the switch password and RABBIT as
the status password:
SETROPTS RVARYPW(SWITCH(HAPPY) STATUS(RABBIT))
When RACF is first initialized, the switch password and the status password are both set to
YES.
This section describes the auditor control options which refer to security events in conjunction
with RACF commands.
You deactivate logging for a class using the NOAUDIT operand. NOAUDIT(*) is in effect when
RACF is using a newly-initialized database.
Tip: We recommend that you keep CMDVIOL active and cause RACF to log all the
command violations that it detects. You can then use the RACF report writer to produce a
printed audit trail of command violations. You can determine how many command
violations are occurring and which users are causing the violations. A significant number of
command violations, especially when RACF is first installed, can indicate the need for
more user education. The report can also help you to identify any specific users who are
trying persistently to alter profiles without the proper authority.
If you decide to bypass logging of all violations that are detected by RACF commands (except
RVARY and SETROPTS, which are always logged) during RACF command processing, you
can specify the NOCMDVIOL operand on the SETROPTS command as shown in the
following example:
SETROPTS NOCMDVIOL
Tip: We recommend that you specify SAUDIT, because of the powerful commands a
SPECIAL user can submit. You can then use the RACF report writer to produce audit
reports.
If you decide to bypass this logging (for example, if you are concerned only with how
SPECIAL users change profiles and you have AUDIT(*) in effect), you can use the following
command:
SETROPTS NOSAUDIT
Tip: OPERAUDIT might be useful if you decide to remove the OPERATIONS attribute and
give those users access through the normal access list. You can then use the RACF report
writer or other auditing tools to produce a report on this events.
In this case, auditing is done every time a user logs on at any terminal on the system,
regardless of whether that terminal is protected by a profile and regardless of whether that
profile specifies auditing. You can specify that auditing be done for the following conditions:
ALWAYS All attempts to access resources protected by the class are audited.
NEVER No attempts to access resources protected by the class are audited. (All
auditing is suppressed.)
SUCCESSES All successful attempts to access resources protected by the class are
audited.
FAILURES All failed attempts to access resources protected by the class are audited.
DEFAULT Auditing is controlled by the profile protecting the resource, if a profile exists.
You can specify DEFAULT for all classes by specifying an asterisk (*) with
DEFAULT.
Note: The SUCCESSES and FAILURES operands result in auditing in addition to any
auditing that is specified in profiles in the class. In contrast, the ALWAYS and NEVER
operands override any auditing specified in profiles in the class.
Note: When RACF grants access to a resource because of an entry in the global access
checking table, RACF does not log the event even if you request logging.
If RACF is enabled for sysplex communication and the system is in read-only mode, users on
that system can issue the SETROPTS LIST command. All other operands are ignored.
You must have the RACF SPECIAL, AUDITOR, group-SPECIAL, or group-AUDITOR attribute
to enter the LIST operand.
If you have the SPECIAL or group-SPECIAL attribute, and not the AUDITOR or
group-AUDITOR, RACF displays all operands except the auditing related operands.
Figure 2-54 shows sample output from the following SETROPTS command:
SETROPTS LIST
RACF monitoring
For more immediate action, the user can request notification to the master terminal at the
time of violation. A non-zero value for the SECCNT keyword of the SECURITY macro causes
the master terminal to be notified.
Because the number of violations for a large network can be high due to misspelled
passwords, transaction codes, and commands, you can specify a threshold for notification.
The master terminal is not notified until the specified number of violations occur without a
valid input from a given terminal. You specify one to three invalid entries as the violation limit,
eliminating or reducing the number of notifications that are caused merely by operator error,
while still providing evidence of real attempts to avoid security safeguards.
Examples:
Unauthorized attempt to access system:
ICH408I USER(JAMES ) GROUP(MFG ) NAME(BROWN JAMES )
LOGON/JOB INITIATION - INVALID PASSWORD ENTERED AT TERMINAL ABCDE123
This message is issued when RACF detects an unauthorized request (a violation) made by a
user or job. The user and group indicated in the first line of the ICH408I message are the
execution user ID and group ID under which the job was to run.
Examples:
Invalid RACF operations:
ICH408I USER(JAMES ) GROUP(MFG ) NAME(BROWN JAMES )
FULL VIOLATION ON COMMAND ALTDSD
WHO WHAT
Optionally sent to the resource owner:
ICH70004I USER(JAMES) GROUP(MFG) NAME(BROWN JAMES)
ICH70004I ATTEMPTED 'READ' ACCESS OF
ICH70004I ENTITY 'MARVIN.MAIN.CLIST
ICH70004I IN CLASS 'DATASET' AT 19:38:45 ON FEBRUARY 15, 1999
This message alerts a RACF user that an access violation has occurred against the indicated
resource. This message is routed to the user specified in the NOTIFY field of the resource
profile that denied the access.
Auditing Tools:
Data Security Monitor (DSMON)
RACF Data Unload Utility (IRRDBU00)
Security data
Each of the following programs can help you accomplish your goals, depending on your
specific needs:
SMF data unload utility
RACF data unload utility
RACF report writer
Data security monitor (DSMON)
You can process complex inquiries and generate custom-tailored reports from the output of
the SMF data unload utility. These reports can be useful in identifying suspicious patterns of
access by authorized users that another program might miss. Because data is more often
misused by authorized users than stolen by unauthorized users, reports such as this are
essential to security.
The RACF report writer is stabilized at the RACF 1.9.2 level, and is not able to report on many
of the later RACF functions.
The RACF report writer can also be run from the TSO command line.
RACF auditors can use the DSMON reports to evaluate the level of security at the installation
and to compare the actual level of security at an installation with the planned level of security.
DSMON reports
DSMON produces the following reports:
System report
Group tree report
Program properties table report
RACF authorized caller table report
RACF class descriptor table report
RACF exits report
RACF global access checking table report
Selected user attribute report
Selected user attribute report summary report
Selected data sets report
You can use the program properties table report to verify that only those programs that the
installation has authorized to bypass password protection are, in fact able to do so. Such
programs are normally communication and database control programs and other system
control programs.
You can also verify that only those programs that the installation has authorized are able to
run in a system key.
You can use this report to verify that only those programs that are supposed to be authorized
to modify an ACEE (accessor environment element) are able to issue a REQUEST=VERIFY.
This verification is a particularly important security requirement because the ACEE contains a
description of the current user. This description includes the user ID, the current connect
group, the user attributes, and the group authorities. A program that is authorized to issue
REQUEST=VERIFY could alter the ACEE to simulate any user.
You can also use this report to verify that only those programs that are supposed to be
authorized to access profiles are able to issue REQUEST=LIST. Because profiles contain
complete descriptions of the characteristics that are associated with RACF-defined entities,
you must carefully control access to them.
You can use the class descriptor table report to determine which classes (in addition to
DATASET) are defined to RACF and active and, therefore, can contain resources that RACF
protects.
You can use the RACF exits report to verify that the only active exit routines are those that
your installation has defined. The existence of any other exit routines might indicate a system
security exposure, because RACF exit routines can be used to bypass RACF security
checking. Similarly, if the length of an exit routine module differs from the length of the module
when it was defined by your installation, the module might have unauthorized modifications.
Because global access checking allows anyone to access the resource at the associated
access authority, you should verify that each entry has an appropriate level of access
authority.
The RACF started procedures table reports RACF generates two reports about the started
procedures table.
If the STARTED class is active, the report uses the STARTED class profiles and contains the
TRACE attribute. The trace uses module ICHDSM00.
If the STARTED class is not active, the trace uses the installation replaceable load module,
ICHRIN03.
The reports list the procedure name, the user ID and group name to be associated with the
procedure, and whether the procedure is privileged or trusted.
You can use the report to determine which started procedures are defined to RACF, and
which have the privileged attribute. If a started procedure is privileged or trusted, it bypasses
all REQUEST=AUTH processing (unless the CSA or PRIVATE operand was specified on
REQUEST=AUTH), including checks for security classification of users and data.
You can use this report to verify that only those users who need to be authorized to perform
certain functions have been assigned the corresponding attribute.
You can use the selected data sets report to determine which of these data sets are protected
by RACF and which are not. You can also check whether the UACC associated with each of
the data sets is compatible with your installation's resource access control requirements.
.../...
RACF DSMON
The output file from the database unload utility can be:
Viewed directly
Used as input to your own programs
Manipulated with sort/merge utilities
Used as input to a database management system
Using the database unload utility output with DB2, you can use the DB2 Load Utility or its
equivalent to process the records that are produced by the database unload utility. The
definition and control statements for a DB2 to use this output, are shipped with OS/390 in the
SYS1.SAMPLIB.
Authentication
Authentication is one of the primary requirements to establish trust in e-business
transactions. The industry is looking for strong authentication and for standardization of the
authentication mechanisms. Strong authentication uses cryptography. Two prevalently
mechanisms exist today for strong authentication in a distributed environment. They differ by
the kind of cryptographic algorithms that they use, which is also their domain of application.
In this chapter, we explain digital certificates, which have a potentially unlimited scalability but
which need a PKI in place.
Cryptography
Security in communications over a non-secure network requires the use of cryptographic
procedures. If you send data in the clear over a network that is not completely under your
control from the receiver to the sender, you cannot assure the following security functions:
Privacy: Anyone who is able to intercept your data might be able to read it.
Integrity: An intermediary might be able to alter your data.
Accountability or non-repudiation: It might be impossible to determine the originator of a
message with confidence, and the person who sent the message can disclaim being the
originator.
Security functions such as Identification and Authentication are also impacted because if
authentication data such as passwords are sent without integrity and privacy, they can be
Most symmetric ciphers that are used are block ciphers, which operate on a fixed number of
characters at a time.
With these ciphers, it can be assumed that a brute-force attack is the only means of breaking
the cipher. Therefore, the work factor depends on the length of the key. If the key length is n
bits, the work factor is proportional to 2**(n-1).
Asymmetric encryption algorithms, commonly called Public Key Cryptosystems (PKCS), are
based on mathematical algorithms. The basic idea is to find a mathematical problem that is
very hard to solve.
Digital signatures
Digital signatures are an extension to data integrity. While data integrity only ensures that the
data received is identical to the data sent, digital signatures go a step further. Digital
signatures provide non-repudiation, which means that the sender of a message (or the signer
of a document) cannot deny authorship, similar to signatures on paper.
Digital certificates
The application of public-key technology requires the user of a public key to be confident that
the public key belongs to the correct remote person or system with which an encryption or
digital signature mechanism is used. This confidence is obtained through the use of
public-key certificates. A digital certificate is analogous to a passport—the passport certifies
the bearer’s identity, address and citizenship. The concepts behind passports and other
identification documents, such as drivers licenses, are very similar to those that are used for
digital certificates.
Identification documents are issued by a trusted authority, such as the Government passport
office or a Department of Motor Vehicles. A passport is not issued unless the person who
requests it can prove identity and citizenship to the authority. Specialized equipment is used
in the creation of passports to make it very difficult to alter the information in it or to forge a
passport altogether. Other authorities, for example the border police in other countries, can
verify a passport’s authenticity. If they trust the authority that issued the document, the
information contained in it is accepted as true.
The digital signature of the certification authority serves the same purpose as the special
measures taken for the security of passports, such as laminating pages with plastic material,
which allows others to verify the authenticity of the certificate. Using the public key of the
certification authority, the MIC can be decrypted. The message digest can be recreated. if it is
identical to the decrypted MIC, the certificate is authentic.
Trust is a very important concept in passports as well as in digital certificates. In the same
way as, for example, a passport that is issued by some governments, even if recognized to be
authentic, might not be trusted by U.S. authorities, so each organization or user has to
determine which certification authorities can be accepted as trustworthy.
Authorize -
Request fulfillment of
request
Fulfillment
Revoke Used by
or owner
Renew
Figure 3-2 Overview of digital certificate
When compared to other known means of strong authentication, digital certificates (and the
underlying public key cryptography algorithm) appear to be probably the best solution to the
current authentication and encryption problem involving a very large population of users over
a non-secure network such as the Internet.
However, the use of digital certificates, over the Internet or in an intranet environment,
requires a supporting Public Key Infrastructure (PKI), which is the set of services, tools, and
policies that enable the use of public key cryptography and management of keys and
certificates in a PKI domain. The certificates and the associated key pairs are expected to
have a life cycle as described in Example 3-2 on page 146.
Certificate request
Mary's name
Mary's public
key
CA's Digital Verifies CA's
Signature Signature using
CA's public key
"Mary"
A CA is just a piece in a bigger organization, that you need to put in place, or use an already
existing organization that we are calling a PKI.
LDAP Certification
Directory Authority
PKI Services
PKI Services allow you to establish a PKI infrastructure and serve as a certificate authority for
internal and external users, issuing and administering digital certificates in accordance with
the organization’s policies. Users can use a PKI Services application to request and obtain
certificates through their own Web browsers, while authorized PKI administrators approve,
modify, or reject these requests through their own Web browsers. The Web applications that
are provided with PKI Services are highly customizable, and a programming exit is also
included for advanced customization. You can allow automatic approval for certificate
requests from certain users and, to provide additional authentication, add host IDs, such as
RACF user IDs, to certificates you issue for certain users. You can also issue certificates for
browsers, servers, and other purposes, such as virtual private network (VPN) devices, smart
cards, and secure e-mail.
PKI Services supports Public Key Infrastructure for X.509 version 3 (PKIX) and Common
Data Security Architecture (CDSA) cryptographic standards. It also supports:
The delivery of certificates through the SSL for use with applications that are accessed
from a Web browser or Web server.
The delivery of certificates that support the Internet Protocol Security standard (IPSEC)
for use with secure VPN applications or IPSEC-enabled devices.
The delivery of certificates that support Secure Multipurpose Internet Mail Extensions
(S/MIME) for use with secure e-mail applications.
The trustworthiness of the parties depends on the trust that is placed in the CA that issued
the certificates. To ensure the integrity of a certificate, the CA digitally signs the certificate as
part of creating it, using its signing private key. Trying to alter a certificate invalidates the
signature and renders it unusable.
Protecting the CA’s signing private key is critical to the integrity of the CA. For this reason,
consider using ICSF to store PKI Services CA’s private key securely. As a CA using PKI
Services, you can:
Track certificates that you issue with an issued certificate list (ICL) that contains a copy of
each certificate, indexed by serial number
Track revoked certificates using certificate revocation lists (CRLs). When a certificate is
revoked, PKI Services updates the CRL during the next periodic update. Just as it signs
certificates, the CA digitally signs all CRLs to vouch for their integrity.
PKI
The PKI provides applications with a framework for performing the following types of
security-related activities:
Authenticate all parties that engage in electronic transactions
Authorize access to sensitive systems and repositories
Verify the author of each message through its digital signature
Encrypt the content of all communications
The PKIX standard evolved from PKI to support the interoperability of applications that
engage in e-business. Its main advantage is that it enables organizations to conduct secure
electronic transactions without regard for operating platform or application software package.
The PKIX implementation in PKI Services is based on the Common Data Security
Architecture (CDSA) from Intel Corporation. CDSA supports multiple trust models, certificate
formats, cryptographic algorithms, and certificate repositories. Its main advantage is that it
enables organizations to write PKI-compliant applications that support their business policies.
User Web Guides users to request, obtain, and renew certificates through their Web
application browsers. The application consists of sample screens that you can easily
customize to meet your organization’s needs for certificate content and standards
for appearance. It offers several certificate templates that you can use to create
requests for a variety of certificate types, based on the certificate’s intended
purpose and validity period, and supports certificate requests that are
automatically approved.
ICSF (optional) Securely stores the PKI Services certificate authority’s private signing key.
LDAP The directory that maintains information about the valid and revoked certificates
that PKI Services issues in an LDAP-compliant format. You can use an LDAP
server such as z/OS Security Server LDAP.
PKI Services The server daemon that acts as your certificate authority, confirming the identities
daemon of users and servers, verifying that they are entitled to certificates with the
requested attributes, and approving and rejecting requests to issue and renew
certificates. It includes support for:
An issued certificate list (ICL) to track issued certificates
Certificate revocation lists (CRLs) to track revoked certificates
R_PKIServ The application programming interface (API) that allows authorized applications,
callable service such as servers, to programmatically request the functions of PKI Services to
(IRRSPX00) generate, retrieve and administer certificates.
RACF (or Controls who can use the functions of the R_PKIServ callable service and
equivalent) protects the components of your PKI Services system. RACF creates your
certificate authority’s certificate, key ring and private key. You can also use it to
store the private key, if ICSF is not available.
z/OS HTTP PKI Services uses the Web server to encrypt messages, authenticate requests,
Server and transfer certificates to intended recipients.
One-year PKI SSL browser certificate User client authentication using SSL
Two-year PKI browser certificate for User client authorization using SSL when logging
authenticating to z/OS onto z/OS
Five-year PKI IPSEC server (firewall) certificate Firewall server identification and key exchange
One-year SAF browser certificate User client authentication where the security
product (RACF, not PKI Services) is the
certificate provider
One-year SAF server certificate Web server SSL certification where the security
product (RACF, not PKI Services) is the
certificate provider
PKIX:
PKIX:
Format of Certificate
Certificate
Revokation List
Management Certification Authority
CA Policy for the Domain Certificate Revocation Lists is X.509 V2
Protocol (CMP) and (optionally with a Issuance
Certificate Message Registration Authority))
The digital certificate life cycle as described previously is well documented and has been well
understood in the industry since the late 1980s. However, the design and implementation of
supporting technologies proved to vary from vendor to vendor. One of the early issues
encountered when attempting to implement a PKI was the lack of interoperability between
PKI products, hence the lack of potential scalability or capability to aggregate different PKI
domains. This issue proved to be a severe impediment to the development of PKI use in the
industry.
To address this issue, the Internet Engineering Task Force (IETF) launched the Public-Key
Infrastructure (X.509) Working Group (PKIX) in 1995.
A simplified graphical view of a PKIX-compliant PKI is shown in Example 3-5 on page 151.
The example does not fully representing all of the items that are addressed by the PKIX
Working Group but only the following items that are relevant to this book:
The PKCS#10 format for the certificate request
The X.509 V3 format for the signed certificate
The X.509 V2 format for the CRL
The LDAP protocol to reach the CRL residing in an LDAP directory
The OCSP protocol for real-time access to revocation information
Subject
The Subject is the entity named in a Public Key certificate. Subjects can be human users,
computers (represented by Domain Name Service [DNS] names or Internet Protocol [IP]
addresses), or even software agents. The subject is often referred to as the owner of the
certificate.
PKCS standards
We mentioned the interoperability through commonly adopted standards. A set of standards,
actually exists—informal standards as RSA calls them. These standards are widely used in
current PKI products, but they do not cover all the aspects of PKIs and are only partially cover
the addressed aspects. However, most of the new PKI standards will integrate these
standards because of their de facto status.
commonName = kappeler
organizationalUnitName =
PSSC
organizationName = IBM
version : 0 localityName = Montpellier
countryName = FR
subject X.500 name
RSAEncryption
Digital signature
subject public key info FB 9F E4 A6 9D 28 E8 B1 80 C7 01 89 D0 CC DD
generate using algorithm id 38
public key value EA DD 8F 06 D4 6E C5 85 8C 1A 02 94 A7 19 1F
requestor's 43
DE B3 89 EE B9 CE 70 50 52 72 A5 7C 49 70 E6
private key Attributes 7A
75 66 16 A6 F4 00 67 A2 88 F6 2C A6 58 E2 74 36
signature algorithm
identifier md5withRSAEncryption
Signature
Let us have a look now at the inside of a digital certificate, starting with PKCS-10 request.
After the key pair is generated, the public key and personal information are sent in a file that is
signed digitally with the private key that corresponds to the public key in the certificate. The
CA is going to use the information that is contained in the certificate request to build the final
certificate but will verify the digital signature as soon as it can using the public key in the
certificate request.
The PKCS#10 format is used for certificate requests only. It cannot be used for signed
certificates. It was created to allow for a certificate request format with a minimum of data to
be transferred.
X.509 certificate
The PKIX documents emphasize the following basic principles when it comes to using a
digital certificate:
Recipients of digital certificates must be confident that any time they rely on a public key,
the subject that they are communicating with owns the associated private key. This
concept applies whether an encryption or digital signature mechanism is used. This
confidence is obtained through the use of protocols (for example, SSL/TLS) that cannot
carry forward the communication if this condition is not fulfilled.
A certificate has a limited valid lifetime, which is indicated in its signed contents. Because
a PKC’s signature and timeliness can be checked independently by a certificate-using
client, certificates can be distributed through untrusted communications and server
systems and can be cached in unsecured storage in certificate-using systems.
Certificates are used in the process of validating signed data or securely transmitting
encryption keys. Specifics vary according to which algorithm is used, but the general
process works as follows:
a. The recipient of signed data verifies that the claimed identity of the user is in
accordance with the identity contained in the certificate.
b. The recipient validates that no certificate in the path is revoked (for example, by
retrieving a suitably current CRL or querying an online certificate status responder) and
that all certificates are within their validity periods at the time the data was signed.
If all of these checks pass, the recipient can accept that the data was signed by the purported
signer. As these basic principles always stand true, it appeared also during practical
experimentation of digital certificates that they had to be supported by more sophisticated
structures than initially planned. Actually, the X.509 digital certificate format had to go through
different evolutions, as explained in the following sections.
Note: It takes only two pieces of information to uniquely identify a digital certificate:
The Certification Authority’s (issuer’s) name
The serial number assigned to the certificate by the CA
CRL version : V2
CRL entry extensions
signature algorithm serial number
revocation date
CRL issuer name
certificate issuer
reason code
issuer (CA) X.500 name hold instruction code
invalidity date
this update (date/time)
next update (date/time)
Digital signature
generate using revoked certificate
serial number CRL extensions
issuer's private authority key identifier
revocation date
key CRL entry extensions issuer alternative name
CRL number
revoked certificate delta CRL indicator
serial number
Issuing distribution point
revocation date
CRL entry extensions
Each extension field is flagged
..... critical or non-critical
CRL extensions
X.509 V3 certificate
PKI Services certificates support most of the fields and extensions that defined in the X.509
version 3 (X.509 v3) standard. This support lets you use these certificates for most
cryptographic purposes, such as SSL, IPSEC, VPN, and S/MIME.
This section discusses the types of extensions that PKI Services certificates can include.
Standard extensions
The standard X.509 v3 certificate extensions include:
Authority information access
Authority key identifier
Basic constraints
Certificate policies
Certificate revocation list (CRL) distribution points
Extended key usage
Key usage
Subject alternate name
Subject key identifier
Other extensions
Other extensions are unique to PKI Services, such as host identity mapping. This extension
associates the subject of a certificate with a corresponding identity on a host system, such as
with a RACF user ID.
FB 9F E4 A6 9D 28 E8 B1 80 C7 01 89 D0 CC DD 38
EA DD 8F 06 D4 6E C5 85 8C 1A 02 94 A7 19 1F 43
DE B3 89 EE B9 CE 70 50 52 72 A5 7C 49 70 E6 7A
F3 AD E9 54 E4 A3 22 0D 75 66 16 A6 F4 00 67 A2 88 F6 2C A6 58 E2 74 36
B6 9F 17 0B BB B3 24 2B
A certificate is uniquely identified by the issuer's name and its serial number
However, for interoperability reasons, the contents of a certificate must go through specific
syntax and encoding (not encryption) transformations that render a certificate readable by
software only.
The certification authority builds the certificate file based on the information in the certificate
request and offline checkings, which can done on your personal information.
2
8 3
10 5
7 Request
DB
Issued
Cert DB
9
LDAP
Directory
Browser certificates
With a browser certificate, a certificate is requested to and obtained from the z/OS PKI
Services only using the HTTP/HTTPS protocol. This is a very straightforward process when
obtaining a browser (client) certificate, but it is more complicated to request, obtain, and
install a server certificate.
Web User
2
1a 3
1b 8 5
7 Request
DB
9 Issued
Cert DB
10
11
LDAP
Directory
Server certificates
Figure 3-13 shows the typical process flow for Web server certificates:
The Web server administrator uses server-specific software to generate a PKCS#10
request (1a).
This is copied (1b) and pasted (1c) into the certificate request Web page and submitted.
Steps for queuing, approving, issuing, and retrieving the certificate are identical to the
preceding browser flow (2 through 7).
The Web server administrator installs the certificate into the Web server (8) and brings it
online.
Web users can now visit the SSL-protected Web site (9).
If client authentication is enabled, the client's certificate is validated using the CRL in
LDAP (10).
If all is valid, the user gains access (11).
RA
HTTP server for z/OS
Admin
Browser Static Web Install/Config:
H Pages
T
T
SMP/E Install
End User
P
Browser
D
CGI Scripts Post Apply
Script/Job
OCSP OCSP CGI
Requester PKI Exit
z/OS PKI Services RACF Set up
Daemon exec
RACF Glue Rtn
Combined RA/CA
process
PC
SAF R_PKIServ
VSAM
RACF
Services System SSL OCSF Request
Queue
ICSF LDAP
PKI
DL VSAM
TP
z/OS Issued
RACF
LDAP Cert List
DB - New code
SMF Directory
- Updated code
Audit SMF
Records Unload
The user administrative interface requires two instances of the z/OS Web server sharing the
same certificate and private key:
Instance one: Supports HTTP and HTTPS for users and PKI administrator. It is set up to
prompt for SAF user ID and password depending on the requested URL.
Instance two: Supports only HTTPS with client authentication. It is required for
authenticating a client certificate revocation request.
Any request for users and administrators is always directed to instance one of the HTTP
server first and can be redirected automatically to instance two depending on the type of
request.
The PKI Services daemon is a multi-threaded server. It has service threads for incoming
requests and background threads for housekeeping tasks such as the periodic issuance of a
CRL and deletion of inactive requests. It maintains two VSAM data sets, one for storing all
requests it receives (ObjectStore) and the other for keeping a list of issued certificates (ICL).
LDAP Certification
Directory Authority
In a z/OS environment, you will most likely run the PKI Web servers that are already available
in your production LPAR. Because this LPAR can already host existing Web servers on port
80 and 443, we recommend that you set up TCP/IP environment additional domain names for
PKI Services. This setup enables the use of a hidden proxy server configuration on the
default ports to forward to the appropriate servers.
The prerequisite products for PKI Services are z/OS HTTP Server or Web server, Lightweight
Directory Access Protocol (LDAP) server, Open Cryptographic Services Facility (OCSF), and
Open Cryptographic Enhanced Plug-ins (OCEP).
Note: You might want to convert from an existing profile * to profile ** to prevent the output
of RLIST PROGRAM * ALL from displaying all profiles that are created in class PROGRAM
and displaying only the content of profile ** instead. However, be careful. You have to
ADDMEM to profile ** all already-ADDMEMed libraries to profile * (if additional to the ones
above) before issuing RDEL PROGRAM * and SETR WHEN(PROGRAM) REFRESH.
You also might ADDMEM the following libraries to profile ** in PROGRAM, replacing the italic
text (hlq) with HLQs that are used at your site, most likely SYS1:
If using the Resource Measurement Facility (RMF), hlq.SERBLINK
If using DB2, hlq.SDSNLOAD and hlq.SDSNEXIT
If using MQSeries®, hlq.SESQLINK
If using Run-Time Library Services (RTLS), hlq.SCEERTLS
If you are obtaining an IEATDUMP by setting the SysDumpName directive and setting the
Recovery directive to Msg/Dump, Normal, or Full, hlq.MIGLIB
Place on the access list only daemons that are allowed to change their identity:
PE BPX.DAEMON CL(FACILITY) ID(daemon1 daemon2) ACC(READ)
Note: Replace daemon1, daemon2, and so forth with RACF user IDs for your respective
daemons.
The command to create a profile to set the scope of z/OS resources that the server can
access when acting as a surrogate for its clients is:
RDEF FACILITY BPX.SERVER UACC(NONE) OWNER(SECADM)
Then place on the access list only daemons that might act as surrogates:
PE BPX.SERVER CL(FACILITY) ID(daemon1 etc) ACC(READ)
PE BPX.SERVER CL(FACILITY) ID(daemon2 etc) ACC(UPDATE)
Note: To define your Web server user ID with a non-zero UID and according to your
naming standard for STUs, give this user ID appropriate permissions to directories and
files:
SETFACL -m u:WEBSTU:r-x /usr/lpp/internet/sbin/httpd_V5R3M0
SETFACL -m u:WEBSTU:r-x /web/pki1/httpd.conf
SETFACL -m u:WEBSTU:rwx /web/pki1/logs
SETFACL -m d:u:WEBSTU:rwx /web/pki1/logs
SETFACL -m f:u:WEBSTU:rwx /web/pki1/logs
SETFACL -m u:WEBSTU:rw- /web/pki1/httpd-pid
The Web server’s non-zero user ID must be given read/execute access to the security
DLLs, read/write access to the key database file, and read access to the stash file.
All of these resources probably have the same access list, so only one profile can be defined
as follows:
RDEF FACILITY CDS.** UACC(NONE) OWNER(SECADM)
If you have not activated CSFKEYS and CSFSERV, issue the commands:
SETR CLASSACT(CSFKEYS CSFSERV)
SETR RACLIST(CSFKEYS CSFSERV)
SETR RACLIST(CSFKEYS CSFSERV) REFR
Rexx/Saf Interface
SAF Service
RACF Service
RACDCERT components
RACF
SMF DB
SMF
Unload
Client's certificate
Audit Records generated and registered
in the RACF DB
All RACF user IDs and groups used in PKI Services must have OMVS segments. The
command to add a specific job role group for PKI administrators is:
AG PKIADM SUPGROUP(JOBROLE) OMVS(AUTOGID)
CO (userid1 userid2 etc) GROUP(PKIADM)
If you need to assign an OMVS segment to your existing RACF admin group, issue the
following command:
ALG SECADM GID(AUTOGID)
The ASSIZE and THREADS values are recommended, but you have to increase them if they
are not enough for your workload. The full list of keywords specifying various limits in the
OMVS segment is:
ASSIZEMAX Maximum address space size
CPUTIMEMAX Maximum CPU time
FILEPROCMAX Maximum number of files per process
MMAPAREAMAX Maximum memory map size
PROCUSERMAX Maximum number of processes per UID
THREADSMAX Maximum number of threads per process
After you have set individual user limits for users who require higher resource limits, consider
removing their superuser authority. You should also reevaluate your installation’s BPXPRMxx
limits and consider reducing them.
Surrogate user ID
A surrogate user ID is the identity assigned to client processes when they request PKI
Services. A surrogate user ID is required for external clients. For simplicity, we recommend
using surrogate user IDs for internal clients as well, rather than allowing them to access PKI
Services under their own identities. Our chosen name for surrogate user ID is PKISRV, and the
command to create it is:
AU PKISRV NAME ('PKI SRVS SURROG') DFLTGRP(MISC) OWNER(MISC) +
OMVS(AUTOUID HOME('/') PROG('/bin/sh') ASSIZE(256000000) +
THREADS(512)) NOPASSWORD RESTRICTED
We recommend that this user ID be RESTRICTED with the consequences that the user must
be explicitly permitted with READ to several resources having UACC(READ) or ID(*) with
access READ. The most obvious are:
Profile ** in class PROGRAM
A few profiles starting with IRR.DIGTCERT in class FACILITY
Profile ** in class APPL
(If it has UACC(READ), this equivalent to not having this profile at all).
Usually the MVSMNT group is required to create data sets (VSAM in the case of PKI
Services). Do not forget to place your group with ALTER if you plan to create these data sets
and you do not have OPERATIONS.
To allow your PKI administrators access to PKI data sets, issue this command:
PE ‘PKI.**’ ID(PKIADM) ACC(CONTROL)
Be aware also that the started task user ID for PKI Services (PKISTU) must be able to write
into the PKI data sets:
PE ‘PKI.**’ ID(PKISTU) ACC(CONTROL)
You can use RACF to create, register, store, and administer digital certificates and their
associated private keys, and to build certificate requests that can be sent to a certificate
authority for signing. You can also use RACF to manage key rings of stored digital certificates.
Digital certificates and key rings are managed in RACF primarily by using the RACDCERT
command.
Your organization might already have rules for creating certificates. If not, such rules should
be discussed and established.
RACDCERT is used to store and maintain digital certificates in RACF and should be used for
all maintenance of the DIGTCERT class profiles and related USER profile fields. However,
USER-related record type 0207 (User Certificate Name Record) provides user ID, certificate
name, and certificate label.
The RACDCERT command is your primary administrative tool for managing digital
certificates using RACF. Granular authorities for use of the RACDCERT command by users
Note: Profiles in the DIGTCERT, DIGTRING, and DIGTNMAP classes are maintained
automatically through RACDCERT command processing. You cannot administer profiles in
these classes using the RDEFINE, RALTER, and RDELETE commands. These
commands do not operate with profiles in the DIGTCERT, DIGTRING, and DIGTNMAP
classes.
Note: Be careful when you issue this command because the password is unencrypted, so
you have to remember or find a secure place to store the password for future use. If the
password is lost, this backup becomes useless. Also the password value is case-sensitive.
In this command:
ADDRING(‘ring name’): Creates a key ring. Only users can have a key ring. Key ring
names become names of RACF profiles in the DIGTRING class and can contain only
characters that are allowed in RACF profile names. Although asterisks are allowed in ring
names, a single asterisk (*) is not allowed. For a CA certificate, the user who owns the ring
is the PKI daemon. Lowercase characters are permitted. A key ring name can be up to
237 characters in length. Because only user IDs can have key rings, neither CERTAUTH
nor SITE can be specified with ADDRING.
After creating the key ring, add the certificate to the key ring, as shown in Example 3-3.
ID(userid): Indicates that the certificate added to the key ring is a user certificate, and
userid is the user ID that is associated with this certificate. If the ID keyword is not
specified, it defaults to the value specified or the default value on the RACDCERT
command.
– CONNECT: Specifies that a digital certificate is being added to a key ring.
Now, connect the CA certificate to the ring that belongs to the Web server:
RACDCERT ID(WEBSTU) CONNECT(CERTAUTH LABEL(‘IBM ITSO PSIE PKI1’) +
RING(SSLRING))
Note: In this example, we did not specify USAGE because the default value of USAGE is
the same as in the added certificate; That is, we preserved USAGE(CERTAUTH). We also
omitted DEFAULT, because we did not want to make the CA certificate be the DEFAULT in
this key ring.
Next, connect the Web server certificate to the Web server ring with this command:
RACDCERT ID(WEBSTU) CONNECT(ID(WEBSTU) LABEL(‘SSL PKI1’) + RING(SSLRING)
USAGE(PERSONAL) DEFAULT)
Note: You must use the keyword CERTAUTH when listing a CA certificate. The value of
LABEL is case sensitive, so type IBM and not ibm. Also, CERTAUTH can be placed after
list(label( ’ ‘)).
Note: You must use the keyword ID( ) when listing a user certificate. Also, ID( ) can be
placed after list(label( ’ ‘)). Remember that the value of LABEL is case sensitive.
Note: The only difference between the profile for our Web server certificate and the profile
for our CA certificate is the serial number. The APPLDATA field contains the user ID
associated with certificate: the Web server started task user ID: WEBSTU.
Note: You must always use the keyword ID( ) to list any key ring. Also, ID( ) can be placed
after LISTRING( ). Again, the key ring name is case sensitive.
Daemon and server control for PKI user ID and surrogate user ID
We permit PKISTU read access to BPX.DAEMON and BPX.SERVER in the RACF class
FACILITY, and PKISRV read access to BPX.SERVER in the RACF class FACILITY:
PE BPX.DAEMON CL(FACILITY) ID(PKISTU) ACC(R)
PE BPX.SERVER CL(FACILITY) ID(PKISTU) ACC(R)
PE BPX.SERVER CL(FACILITY) ID(PKISRV) ACC(R)
Note: User IDs having SPECIAL can issue the RACDCERT command with all keywords
and parameters.
This command covers more than one PKI server (for example, if you want a few members in
SYS1.PROCLIB named PKISRV1, PKISRV2, and so on). However, you can run only one PKI
server per LPAR at a time.
ICSF
With this command, we assume that ICSF is active. To store a certificate into ICSF, use:
RACDCERT CERTAUTH ADD('PKI.CAPKI1.BACKUP.P12BIN') +
PASSWORD('xxxxxxx') ICSF
In this command:
ADD(data-set-name): Specifies that a digital certificate is to be defined. The specified
data set must contain the digital certificate. The data set containing the digital certificate or
certificate package must be cataloged and cannot be a PDS or a PDS member. The
RECFM expected by RACDCERT is VB. When the ADD keyword is specified, RACDCERT
allocates and opens the specified data set dynamically and reads the certificate from it as
binary data.
PASSWORD(‘pkcs12-password’): Specifies the password that is associated with the
PKCS#12 certificate package. This keyword is required if the data set is PKCS#12, and it
must not be specified if the data set is not PKCS#12. The ‘pkcs12-password’ can be up to
255 characters in length, is case sensitive, and can contain blanks.
Note: The specified password is visible. So, take care to prevent it from being viewed when
entered. Because PKCS#12 passwords do not follow the normal TSO/E rules for password
content, they cannot be suppressed as they normally would be.
ICSF specifies that RACF attempts to store the private key that is associated with this
certificate in the ICSF PKDS. This attempt applies when the key is introduced to RACF by
issuing the ADD keyword for PKCS#12 certificate packages and when an existing certificate
profile containing a non-ICSF private key is replaced by issuing the ADD keyword.
If the GENCERT keyword creates a public/private key pair and if ICSF is used to store private
keys, then GENCERT creates an ICSF key label in the format
IRR.DIGTCERT.userid.CVTSNAME.ebcdic-stck-value, where userid is the owning user ID,
CVTSNAME is the system name as taken from the CVT, and ebcdic-stck-value is an EBCDIC
version of the current store clock value. If the key is associated with a CA certificate, then user
ID is set to CERTIFAUTH. If the key is associated with a site certificate, then user ID is set to
SITECERTIF.
We assume that all members of your PKIADM group have SYSTEM SPECIAL. If this is not
the case, then members without SYSTEM SPECIAL must have UPDATE to profile
IRR.RPKISERV.PKIADMIN.
For any user ID having certificates registered in RACF, use the following command:
RACDCERT ID(userid) LIST
Note: Help desk can use RACDCERT ID(userid) LISTRING(*) to find all rings that are
associated with a user ID, but a similar command, RACDCERT LIST(*), fails with the
following message:
IKJ56712I INVALID KEYWORD, *
IKJ56703A REENTER THIS OPERAND - .
To enable the Web server to accept logons from clients who have been issued PKI Services
certificates with HostIdMapping extensions, you must create profiles in the RACF class
SERVAUTH.
Note: Ensure that your CA certificate is altered to HIGHTRUST if it was not HIGHTRUST
when you created it.
Define a profile in class SERVAUTH for each server (host) name that you want your Web
server to honor when accepting logons for certificates containing HostIdMapping extensions.
The profile has the format IRR.HOST.hostname where the value of hostname usually is a
domain name, such as wtsc63oe.itso.ibm.com. This domain name must be entered in the
entry for HostIdMap in /web/pki1/pkiserv/pkiserv.tmpl but without the subject ID portion in the
APPL section.
RDEF SERVAUTH IRR.HOST.WTSC63OE.ITSO.IBM.COM UACC(NONE)
Permit your Web server started task user ID with READ with the following command:
PE IRR.HOST.WTSC63OE.ITSO.IBM.COM CL(SERVAUTH) ID(WEBSTU) ACC(R)
Now activate and raclist class SERVAUTH using the following commands:
SETR CLASSACT(SERVAUTH)
SETR RACLIST(SERVAUTH)
SETR RACLIST(SETRAUTH) REFR
Note: On a z/OS system, a HostIdMapping is not honored if the target user ID was created
after the start of the validity period for the certificate containing the HostIdMappings
extension. Therefore, if you are creating user IDs specifically for certificates with
HostIdMappings extensions, ensure that you create the user IDs before the certificate
requests are submitted.
Display CA certificate
You can display the CA certificate by using two RACF commands. The first is:
RACDCERT CHECKCERT(‘PKI.CAPKI1.DERBIN’)
In this command, PKI.CAPKI1.DERBIN is the data set to which we saved the CA certificate in
DER format.
The second RACF command to display the CA certificate uses the LIST keyword of
RACDCERT:
RACDCERT CERTAUTH LIST(LABEL(‘ITSO IBM PSIE PKI1’))
The ring information must have USAGE = PERSONAL and DEFAULT = YES.
To display all certificate requests received by PKI Services after issuing OMVS:
cd /usr/lpp/pkiswerv/lib
/usr/lpp/pkiserv/bin/vosview/ \’pki.webpki1.ost\’
Note: Records starting with Object key=1 and Object key =2 contain only system
data.Records starting with Object key=108 is a request sent by user ta for a 1-Year PKI
SSL Browser certificate. (The type of certificate is represented by appldata =1YBSSL).
Perform the following steps to establish PKI Services as an intermediate certificate authority:
1. Determine which certificate authority will be acting as a higher authority for your PKI
Services, which can be a public CA such as VeriSign.
2. Create a new certificate request from your self-signed CA certificate by entering the
following RACF command:
RACDCERT CERTAUTH GENREQ(LABEL(‘IBM ITSO PSIE PKI1’)) +
DSN(‘PKI.CAPKI1.BACKUP.P12BIN’)
3. Send the certificate request to the higher certificate authority, following its required
procedures.
4. After the certificate has been issued, receive the certificate back into the certificate data
set (PKI.CAPKI1.BACKUP.P12BIN).
Note: The procedure for receiving the certificate back into the certificate data set can
vary greatly depending on how the higher certificate authority delivers the new
certificate: If the certificate is delivered as base64 encoded text, the easiest way to
deposit the certificate into the data set is to copy and paste the certificate into the empty
data set. If the certificate is delivered as binary data (also called DER-encoded), the
easiest way to deposit the certificate into the data set is to use binary FTP.
5. Receive the certificate back into the RACF database by entering the following RACF
command:
RACDCERT CERTAUTH ADD(‘PKI.CAPKI1.BACKUP.P12BIN’)
6. Export the certificate in DER format to the export data set by entering the following RACF
command:
RACDCERT CERTAUTH EXPORT(LABEL(‘IBM ITSO PSIE PKI1‘))
DSN(‘PKI.CAPKI1.DERBIN’) FORMAT(CERTDER)
7. To make your new certificate available to your clients, set up the /var/pkiserv/ directory by
performing step 2 through step 4 in “Steps for setting up the /var/pkiserv directory” from
z/OS Security Server PKI Services Guide and Reference, SA22-7693.
Note: You will receive MVS console message IKYP026E as the expiration date
approaches.
Applications can request user functions or administrative functions related to these requests.
See z/OS Security Server RACF Callable Services, SA22-7691, for details of invoking
IRRSPX00. Authorize these applications by administering RACF profiles in the FACILITY
class, based on whether the application requests user functions or administrative functions.
For user functions, FACILITY class profiles protect this interface. The form of the FACILITY
class profiles is:
IRR.RPKISERV.function
Here, function is one of the following user function names in the preceding list. The user ID for
the application (userid from the ACEE associated with the address space) is used to
determine access:
NONE: Access is denied.
READ: Access is permitted based on subsequent access checks against the caller’s user
ID. To determine the caller, the current TCB is checked for an ACEE. If one is found, the
authority of that user is checked. If there is no ACEE associated with the current TCB, the
ACEE associated with the address space is used to locate the user ID.
UPDATE: Access is permitted based on subsequent access checks against the
applicant’s user ID.
CONTROL (or user ID is RACF SPECIAL): Access is permitted, and no subsequent
access checks are made.
For SAF GENCERT and EXPORT requests where the application has READ and UPDATE
access, subsequent access checks are performed against the IRR.DIGTCERT.function
FACILITY profiles. These are identical to the checks the RACDCERT TSO command makes.
See z/OS Security Server RACF Command Language Reference, SA22-7867, for more
information.
To determine the appropriate access level of the caller, the current TCB is checked for an
ACEE. If one is found, the authority of that user is checked. If there is no ACEE associated
with the current TCB, the ACEE associated with the address space is used to locate the user
ID.
Recommendation: Give UPDATE authority only to those individuals whom you would trust
with the RACF SPECIAL attribute. If you do assign PKI Services administrators who do not
have the RACF SPECIAL attribute, do not also give these individuals direct access to the
user functions of the R_PKIServ callable service as described in “R_PKIServ user
functions” on page 156.
Using LDAPBIND is more flexible because it enables the creation of as many profiles for
LDAP servers to which you need to authenticate. (Using FACILITY provides only one LDAP
server.)
This application enables you to register a Personal Certificate with RACF, which means that
you associate the certificate with your RACF user ID.
You can also deregister a previously registered Personal Certificate. When you do this, the
information about your certificate is removed from RACF.
To install this application into your two Web servers’ httpd.conf file:
1. Add into /web/pki1/pub/index.html and /web/pki1a/index.html reference to the application:
This is the <a href="selfreg.html"> RACF Selfreg Appl</a>
2. Create two new directories in /web/pki1 and /web/pki1a (ocgi and rar):
mkdir /web/pki1/ocgi and mkdir /web/pki1a/ocgi
mkdir /webpki1/rar and mkdir /web/pki1a/rar
3. Copy the three HTML pages from SYS1.SAMPLIB(RACFINSTL) - selfreg.html,
selfrgft.html, and selfrghd - as files of directory rar. Copy selfreg.rexx into directory ocgi.
4. Add the following into the /web/pki1/httpd.conf file:
Redirect /PKIServ/clientauth-cgi/* https://wtsc64oe.itso.ibm.com:8013/ +
PKIServ/clientauth-cgi/*
5. Add the following into the /web/pki1a/httpd.conf file:
Exec /ocgi/* /web/pki1a/ocgi/*
Pass /rar/* /web/pki1a/rar/*
Now start your browser and find your Web server address by typing:
http://wtsc64oe.itso.ibm.com:8010
The application requests a valid certificate to use it. Click the RACF Selfreg Appl.
When you click the Verify Personal Certificate button, you are presented with a list of the
personal certificates installed into your browser. After you have made a selection, you will be
prompted for your RACF user ID and password and after entering them, a confirmation panel
shows information from the certificate you selected and your RACF user ID.
If the data is correct, click Register Personal Certificate to associate your user ID with your
certificate. If you want to delete a previously registered certificate from RACF, go back, select
the certificate from the list kept in your browser, and click Deregister Personal Certificate.
Now you might want to use RACDCERT LIST to see your new certificate in RACF. It displays
last in the list of your certificates.
Figure 3-19 Prepare and configure the UNIX System Services environment
As you prepare the environment, decide where to place your configuration files for the
location of additional run-time and configuration file directories for backup or failover reasons.
IBM z/OS Security Server PKI Services Guide and Reference, SA22-7693 defines the
following default locations for directories:
PKI Services installation directory /usr/lpp/pkiserv
PKI Services run-time directory /etc/pkiserv
In our setup, we used the corresponding Web server run-time directory /web/server1 to
host the PKI server configuration and run-time files.
PKI Services variable directory /var/pkiserv
This is the place where you store your CA certificate for public download.
Note: In a single z/OS environment there can only be one active PKI server.
We used the following names for our Web server run-time library in HFS:
/web/pki1
/web/pki1a
The second Web server is running SSL mode only (normalmode off) on a special port (port
1443) and is used for client authentication. It is set up to authenticate client certificates by
using an X500 server (LDAP server). This Web server is used for renew and revoke certificate
actions.
There are several ways to generate these certificates. On z/OS you could use either the
gskkyman utility or RACF services. In the next sections, we describe the RACF services
method of generating a self-signed certificate.
In IBM z/OS Security Server PKI Services Guide and Reference, SA22-7693, the RACF key
ring is named SSLring. We suggest giving this a more specific name, because there can be
more key rings for different purposes. We named our key ring webpki2, which is similar to the
Web server that we used to run the PKI Services.
To finalize your secure Web server setup, you must customize the Web server configuration
file /web/pki2/httpd.conf with the configuration directives shown in Example 3-6.
When you have made the changes to the httpd.conf file, restart the Web server to pick up the
changes. Then, you can test the secure Web server from a browser as follows:
If you used the default SSL port 443:
https://<web-server-domain-name>
If you are using a port number other than the default
https://<web-server-domain-name>:<SSL port number>
Set up the second Web server serving SSL only on port 1443 (or a different port such as
8443). In this case, the definitions in Example 3-7 must be customized in
/web/pki2/httpd.conf.
We suggest that you split the file in several pieces and attach them in certain locations to your
existing httpd.conf.
For performance reasons, we changed the location of the redirect statements in httpd.conf so
that they appear before the protection statements. The following sequence illustrates how to
update your httpd.conf:
1. Search for the following lines in httpd.conf:
# =================================================================== #
#
# User authentication and document protection
#
# ================================================================== #
2. Scroll a little farther, then add the Protection statements just as shown here:
# The following rules allow anyone who knows your WEBADM
# password to use the Web Server remote configuration application.
#
Protection IMW_Admin {
ServerId IMWEBSRV_Administration
AuthType Basic
PasswdFile %%SAF%%
Mask WEBADM,webadm
}
Protect /admin-bin/* IMW_Admin WEBADM
Protect /Docs/admin-bin/* IMW_Admin WEBADM
Protect /reports/* IMW_Admin WEBADM
Protect /Usage* IMW_Admin WEBADM
3. Add the statements to your httpd.conf as shown in Example 3-8.
All the customization parameters for PKI Services are defined in a sample httpd.conf that
resides in /usr/lpp/pkiserv/samples.
We suggest that you to split the file into several pieces and add them in certain locations to
your existing httpd.conf.
The following text illustrates how to update your httpd.conf. To update httpd.conf:
1. Search for the following lines in httpd.conf:
# =================================================================== #
#
# User authentication and document protection
#
# =================================================================== #
Set up the httpd.envvars exactly as described in “Customizing the first Web server for PKI” on
page 164, but set the _PKISERV_CONFIG_PATH= variable to point to the second Web
server run-time /web/pki2.
For the PKI Services LDAP environment, you might set up a special LDAP database in the
TDBM back-end store. We called ours LDAPPKI.
Other information needed from the LDAP environment for PKI Services is:
LDAP domain name and port number:
wtsc63.itso.ibm.com:3389
An admin user ID and password:
ADMINDN='cn=Admin'
ADMINPW='secret'
Instead of setting up domain name, user ID, and port, as hard coded and in unencrypted text
as described here, you might choose to use a RACF definition instead.
The setup for the LDAP server follows the basic installation procedures for the TDBM as
described in z/OS Security Server LDAP Server Administration and Use, SC24-5923. Your
environment influences the way you set up your LDAP server, so we offer the base
requirements for the installation of the PKI LDAP server.
This section describes the DB2 and TCP/IP interfaces with the LDAP server. For a complete
explanation of these files and the use of ldapcnf, read z/OS Security Server LDAP Server
Administration and Use, SC24-5923. In the ldap.profile file, the important parameters that
must be set and matched with the PKI templates and your system environment are:
TDBM_SUFFIX, which is the suffix that is created within the LDAP configuration file. It
should match the suffix with the PKI templates.
LDAPUSRID and LDAPUSRGRP, which are the LDAP server’s RACF user ID and group.
These should match what was defined previously.
ADMINDN and ADMINPW, which are the LDAP server’s administrator. This must match
what is in the PKI templates unless you are going to access controls within LDAP. The
ADMINPW is used for the initial installation of the LDAP server and will be changed when
the LDAP administrator is defined within the LDAP directory. Either the changed password
must match what is coded into the PKI templates, or you could use a RACF user ID if the
SDBM is set up, or you could use the new LDAPBIND features.
The remainder of the parameters are HLQ for system data sets, locations of required
information for the ldapcnf utility, and so on. All of these must match what is in your
system environment for the ldapcnf utility to work correctly.
One last important parameter is the location of the output from the ldapcnf utility. The
output is placed in the data set indicated by the OUTPUT_DATASET parameter.
In our case, the important part of the ldap.profile file appeared as shown in Example 3-13.
Within the ldap.slapd.profile file, the following parameters must be set appropriately:
LDAP_HOSTNAME, which is the IP address of your LDAP server.
PORT, which is the unsecure port on which the LDAP server is listening.
In our case, the important part of the ldap.slapd.profile appeared as in Example 3-14.
Nothing within the ldap.db2.profile is required to match the PKI environment, but the LDAP
server and DB2 must communicate correctly for the LDAP server to be useful. If you are not
responsible for DB2 at your installation or if you do not have DBA authority, then the easiest
way to handle the ldap.db2.profile is to set the following parameters and run the rest with the
defaults:
TDBM_DB2_LOCATION, which is the DDF location name. Run with the default of LOC1.
TDBM_DB2_USERID, which is the HLQ of your DB2 tables. Set this the same as your
LDAP server RACF user ID.
TDBM_DB2_DBNAME, which is the name of your DB2 database. Set this to the
appropriate value for your installation or something that is meaningful, such as PKILDAP.
Then, run the ldapcnf utility using the command from your work directory to create several
members in the output data set that you specified in the ldap.profile file:
/usr/lpp/ldap/sbin/ldapcnf -i ldap.profile
The only authority that is required within the DB2 environment is that the LDAP server’s
RACF user ID must have DBADM authority to the newly created database, EXECUTE
authority on the CLI plan, and SELECT authority on SYSIBM.SYSCOLUMNS.
If you are the DBA for your installation, then review the DBSPUFI member of the output data
set. Ensure that the buffer pool and storegroup are set the way that you want them. Also,
review the sizes of the table spaces for your environment.
Finally, check the DSNAOINI file. It is critical that the DB1 subsystem name, location name,
and CLI plan name are correct. Also indicate whether you are using CAF or RRSAF in DB2.
The other item to check here is the configuration and the environment variables files. The
environment variables file (envvars) are in the SLAPDENV member of the output data set.
There is nothing to change here at this time, but as you install OCSF and ICSF you might add
a LIBPATH parameter in this file. The other way to tell the LDAP server where these
executables are is using the PARM parameter within the PROC.
The LDAP configuration file is in the SLAPDCNF member of the output data set. The
important global parameters are:
LISTEN, which defines the IP address and port of the LDAP server.
ADMINDN, which defines the LDAP server’s administrator. On the initial installation of the
LDAP server, you also have to set up the adminPW parameter, which is the LDAP server’s
administrator’s password. This password is only needed for the administrator as defined
within the LDAP directory.
As you watch the LDAP server come up, you should see the following message in either the
SYSLOG or the JES messages for the PROC:
GLD0122I Slapd is ready for requests.
Ensure that there were now DB2 error messages in the JES messages within the PROC.
Then go into OMVS and change directories to your work directory. Now issue the following
command:
ldapsearch -h wtsc63.itso.ibm.com -p 3389 -V 3 -b ““ -s base -L
“objectclass=*”
If your LDAP server is set up and communicating correctly, then the output looks similar to
that shown Example 3-18.
At this point the schema must be loaded into the LDAP directory. First, copy schema.user.ldif
and schema.IBM.ldif from the /usr/lpp/ldap/etc directory into your working directory. You really
only need the schema.user.ldif file to support the PKI environment, but in case you ever want
to use this LDAP server for anything else that requires a more extensive schema, you could
include both files. Edit each one of these files, changing <suffix> at the front of these files to
match the suffix in your configuration file. In our case, we issued this command while we were
editing the files:
c ‘<suffix>’ ‘c=US’
The top non-comment line in both files should be ‘cn=schema, c=US’. Save the files, then
from your working directory, issue the following commands (where cn=admin and secret match
up with your configuration file and /u/jjones/ldapprod is your working directory):
ldapmodify -h wtsc63.itso.ibm.com -p 3389 -D cn=admin -w secret \
-f /u/jjones/ldapprod/schema.user.ldif
ldapmodify -h wtsc63.itso.ibm.com -p 3389 -D cn=admin -w secret \
-f /u/jjoones/ldapprod/schema.IBM.ldif
The output from these commands is only one line, indicating that the LDAP server is being
modified. Any other message means that there is some sort of problem and it should be fixed.
You can view the schema that you have just loaded by issuing the following command:
ldapsearch -h wtsc63.itso.ibm.com -p 3389 -s base -b “cn=schema,c=US” \
“objectclass=subschema”
This defines the suffix and the LDAP administrator, with its password, in the LDAP directory.
When you issue the command to add this data to the LDAP server you will get messages,
This command produces output that looks similar to that shown in Example 3-20.
Now we are ready to make the LDAP server production-ready. First, in SDSF, stop the LDAP
server with the /p ldapcrl command. When the LDAP server is stopped, edit the SLAPDCNF
member of your output data set to remove the adminPW parameter, and adjust the adminDN to
add the suffix to the DN. Now your SLAPDCNF member should look similar to Example 3-21.
After you restart the LDAP server, it has the basic requirements to work with PKI Services.
To create these data sets, use the IKYCVSAM sample job in SYS1.SAMPLIB.
We changed the default VSAM data set names to fit our site standards. For this test, we
decided to prefix the data sets with PKI, using WEBPKI2 as the second qualifier.
After these data sets are created, set up the PKISRV2 started task.
We recommend that you copy PKISRVD to a started task procedure name that fits your
environment. In our case, we copied it to PKISRV1, PKISRV2.
Edit the appropriate PKISRVD procedure to configure the data set names such as those
shown in Figure 3-22.
PC
SAF R_PKIServ
VSAM
RACF
Services OCSF Request
HW- LDAP Queue
CSP TP VSAM
OCEP CSP DL
DL
Issued
z/OS Cert List
RACF LDAP
DB Directory
SMF
SMF
Unload
Audit
Records
Figure 3-23 Configure OCSF and OCEP to work with PKI Services
In this section, we assume that you have set up OCSF. So, ensure that the files in /var/ocsf
exist.
To run PKI Services with OCSF, you must set up the PKI Services Trust Policy (PKITP)
plug-in for OCSF. The PKITP performs certificate validation.
There are two shell scripts in /usr/lpp/pkiserv/bin that perform the installation and verification
of the PKITP setup. To install PKITP:
1. Run the PKITP installation routine:
su
cd /usr/lpp/pkiserv/lib
/usr/lpp/pkiserv/bin/install_pkitp
2. It returns some questions:
addin directory?
/usr/lpp/pkiserv/lib
addin filename?
pkitp.so
action? “install|uninstall¨
install
Copy some of the sample files that are provided with PKI Services from the installation
directory /usr/lpp/pkiserv/samples to the run-time directory. We set this directory to be the
same as the Web server Cryptographic Coprocessor /web/pki2.
Be careful because the samples directory contains some files that will overwrite your Web
server configuration files if you copied all files. Therefore, we suggest:
1. In the UNIX shell, ensure that you have superuser authority (or at least authority to
rename and move files).
2. Copy all of the necessary files to your Cryptographic Coprocessor:
cd /usr/lpp/pkiserv/samples
cp pkis*.* /web/server1
The httpd configuration files are unnecessary because the Web servers are already
configured.
You copy the forms files later when needed.
Note: The PKI environment variables file is called pki.envars instead of httpd.envvars,
which is the environment variables file for the Web server.
The variable _PKISERV_MSG_LEVEL defines the debug level for PKI Services. We
recommend using debug level D for all components when you install PKI Services for the first
time. The default level for all components is W.
You might change these values while the PKI server is running by using a modify command to
the PKI server.
The first directives to look at in the pkiserv.conf file are the VSAM file names that were
prepared in “Setting up the PKI Services task” on page 176 for the OST and the ICL. The
In the [SAF] section of pkiserv.conf, define the right key ring to be used. This certificate had
been added to the key ring by the RACF setup using the RACDCERT ADDRING(CARING)
ID(PKISTU) command. In our example, we used the label ITSOCASC63 for our CA certificate:
RACDCERT ADDRING(ITSOCASC63) ID(PKISTU)
Now this information must be defined in pkiserv.conf:
[SAF]
#KeyRing=PKISRVD/CAring
KeyRing=PKISTU/ITSOCASC63
In the [LDAP] section, define the LDAP server information such as server-domain-name, port
name, admin user ID, and password. Ensure that this is consistent with the LDAP definition in
“Customizing the second Web server for PKI” on page 166.
[LDAP]
NumServers=1
PostInterval=5m
# Server1=myldapserver.mycompany.com:389
Server1=wtsc63.itso.ibm.com:3389 <- domain name and port of LDAP
AuthName1=CN=admin <- Authentification name
AuthPwd1=secret <- Password
CreateOUValue= Created by PKI Services
RetryMissingSuffix=T
# Name of the LDAPBIND Class profile containing the bind information for
LDAP server 1. This key is optional. Used in place of keys Server1,
AuthName1. and AuthPwd1
#BindProfile1=LOCALPKI.BINDINFO.LDAP1
For a more secure environment, we recommend using the LDAPBIND class instead of having
user IDs and passwords floating around unencrypted. Another parameter you might change
in this section is the number of LDAP servers, NumServers=1. For availability reasons, you
should refer to at least two LDAP servers.
If you want to post the information to LDAP in a time frame other than every five minutes, then
change PostInterval=5m to another value, such as PostInterval=3m (3 minutes).
PKI Services can create certificates through different ways. One way is purely through RACF
and is called a SAF certificate. It is approved automatically after host user ID and password
verification. This is the historic way versus the PKI certificates that can be issued and
administered now using PKI Services.
There is no country definition for PKI certificates in the sample template file. We recommend
that you one and using this country (C=US) as the tree entry point in LDAP.
Note: Be aware that changes in these fields change the content of your certificates. This is
also sensitive to LDAP.
Other customizations in pkiserv.temp can be done to add fields or to change the look.
PKI exit
The PKI exit provides advanced customization for additional authorization checking,
validating, and changing parameters on calls to the R_PKIServ callable service (IRRSPX00),
as well as capturing certificates for further processing.
You can call this exit from the PKIServ CGIs and use its IRRSPX00 user preprocessing and
post-processing functions, except the VERIFY function.
You can write your own exit to further customize your PKI Services as you see fit. For
example, you may imbed SQL statements in your C code to do additional checking when
users request certificates. This checking can be based on comparison between user-supplied
Note: If you omit this step, the following messages display in the syslog when you
restart the PKI Services to use the exit:
BPXP015I HFS PROGRAM /web/pki1/pkiexit IS NOT MARKED PROGRAM CONTROLLED.
BPXP014I ENVIRONMENT MUST BE CONTROLLED FOR SERVER (BPX.SERVER) PROCESSING.
6. Edit both Web servers’ environment variables files by issuing the following commands:
oedit /web/pki1/htppd.envvars
oedit /web/pki1a/httpd.envvars
At the end of both files, add:
_PKISERV_EXIT=/web/pki1/pkiexit
Additionally, this scenario provides a customized TITLE value for the subject’s distinguished
name based on the user’s role in the organization. Permission and the user’s role in the
organization are indicated by the user’s level of access to profiles PROJ.MEMBER and
PROJ.PARTNER in RACF class FACILITY. The access values are shown in Table 3-3.
NONE No access for either resource. The user is not permitted to request
this type of certificate. The certificate request is denied.
READ to PROJ.MEMBER The user is a team member and is permitted to request the
certificate. TITLE value is set to Team Member. Certificate requests
for team members are automatically approved. (No administrator
approval is required.)
UPDATE to PROJ.MEMBER The user is the team’s leader and is permitted to request the
certificate. TITLE value is set to Team Leader. A certificate request
by the team leader is automatically approved. (No administrator
approval is required.)
READ to PROJ.PARTNER The user is considered to be a general partner of the team, not an
active team member. The user is allowed to request certificates, but
the requests require administrator approval before being issued.
TITLE value is set to Team Partner.
UPDATE to PROJ.PARTNER The user is considered to be a trusted partner of the team, not an
active team member. The user is allowed to request certificates, and
unlike requests of the general partner, the certificate requests are
approved automatically. TITLE value is set to Team Trusted Partner.
The preprocessing exit call for the GENCERT and REQCERT functions (subroutine
preProcessGenReqCertExit) handles the previously described logic as follows:
1. The request values are passed into the exit through argv in field-name=fieldvalue pairs,
and the subroutine looks for Template= and Userid= in the input parameters.
2. When the exit code finds a Template= value containing PKI Browser Certificate For
Authenticating To z/OS, the _check_resource_auth_np() system function (refer to 3.8.59
in z/OS C/C++ Run-Time Library Reference, SA22-7821) examines the user ID to
determine the user’s access to the preceding profiles as follows:
– If the user has no access to either of these resources, return code 8 is set, causing the
request to be denied.
– Otherwise, the user’s TITLE is set by imbedding the TITLE=title-value string into the
certificate.
By default, administrator approval is not required for the PKI browser certificate for
authenticating to z/OS. When the user has only READ access to PROJ.PARTNER, the
function must be changed to require administrator approval. This is done by setting return
code 4. For all other accesses, the function does not have to be changed.
In this example, we did not make any changes to the exit code. To test its functionality, we
created the profiles in class FACILITY:
RDEF FACILITY PROJ.MEMBER OWNER(PKIADM)
RDEF FACILITY PROJ.PARTNER OWNER(PKIADM)
We started testing with nobody on the access list of the profiles. Then, we permitted user ID
ANTOFF gradually with READ and UPDATE to each of the profiles.
Note: After testing the configuration, you need to stop PKI Services, undo the change
in this step, and then restart PKI Services.
3. Start the PKI Services daemon from the MVS console by entering the following command:
S PKISERVD
Note: You must start the PKI Services daemon only from a started procedure. PKI
Services rejects all other methods of starting the daemon (including INETD, /etc/rc,
UNIX shell, or submitted JCL job).
4. Go to your Web pages by entering the following URL from your browser:
http://webserver-fully-qualified-domain-name/PKIServ/public-cgi/camain.rexx
The webserver-fully-qualified-domain-name is the common name (CN) portion of the
Web server’s distinguished name. You should be able to go through your Web pages to
request, retrieve, and revoke a certificate of type PKI browser certificate for
authenticating to z/OS. Ensure that you can do this before trying to customize the
application.
5. If you elected to test the configuration, you need to stop PKI Services (see “Steps for
stopping the PKI services daemon” next), undo the change in step 2, and then restart PKI
Services.
Chapter 4. Kerberos
This chapter examines the z/OS implementation of Kerberos.
Introduction to Kerberos
Kerberos is a network authentication protocol that was developed in the 1980s by
Massachusetts Institute of Technology (MIT), in cooperation with IBM and Digital Equipment
Corporation. Data Encryption Standard (DES) cryptography and Advanced Encryption
Standard (AES) are used to provide data privacy, especially for the sensitive data such as
password to log into a server.
R_kerbinfo
(AS)
Authenticates
Authentication Users
R_ticketserv Server Grants TGTs
R_usermap Ticket
(TGS)
Granting Generates Session Keys
Server Grants service tickets based on TGT
SKRBKDC
kerberos
enabled ticket from client
application
Hardware
Cryptography
Kerberos terminology
Kerberos terminology includes:
Realm: The Kerberos domain, that is the set of entities which authenticate using that
Kerberos key distribution center (KDC).
Principal: A client or an application server in a Kerberos domain.
Instance: Additional distinction between principals names.
Kerberos name: principal_name.instance@realm
Kerberos ticket: The ticket is encrypted under a key only known to the Kerberos KDC and
the end server. The ticket includes:
– Client’s identity
– A dynamically created session key
– A time stamp
– A lifetime for the ticket
– A service name
A ticket can be reused during its lifetime.
Authenticator: Client’s name and IP address as well as a time stamp. Issued with each
client’s request. The authenticator must be different for each request and is used for replay
protection.
Log Me In
Ticket Granting
Client Server
Application Ticket to server B
Ticket to server B
KDC interacts with both a client and server to accept the client’s request, to authenticate its
identity, and to issue tickets to it.
The domain served by a single KDC is referred to as a realm. A principal identifier is used to
identify each client and server in a realm. The principal name is uniquely assigned for all
clients and servers by the Kerberos administrator. All principals must be known to the KDC.
Kerberos realms can interoperate by establishing trust relationships, sharing secret keys,
between them.
All entities in the network, clients and servers, have their own secret symmetric key. A copy of
all the keys is kept in the Kerberos Key Distribution Center. Clients’ keys are actually derived
from their password.
Kerberos is intended for corporate networks or intranets, because the scalability of the
protocol is directly related to the amount of secret keys that can be managed in a KDC.
Upon receiving the ticket-granting ticket, the client sends a request that contains the
ticket-granting ticket, for a service ticket to the ticket-granting server, and waits for a service
ticket to be returned. Having the session ticket (service ticket) ready, the client is allowed to
communicate with the server that is providing a service he wants to use. Optionally, the
application server can perform further authentication processing against the client.
Message encoding defined in Kerberos Version 5 is described using the Abstract Syntax
Notation 1 (ASN.1) syntax, in accordance with ISO standards 8824 and 8825.
In the remainder of this chapter, we discuss the interactions in more detail. We use the
following notations:
Kx: X’s symmetric encryption key
Kx,y: Encryption key shared by X and Y (for example, a session key)
Kx{data}: A message that contains data encrypted with X’s key
Kerberos Server
Log Me In 2
Authentication
Server Kerberos The user's password does
Database not flow over the network!
Client Authentication
Ticket 3 Ticket Granting
Server
login Authorize Me
to target server
Ticket to server
Ticket to server
Application Application
Client Targer Server
User
1
1. Log in to application username,password
2. Request: Kuser{timestamp},"username","ticket_granting_server"
3. Response: Kuser{Ksession1},TGT
where TGT = KTGS{"username",Ksession1}
Kuser is derived from user's password, which is known from the Kerberos KDC
Ksession1 is created dynamically by Kerberos
KTGS is known only from the Kerberos Server
The authentication service exchange is initiated by a client when it wants to get authentication
credentials for an application server but currently holds no credentials. Two messages are
exchanged between the client and the Kerberos authentication server, then credentials for a
ticket-granting server are given to the client. These credentials are the so-called
ticket-granting ticket, which is used subsequently to obtain credentials for other services.
This exchange is used for other services, such as the password-changing service, as well.
When a user logs into a client system and enters his password, a client sends the Kerberos
authentication server a message that includes a user name in plain text (“Alice”), the current
time encrypted with her secret key, and the identity of the server for which the client is
requesting credentials.
The authentication server then generates a response back to the client, which contains the
ticket-granting ticket and a session key KAlice,KDC, which is used in the subsequent secure
communication between the client and KDC. The ticket-granting ticket includes the session
key KAlice,KDC, the identities of the server and the client, lifetime, and some other information.
The authentication server then encrypts the ticket using its own key KKDC. This produces a
sealed ticket. The session key KAlice,KDC is also encrypted using the client’s key KAlice with
some other information, such as nonce.
The encrypted current time is also known as the authenticator, because the receiver can
assure that the sender knows the correct shared secret KAlice, which is the client’s encryption
key derived from her password (this key is also referred to as Alice’s long-term key), by
decrypting it and validating what is inside. Because the authentication server knows Alice’s
secret key, it can evaluate the time decrypted from the received authenticator.
Tip: You might have noticed that the clocks on the client system and the KDC must be
reasonably synchronized with each other. You can use a network time service to
synchronize the clocks.
Nonce is information used to identify a pair of the Kerberos request and response. You can use
a time stamp or a random number generated by a client.
Tgs is the server’s identification, which is the Kerberos ticket-granting server in this case.
Because KAlice is known exclusively by Alice and the KDC, no one but Alice can extract the
critical information from the response message, such as the session key KAlice,KDC used in
the next phase.
When the client receives the authentication server’s response, it decrypts it using its secret
key KAlice and checks to see if the nonce matches the specific request. If the nonce matches,
the client caches the session key KAlice,KDC for future communications with the ticket-granting
server.
Kerberos Server
Log Me In
Authentication
Server Kerberos
Database
Client Authentication
Ticket
4 Ticket Granting
Server
login Authorize Me
to target server
5
Ticket to server
User
4. Request: Ksession1{timestamp},TGT,"target_server"
5. Response: Ksession1{Ksession2,"target_server"},ticket to server
where ticket to server = Kserver{"username",Ksession2}
When the ticket-granting server receives the message from the client, it first deciphers the
sealed ticket using its encryption key KKDC. From the deciphered ticket, the ticket-granting
server obtains the session-key KAlice,KDC. It uses this session key to decipher the
authenticator.
The validity checks that performed by the ticket-granting server include verifying the following:
The client name and its realm in the ticket match the same fields in the authenticator.
The address from which this message originates is found in the address field in the ticket,
which specifies addresses from which the ticket can be used.
The user-supplied checksum in the authenticator matches the contents of the request.
This procedure guarantees the integrity of the message.
Important: By checking the time stamp in the nanoseconds scale, replay attacks can be
detected.
The ticket-granting server now looks up the server name from the message in the Kerberos
database, and obtains the encryption key KBob for the specified service.
The ticket-granting server forms a new random session key KAlice,Bob for the benefit of the
client (Alice) and the server (Bob), and then creates a new ticket tkt_to_Bob that includes:
The session key KAlice,Bob
Identities of the service and the client
Lifetime
Note: The format of the ticket for a particular service is identical to one of the
ticket-granting tickets.
The ticket-granting server then assembles and sends a message to the client.
Kerberos Server
Log Me In Authentication
Server Kerberos
Database
Client Authentication
Ticket Ticket Granting
Server
login Authorize Me
to target server
Ticket to server
User 7
The client/server authentication exchange is performed by the client and the server to
authenticate each other. The client has been issued credentials for the server using the
authentication service or ticket-granting service exchange before the client/server exchange
is initiated.
After receiving the ticket-granting server exchange response from the ticket-granting server,
the client deciphers it using the ticket-granting server session key KAlice,KDC that is exclusively
known by the client and the ticket-granting server. From this message it extracts a new
session key KAlice,Bob that is shared with the server (Bob) and the client (Alice). The sealed
ticket included in the response from the ticket-granting server cannot be deciphered by the
client, because it is enciphered using the server/s secret key KBob.
Then the client builds an authenticator and seals it using the new session key KAlice,Bob.
Finally, it sends a message containing the sealed ticket and the authenticator to the server
(Bob) to request its service.
When the server (Bob) receives this message, it first deciphers the sealed ticket using its
encryption key KBob, which is kept in secret between Bob and the KDC. It then uses the new
After the server has authenticated a client, an option exists for the client to validate the server
(this procedure is called mutual authentication). This prevents an intruder from impersonating
the server.
If mutual authentication is required by the client, the server has to send a response message
back to the client. The message has to contain the same time stamp value as one in the
client’s request message. This message is enciphered using the session key KAlice,Bob that
was passed from the client to the server.
If the response is returned, the client decrypts it using the session key KAlice,Bob and verifies
that the time stamp value matches one in the authenticator that was sent by the client in the
preceding client/server exchange. If it matches, then the client is assured that the server is
genuine.
When the client/server exchange has completed successfully, an encryption key is shared by
the client and server and can be used for the on-going application protocol to provide data
confidentiality.
z/OS Realm
z/OS
9-MVS userid
DB2
Server
Ticket Granting
Server
DB2
Client 3- I'd rather go to the OS/390 realm
KDC
2- I recognize you, here is a TGT Authentication
Server
login
1- This is me
By establishing inter-realm keys, the administrators of two realms can allow a client
authenticated in one realm to use its credentials in the other realm. The exchange of
inter-realm keys registers the ticket-granting service of each realm as a principal in the other
realm. A client is then able to obtain a ticket-granting ticket for the remote realm’s
ticket-granting service from its local ticket-granting service. Tickets issued to a service in the
remote realm indicate that the client was authenticated from another realm.
Realms are typically organized hierarchically. Each realm shares a key with its parent and a
different key with each child. If an inter-realm key is not directly shared by two realms, the
hierarchical organization allows an authentication path to be easily constructed. If a
hierarchical organization is not used, it might be necessary to consult some database to
construct an authentication path between realms.
Authentication
Server
TCP/IP
Ticket
Granting
Server
R_kerbinfo
(AS)
Authenticates
Authentication Users
R_ticketserv Server Grants TGTs
R_usermap
Ticket
(TGS)
Granting Generates Session Keys
Server Grants service tickets based on
TGT
SKRBKDC
kerberos
enabled ticket from client
application
Hardware
Cryptography
This section details the setup of this UNIX daemon and the required configuration files.
2. Define a group for the started task user ID, with an OMVS segment with a GID value:
ADDGROUP SKRBGRP OWNER(STCGROUP) SUPGROUP(STCGROUP) + DATA(‘GROUP FOR
KERBEROS SKRBKDC User ID’) OMVS(GID(20))
The owner that we specify in our examples is for our installation only. You might want
change this owner according to your installation standards.
To verify the group is indeed defined correctly, display the group with all the attributes as
follows:
LISTGRP SKRBGRP OMVS
3. Define a started task User ID with an OMVS segment with the following values:
– UID value: 0
– HOME (directory) value: /etc/skrb/home/kdc
– PROGRAM value: /bin/sh
Attention: Both the HOME and PROGRAM values are case sensitive. You need to
define them in lower case.
Authentication
Server
TCP/IP
Ticket
Granting
/etc/skrb/krb5.conf
Server
libdefaults¨
default_realm =KRB390.IBM.COM
realms¨
/etc/skrb/home/kdc/skrbkdc.envar KRB390.IBM.COM = {
kdc = wtsc57.krb390.ibm.com:88
kpasswd_server = wtsc57.krb390.ibm.comc:464
SKDC_DATABASE=SAF
SKDC_PORT=88
SKDC_KPASSWD_PORT=464
KERBERW2K.MOPWIN.IBM.COM = {
SKDC_NETWORK_THREADS=15
kdc =kerbsrv.kerberwin2k.mopwin.ibm.com:88
SKDC_LOCAL_THREADS=15
kpasswd_server =
SKDC_LOGIN_AUDIT=FAILURE
kerbsrv.kerberwin2k.mopwin.ibm.com:464
The next step is to configure the environment variable file /etc/skrb/home/kdc/envar with the
required changes for your environment.
The defaults in this file are usually fine, except perhaps the time zone and the required
logging that you want to perform for the Kerberos server (SKRBKDC).
Example 4-3 shows an example of the environment variable definitions for the Kerberos
server.
Message/debug options
_EUV_SVC_MSG_LOGGING=STDOUT_LOGGING
_EUV_SVC_DBG_MSG_LOGGING=1
_EUV_SVC_DBG=KRB_KDC.8,KRB_KDB.8
_EUV_EXC_ABEND_DUMPS=0
This completes the setup for the Kerberos server, but before you start the Kerberos server,
some additional RACF definitions are required.
Authentication
Server
TCP/IP
Ticket
Granting
Server
The /var/skrb/creds directory permission bits should be set to 777 using the chmod command:
chmod 777 /var/skrb/creds
If SAF is selected then RACF provides the functions to customize and access data for use
with Kerberos. Then the z/OS Network Authentication Service server will maintain registry of
principal and global information, which is stored using RACF through User and General
Resource Profiles.
You can administer the Network Authentication Service server through the RACF panels and
commands and obtain this information through an SAF callable service. Kerberos application
servers can use SAF callable services to parse Kerberos tickets to obtain principal names,
and to map from principal to RACF user and vice versa.
Local Kerberos principals are defined as RACF users with a KERB segment. The information
about the local and foreign realms are defined in the RACF class REALM in specific profiles.
The profiles contain:
Local realm information, the name, key, and ticket lifetime (MIN, MAX, and DEFAULT in
seconds).
Foreign realm trust relationships. These are defined in pairs, which also include a key.
RACF maps foreign Kerberos principals using the KERBLINK class profiles.
Principals must keep their secret keys secret. If an intruder steals a principal’s key, it can then
masquerade as that principal or impersonate any server to the legitimate principal.
RACF Remote Sharing Facility (RRSF) has to be defined in local mode in order to generate
the corresponding Kerberos secret key whenever the user changes their password. Kerberos
uses RRSF services to make sure this happens.
Some RRSF RACF functions require a previously established user ID association. A user ID
association is an association between two or more user IDs on the same or different RRSF
nodes. There are two type of user ID associations:
A peer association allows either of the associated user IDs to direct commands to the
other and allows password synchronization.
In a managed association, one of the user IDs is designated as the managing ID, and the
other is designated as the managed ID. The managed ID cannot direct commands to the
managing ID. There is no password synchronization in a managed association.
To use the password synchronization and command direction functions, you need to activate
and define profiles in to the RRSFDATA class.
3. Modify the RACF procedure in SYS1.PROCLIB to process the updated RACF parameter
library by adding PARM=’OPT=01’ to the EXEC statement. Add the RACFPARM ddname to
point to SYS1.PARMLIB to identify the library that contains the RRSF parameters.
Example 4-5 shows the RACF procedure in SYS1.PROCLIB.
3. A user must have access to the SKRBKDC application in order to use the kpasswd
command to change their password. By using the RACF RDEFINE command, you can
define the SKRBKDC application to the RACF APPL class:
RDEFINE APPL SKRBKDC OWNER(SYS1) UACC(READ) +
DATA(‘KERBEROS APPLID’)
Tip: Alternately, you can set the Universal Access to NONE and explicitly authorize
individual groups or users to the SKRBKDC application.
4. Define your local realm to the REALM class, using the RACF RDEFINE command to
define the KERBDFLT profile reflecting the default REALM and policy:
RDEFINE REALM KERBDFLT KERB(KERBNAME(KRB390.IBM.COM) PASSWORD(password)
MINTKTFLE(15) DEFTKTFLE(36000) + MAXTKTLFE(86400)UACC=NONE
Use the RACF RLIST command to display the KERBDFLT profile in the REALM class:
RLIST REALM KERBDFLT KERB
Attention: You need the password that is defined here later when you define the same
trust relationship on the Windows 2000 domain. This password is not associated with
any user ID and is not constrained to any SETROPTS rules for passwords.
6. Define Kerberos port 88 for the KDC and port 464 for the password server to your TCP/IP
profile to reflect the use of these ports, as shown in Example 4-6.
Example 4-6 Define Kerberos post 88 for the KDC and port 464 for the password server
88 TCP OMVS SAF KERB88 ; Kerberos Server
464 TCP OMVS SAF KERB464 ; Kerberos Server
7. Depending on your installation, you might or might not have started with the protection of
TCP/IP ports using the RACF SERVAUTH class. Accordingly, you should authorize the
SKRBKDC Started Task Userid to port 88 and 464, using the following commands:
PERMIT EZB.PORTACCESS.SC57.ITCPIP.KERB88 CLASS(SERVUATH) + ID(SKRBKDC)
ACCESS(READ)
PERMIT EZB.PORTACCESS.SC57.ITCPIP.KERB464 CLASS(SERVUATH) + ID(SKRBKDC)
ACCESS(READ)
The SKRBKDC started task also requires access to the TCP/IP stack itself, using a new
profile in the RACF SERVAUTH class:
PERMIT EZB.STACKACCESS.SC57.ITCPIP CLASS(SERVAUTH) ID(SKRBKDC) +
ACCESS(READ)
Local principals
You define local principals as RACF users using the ADDUSER and ALTUSER commands
with the new KERB option. This creates a KERB segment for the user. Each local principal
must have a RACF password. Therefore, do not use the NOPASSWORD option when
defining local principals. You can specify the following information for your local principals:
KERBNAME: Local principal name.
MAXTKTLFE: Maximum ticket lifetime for the local principal.
Important: Upper and lower case letters are accepted and maintained in the case in which
they are entered.
Restriction: You can define the local principal name that you specify only once. If you try
to define it to two RACF user IDs, you receive the following error message:
IRR52165I The value for the KERB segment KERBNAME operand must be unique.
Command processing ends.
A local principal’s key is revoked whenever the user’s RACF user ID is revoked or the RACF
password is considered expired. If the user’s key is revoked, the server will reject ticket
requests from this user.
You can change a user’s password so that a key can be generated using the ALTUSER
command with the NOEXPIRED option, for example:
ALTUSER GRAAFF PASSWORD(new1pw)NOEXPIRED
Attention: You must specify a password value so that a key can be generated. All
characters of the password are folded to uppercase.
Users can change their own passwords by completing their own definitions as local principals
by using any standard RACF password-change facility, such as:
TSO PASSWORD command (without the ID option)
TSO logon
CICS signon
Important: The RACF address space must be started for the password change to
complete and the key to be generated.
Password change requests from applications that encrypt the password prior to calling
RACF do not result in usable keys.
You can see in the profile Paul¢de¢Graaff that blanks are indeed replaced by the ¢ character.
If you list the profile, you notice a little quirk in the RACF command processing where it does
not accept mixed-case profile names, as shown in Example 4-10.
Example 4-11 shows that the local principal, Paul de Graaff, maps back to RACF user ID
GRAAFF.
Blanks are not permitted as a part of a RACF profile name. Therefore, when building the
KERBLINK profile name, as a result of specifying KERBNAME with the ADDUSER or
ALTUSER command, RACF command processing will replace each blank with the X'4A'
character (which often resolves to the ¢ symbol), as shown in the output from the RLIST
KERBLINK * command shown in Example 4-9 on page 221 and in the output from the RACF
data base unload utility (IRRDBU00).
Restriction: RACF command processing also prevents the X'4A' character from being
specified as part of the actual local principal name.
RACF will map the Windows DB2 user Kerberos principal name LAMBDA to
RACF userid CLIENT1
RACF user IDs that map to foreign principals do not need KERB segments. These user IDs
are intended to be used only to provide local z/OS identities to associate with access
privileges for local resources that are under the control of an z/OS application server, such as
DB2.
Each mapping profile in the KERBLINK class is defined and modified using the RDEFINE and
RALTER commands. The name of the KERBLINK profile for a foreign principal contains the
principal name, fully qualified with the name of the foreign realm. The profile name uses the
following format:
.../foreign_realm /[foreign-principal_name ]
If you want to map a unique RACF user ID to each foreign principal, you must specify the
foreign realm name and the foreign principal name. If you want to map the same RACF user
ID to every foreign principal in the foreign realm, you need only specify the foreign realm
name. In each case, you specify the local user ID using the APPLDATA keyword of the
RDEFINE or RALTER command.
Attention: All characters of the foreign realm name and the foreign principal name are
folded to uppercase.
kinit
klist
kdestroy
keytab
ksetup
kpasswd
kvno
kadmin
Figure 4-15 Kerberos user commands
kinit -s example
To obtain a ticket-granting ticket for a Kerberos principal, you can either use RACF services to
obtain the principal associated or use a so-called key table. The kinit -s command obtains a
ticket-granting ticket for the current signed-on RACF User ID, as shown in Example 4-13.
When we issue the kinit -s command for the current signed-on RACF user ID GRAAFF, we
receive an error that the service key is not available. When we define the local principal for
user ID GRAAFF, a key is not generated for the local principal. When we issue the LU
GRAAFF KERB command, no key is generated, as shown in Example 4-14.
We can now try again to get a ticket-granting ticket issued, using the kinit -s command, as
shown in Example 4-16.
Example 4-18 shows the interaction with the user when issuing the kinit command and a
credential cache does exits. You are prompted for a password associated with the local
principal. If you are using RACF instead of a key table for storage of local principals, then this
is your RACF password associated with your RACF User ID.
Example 4-18 Using the kinit command when a credential cache does exist
GRAAFF @ SC57:/u/graaff>kinit
EUVF06017R Enter password:
GRAAFF @ SC57:/u/graaff>
Important: You must enter the password here in uppercase letters. RACF only accepts
uppercase passwords.
When using the -k keyword, you do not need to specify the name and location of the key table
if you want to use the default key table. The default key table name is obtained from the
default_keytab_name configuration file (krb5.conf) entry. The default name is
/etc/skrb/krb5.keytab.
Tip: You can also change the default key table name using the environment variable
KRB5_KTNAME.
klist example
When you issue the klist command without any keywords, it actually is as though you had
issued a klist -c command. Example 4-20 shows the output of a klist command after a
ticket-granting ticket is obtained.
klist -f example
The klist -f command displays the ticket flags, as shown in Example 4-22.
klist -k example
The klist -k command lists the entries in a key table, as shown in Example 4-23.
klist -k -K example
The klist -k -K command lists the entries in a key table and displays the encryption key
value for each key table entry, as shown in Example 4-24.
The -e option causes the kdestroy command to check all of the credentials cache files in the
default cache directory (/etc/skrb/var/creds). Any file that contains only expired tickets that
have expired for the time delta are deleted. The time delta is expressed as nwndnhnmns,
where:
n Represents a number
w Indicates weeks
d Is days
h Is hours
m Is minutes
s Indicates seconds
The components must be specified in this order, but any component can be omitted (for
example, 4h5m represents 4 hours and 5 minutes, and 1w2h represents 1 week and 2 hours). If
only a number is specified, the default is hours.
Important: To delete a credentials cache, the user must be the owner of the file or must be
a root user (uid 0).
Example 4-25 shows an example of the kdestroy command that deletes the credentials
cache of principal Paul de Graaff.
To define the local principal graaff to the default key table, issue the keytab command, as
shown in Example 4-26.
Example 4-27 Using the kinit command to obtain a ticket-granting ticket using the key table
GRAAFF @ SC57:/u/graaff>kinit -k paul
EUVF06014E Unable to obtain initial credentials.
Status 0x96c73a06 - Client principal is not found in security registry.
After you run this command, an error indicates that the client principal is not found in the
security registry. So, what really happened here? When you look at the trace of the kinit
command, the issue becomes clear, as shown in Example 4-28.
As shown in the trace output, it states no RACF profile was found for paul. Local Kerberos
principals are always defined in RACF, and foreign principals in their respective REALM
(KDC). The messages here indicate that the Kerberos server tried to map the local principal
to a RACF user ID and could not find a local principal named paul.
The next step is to define a RACF user ID with a KERB segment and a KERBNAME of paul.
We change the RACF user ID GRAAFF to reflect the local Kerberos principal paul, as shown
in Example 4-29.
The password that we use to add the principal must match the RACF password for the RACF
user ID to which it is mapped. So, we have to redefine the local principal in the key table using
the correct (RACF) password. To redefine the local principal, delete and add the principal as
shown in Example 4-31.
Again we need to redefine the principal, as shown in Example 4-31 on page 230, but we now
add the (RACF) password in uppercase. We obtain a ticket-granting ticket successfully, as
shown in Example 4-33.
Server: krbtgt/[email protected]
Valid 2001/06/15-14:22:42 to 2001/06/16-00:22:42
Where:
-r realm Specifies the Kerberos administration realm. If this option is not specified, the
realm is obtained from the principal name. This option is meaningful only if the
administration server supports multiple realms.
-p principal Specifies the administrator principal. If this option is not specified, the string
/admin is appended to the principal name obtained from the default credentials
cache. If there is no credentials cache, the string /admin is appended to the
name obtained from the USER environment variable, or if the USER
environment variable is not defined, it is appended to the name obtained from
the getpwuid() function. The local realm is used if an explicit realm is not part
of the principal name.
The principal name is host or host name unless the -p option is specified. The
host name is the primary host name for the local system.
-k keytab Specifies the key table that contains the password for the administrator
principal. The user is prompted to enter the password if neither the -k nor the -w
option is specified.
-w password Specifies the password for the administrator principal. The user is prompted to
enter the password if neither the -k nor the -w option is specified.
-A Specifies that the initial ticket used by the kadmin command does not contain a
list of client addresses. If this option is not specified, the ticket contains the local
host address list. When an initial ticket contains an address list, it can be used
only from one of the addresses in the address list.
Note: Subcommand options start with a minus (-) character and principal attributes start
with a plus (+) character or a minus (-) character.
The kadmin command imposes no other restrictions on the characters used in names or
passwords, although it is recommended that you do not use any of the EBCDIC variant
characters. The Kerberos administration server can impose additional restrictions.
Time units
You can use time units such as dates, that are displayed as day-of-week, month,
day-of-month, hour:minute:second, time zone, or year using the local time zone, as specified
by the TZ environment variable. Durations are displayed as days-hours:minutes:seconds.
The kadmin command supports a number of date and duration formats and some examples
are as follows:
"15 minutes" - "7 days" - "1 month" - "2 hours" - "400000 seconds" - "next
year" - "this Monday"
Subcommands
The following subcommand descriptions assume that the administration server is using the
standard MIT Kerberos database for the registry. Other database implementations might not
support all of the subcommand options and attributes.
Principal-related commands
Note: In the subcommands that we describe in this section, name specifies a Kerberos
principal
There is a long list of options that you can use in defining a principal, such as the types of
tickets that it can use, what services it can provide, what encryption types are supported
for this principal, and what pre-authentication steps might be required.
Policy-related commands
list_policies [expression]
The list_policies (also known as listpols) subcommand lists all of the policies in the
Kerberos database that match the specified search expression. All policies are listed if no
search expression is provided. You must have LIST authority.
get_policy name
The get_policy (also known as getpol) subcommand displays information for a single
policy entry. You must have GET authority or the policy must be associated with your own
principal entry.
add_policy [options] name
The add_policy (also known as addpol) subcommand adds a new policy to the Kerberos
database. The options can be specified before or after the policy name and can be
specified in any order. You must have ADD authority.
modify_policy [options] name
The modify_policy (also known as modpol) subcommand modifies an existing policy in the
Kerberos database. The options can be specified before or after the policy name and can
be specified in any order. You must have MODIFY authority.
delete_policy name
The delete_policy (also known as delpol) subcommand deletes a policy entry from the
Kerberos database. You must have DELETE authority.
add_key [[-keytab|-k] keytab_name] principal_name
The add_key (also known as ktadd) subcommand generates a set of random encryption
keys for the named principal and then adds the generated keys to the specified key table.
The default key table is used if the -keytab option is not specified. A key table name prefix
of FILE is changed to FILE because the add_key subcommand must update the key table.
The principal option specifies the principal whose password is to be changed. The principal is
obtained from the default credentials cache if the principal is not specified on the command
line.
Note: You cannot change the password for a ticket-granting service principal (krbtgt/realm)
using the kpasswd command.
The principal option specifies the principal whose current key version number is to be
displayed. The principal is obtained from the default credentials cache if the principal is not
specified on the command line.
Auditing
SMF Type 80 records are created for login requests (Kerberos initial ticket requests). Both
success and failure events can be logged as determined by the SKDC_LOGIN_AUDIT
environment variable. The event code is 68 and the record includes relocate sections 333
(Kerberos principal name), 334 (request source), and 335 (KDC error code).
Figure 4-16 shows the smf records (truncated) generated for the kinit commands issued in
Example 4-32 on page 231 and Example 4-33 on page 231. The first record shown in
Figure 4-16 indicates an error code of 24, which means that the reauthentication (password)
failed.
n t i a l
n f id e
C o
Introduction to cryptography
The word cryptography literally means secret writing. Throughout history, information has
been an asset that provides the owner a competitive advantage.
Failure to adequately protect information has had significant consequences for countries.
Today, If an enterprise does not exercise due care in protecting sensitive information about
others, it risks losing its competitive advantage and market share through industrial
espionage or losses due to law suits.
Cryptography is the only known practical method of protecting information that is transmitted
electronically through communication networks. It can also be an economical way to protect
stored information. As computing systems become increasingly exposed through increased
computer literacy and reliance on distributed computing, the pervasiveness of cryptography
will increase as industry seeks ways to protect their information assets.
C ryptographic capabilites:
D ata confidentiality
D ata integrity
A uthentication and
Identification
E lectronic signature
Cryptographic capabilities
The use of cryptography provides many data-handling capabilities, such as data
confidentiality, data integrity, authentication, and electronic signatures.
Data confidentiality
Traditionally, cryptography is a data scrambling method used to conceal the information
content of a message. When a message is encrypted, the input plain text (unencrypted text)
is transformed by an algorithm into enciphered text that hides the meaning of the message.
This process involves a secret key that is used to encrypt and (later) decrypt the data. Without
this secret key, the encrypted data is meaningless. To conceal a message without using
cryptography, a secure physical communication line is required. With cryptography, only the
secret data encryption key has to be transmitted by a secure method. The encrypted text can
be sent using any public mechanism.
Data integrity
Although cryptography is best known for its ability to protect the confidentiality of data, it is
also used to protect the integrity of data. For example, a cryptographic checksum, such as a
message authentication code (MAC), can be calculated on arbitrary user-supplied text. The
text and MAC are then sent to the receiver. The receiver of the message can verify the MAC
appended to a message by recalculating the MAC for the message using the appropriate
secret key and verifying that it matches the received MAC exactly.
Electronic signature
In normal business, a legal transaction is completed by a verifiable authorized signature (just
sign on the dotted line). An analogous process is required by new electronic applications,
such as Electronic Data Interchange (EDI). A digital signature is a means of achieving this by
using cryptographic mechanisms. It assures the recipient that the message is authentic and
that only the owner of the key could have produced the digital signature. A digital signature,
such as the Rivest-Shamir-Adleman (RSA) algorithm, is well-suited for message
non-repudiation. Non-repudiation is the ability of a party to sign a message, such that he or
she is unable to later deny having signed the message.
Their fundamental difference is in how keys are used with these encryption methods.
We discuss these algorithms in the next sections (5.4, “Symmetric encryption algorithms” on
page 242 and 5.5, “Asymmetric encryption algorithms” on page 244).
Encryption Decryption
message algorithm Internet algorithm message
Key
Most symmetric ciphers are block ciphers. They operate on a fixed number of characters at a
time, usually eight bytes. Some frequently-used algorithms are:
Data Encryption Standard (DES): Developed in the 1970s by IBM scientists, DES uses
an 8-byte key; however, one bit in each byte is used as a parity bit; so, the key length is 56
bits. Stronger versions called Triple DES, which use three operations in sequence, have
been developed:
– 2-key Triple DES encrypts with key 1, decrypts with key 2, and encrypts again with key
1. The effective key length is 112 bits.
– 3-key Triple DES encrypts with key 1, decrypts with key 2, and encrypts again with key
3. The effective key length is 168 bits.
Advanced Encryption Standard (AES): Sometimes known as Rijndael, AES is a block
cipher adopted as an encryption standard by the US government. It is considered the
successor to DES and TDES and is expected to be used worldwide. AES uses a larger
block size than DES and TDES do. While DES uses a block size of 8 bytes (64 bits), AES
uses a block size of 16 bytes (128 bits) along with the capability of using longer keys than
DES or TDES. This block size should be acceptable for messages of up to 256 exabytes of
Note: Both RC2 and RC4 are proprietary confidential algorithms that have never been
published. They have been examined by a selected number of scientists working under
non-disclosure agreements.
With these ciphers, it can be assumed that a brute-force attack is the only means of breaking
the cipher; therefore, the work factor depends on the length of the key. If the key length is n
bits, the work factor is proportional to 2**(n-1).
Encryption Decryption
message algorithm Internet algorithm message
Asymmetric encryption algorithms, commonly called Public Key Cryptosystems (PKCS), are
based on mathematical algorithms. The basic idea is to find a mathematical problem that is
very hard to solve. Only one algorithm, RSA, is in widespread use today. However, some
companies have begun to implement public-key cryptosystems based on so-called elliptic
curve algorithms. The following list provides a brief overview of asymmetric algorithms:
RSA: RAS was invented in 1977 by Rivest, Shamir, and Adleman (who formed RSA Data
Security, Inc.). The idea behind RSA is that integer factorization of very large numbers is
extremely hard to do. Key lengths of public and private keys are typically 512 bits, 1024
bits, or 2048 bits.
Elliptic Curve: Public-key cryptosystems based on elliptic curves use a variation of the
mathematical problem to find discrete logarithms. It has been stated that an elliptic curve
cryptosystem implemented over a 160-bit field has roughly the same resistance to attack
as RSA with a 1024-bit key length.
Elliptic curve cryptosystems are said to have performance advantages over RSA in
decryption and signing.
Uses of cryptosystems
Cryptosystems, both symmetric and asymmetric, are used for data privacy, data integrity, and
digital signatures.
Different solutions exist in different environments, and we list a few of these solutions in the
following sections.
Users (principals) are authenticated by a central authentication server (the DCE Security
Server) using the Kerberos V.5 third-party authentication method. All client and server
principals must be defined in the registry (the authentication server’s database). Client users
have a password that they must remember, and servers have a key that is normally stored in
a keyfile on the server’s computer. The passwords and server keys are stored in the registry
as the principals’ Master Keys.
During authentication, the security server can send information to the client encrypted under
the client's Master Key (password). A client who wants to communicate with an application
server needs a ticket for this application server from the security server. A ticket is a collection
of information about the client, encrypted by the security server with the Master Key of the
application server. The client cannot read or modify the ticket, which can be compared to a
sealed envelope that the client can forward to the server as a method for identify but which
the user cannot open, read, or modify.
The security server creates a random session key that the client and the application server
can use to encrypt the data that they send to each other. This session key is included in the
ticket and is also sent to the client encrypted under the client’s Master Key.
The authentication and key management method used by DCE can create a highly-secure
client-server environment. If all security features provided by DCE are used, a network can be
made impenetrable even to sophisticated intruders. A hacker would need a computer that is
defined in the registry with a valid Master Key to even be able to attempt to log in and make a
guess at a principal's password.
The use of symmetric encryption causes the overhead for the security functions, although too
large to be neglected, to be tolerable.
The downside is that all clients need to be defined and administered in the registry. This is
adequate for client-server computing within an enterprise but does not scale well into a user
population made up of large numbers of suppliers and customers on the Internet.
The recipient uses the private key to decrypt the DES, RC2, or RC4 key and uses this key to
decrypt the data and recover the plain text. This method works very well and has reasonable
performance because RSA is used to encrypt or decrypt only small amounts of data. The
length of symmetric keys is typically between 8 and 32 bytes.
MACs rely on the same secret key that is used by both the sender (to create the MAC) and
the receiver (to verify the MAC). Since the MAC is derived from a secret key known only to the
sender and receiver the MAC can be sent in the clear. An adversary sitting between the
sender and the receiver (a so-called “person-in-the-middle” attack) can alter the message but
cannot forge the MAC because the key to create the MAC is unknown. The mathematical
principle behind using the MAC is that finding a message that fits a certain MAC is as difficult
as breaking DES encryption.
The sender of a message (block of data) uses an algorithm (for example SHA-1) to create a
message digest from the message. The message digest is sent together with the message.
The receiver runs the same algorithm over the message and compares the resulting
message digest to the one sent with the message. If both match, the message is unchanged.
The message digest cannot be sent in the clear. Because the algorithm is well known and no
key is involved, a person-in-the-middle can forge the message and can also replace the
message digest with that of the forged message, making it impossible for the receiver to
detect the forgery. Depending on the application and the key management used, either
symmetric cryptosystems or public-key cryptosystems can be used to encrypt the message
digest.
Because a message digest is a relatively small amount of data, it is especially well-suited for
public-key encryption.
Digital signatures
Digital signatures
Digital signatures are an extension of data integrity. While data integrity only ensures that the
data received is identical to the that is data sent, digital signatures go a step further. They
provide non-repudiation, which means that the sender of a message (or the signer of a
document) cannot deny authorship (similar to signatures on paper).
The receiver uses the sender’s public key to decrypt the message digest and sender’s
identification. The receiver then uses the message digesting algorithm to compute the
message digest from the data. If this message digest is identical to the one recovered after
decrypting the digital signature, the message is authentic, and the signature is recognized as
valid.
With digital signatures, only public-key encryption can be used. If symmetric cryptosystems
are used to encrypt the signature, it is very difficult to make sure that the receiver (having the
key to decrypt the signature) could not misuse this key to forge a signature of the sender. The
private key of the sender is not known to anyone else. So, nobody can forge the sender’s
signature.
The tricky thing with digital signatures is the trustworthy distribution of public keys.
CCA was introduced in October 1989 with the IBM Transaction Security System and the IBM
Integrated Cryptographic Facility (IBM ICSF) with its supporting Integrated Cryptographic
Services Facility/MVS (ICSF/MVS).
CCA API
The IBM CCA cryptographic API definition uses a common key management approach and
contains a set of consistent callable services. (A callable service is a routine that receives
control when an application program issues a CALL statement.)
Common key management ensures that all products that conform to the architecture allow
users to share cryptographic keys in a consistent manner. The definition of key management
provides methods for initializing keys on systems and networks, and also supports methods
for the generation, distribution, exchange, and storage of keys.
Table 5-1 shows most of the categories of CCA callable services and some of the services in
each category. The service pseudonym is the descriptive name for a service, while the service
name is the formal name for the service and the name by which the service is called from a
program.
TKE Workstation
System z9 (optional)
TSO Terminal
Hardware Crypto
Other systems
Clear/Encrypted Data
? ? ? ?
...
Master Key
CPACF RACF z/OS
Crypto instructions
ICSF
Crypto IBM Exploiters
Callable
Express 2 Encryption/Decryption Services
Key to use
APIs Home Grown
Applications
These features are usable only when explicitly enabled through Feature Code 3863, except
for the CPACF SHA-1 and SHA-256 functions, which are always enabled.
To fully exploit the z9 Cryptographic features requires the Integrated Cryptographic Service
Facility (ICSF), which is the support program for the cryptographic features CPACF, CEX2C,
and CEX2A. ICSF is integrated into z/OS.
Additionally, the optional (TKE) Trusted Key Entry workstation feature is part of a customized
solution for using the Integrated Cryptographic Service Facility for z/OS program product to
manage cryptographic keys of a System z9 that has CEX2C features installed and intended
for the use of DES and PKA with secure cryptographic keys.
The TKE workstation provides secure control of the CEX2C features, including loading of
master keys.
Note: The encryption or decryption keys are themselves encrypted and, therefore,
unusable when residing outside of the cryptographic coprocessor.
Physically, these keys can be stored in ICSF-managed VSAM data sets and pointed to by
the application using the label they are stored under. The Cryptographic Key Data Set
(CKDS) is used to store the symmetric keys in their encrypted form, and the Public Key
Data Set (PKDS) is used to store the asymmetric keys. The application also has the
capability of providing an encrypted encryption key or a clear encryption key directly in
memory (that is, to use as is) to the coprocessor.
For high-speed access to symmetric cryptographic keys, the keys in the CKDS are
duplicated into an ICSF-owned data space.
CPACF operates with a specific set of machine instructions, the Message-Security Assist
(MSA) instructions, which are problem state instructions and therefore available to all
applications. Alternatively, these functions can also be called through the Integrated
Cryptographic Service Facility (ICSF) component of z/OS by an ICSF-aware application.The
MSA instructions are described in z/Architecture Principles of Operation, SA22-7832.
The MSA instructions are all executed synchronously with respect to the CP instruction
stream, contrary to the operations executed on the Crypto Express 2 cards, which execute
asynchronously. The CPACF operations are therefore quite fast and can be used to support a
high volume of cryptographic requests. Because the CPACF instructions are available on
every PU within System z9, as they are for the zSeries® z990 or z890, and because the
CPACF operates with clear keys only, there is no notion of logical partition sharing or
cryptographic domains with CPACF.
The CPACF provides the MSA instruction set on every central processor (CP) of a z9 109, z9
BC, and z9 EC server.
Each of these instructions can perform several functions. Therefore, the MSA basic facility
supplies a query function with each instruction so that the programmer can determine
whether a given function is available on a given processor. If a programmer attempts to use a
function that is not available, his program will get a program interruption with interruption code
6 (specification exception). In z/OS this is normally presented as an 0C6 abend.
On the z9 109, z9 BC, and z9 EC, the MSA instruction set always includes the following
functions:
KIMD-SHA-1 and KIMD-SHA-256
KLMD-SHA-256 and KLMD-SHA-256
Because the CPACF cryptographic functions are implemented in each CP, the potential
throughput scales with the number of CPs in the server.
The hardware of the CPACF that performs encryption operations and SHA functions operates
basically synchronous to the CP operations. The CP cannot perform any other instruction
execution while a CPACF cryptographic operation is being executed. The CP internal code
performs data fetches and stores resultant data while cryptographic operations are executed
in the CPACF hardware on a unit basis as defined by the hardware.
Battery
PCI-X PCIXCC
STI bridge card
1/.5 GB/s
Battery
each dir
STI
interface
1 GB/s
PCI-X
PCI-X (64-bit, 133MHz)
bridge
Battery
STI
1/.5 GB/s PCI-X PCIXCC
each dir card
bridge
Battery
STI = Self Timed Interface
The CEX2 in coprocessor mode (CEX2C) provides specialized hardware that performs DES,
TDES, SHA-1, RSA, PIN and key management operations. The CEX2C is designed to
protect the cryptographic keys. Security relevant cryptographic keys are encrypted under a
Master Key when outside of the secure boundary of the CEX2C card. The Master Keys are
always kept in battery backed-up memory within the tamper-protected boundary of the
CEX2C, and are destroyed if the hardware module detects an attempt to penetrate it. The
tamper-responding hardware has been certified at the highest level under the FIPS 140-2
standard, namely, Level 4. The CEX2C also supports the clear key PKA operations that are
often used to provide SSL protocol communications.
When configured in accelerator mode (CEX2A), the CEX2 feature provides hardware support
to accelerate certain cryptographic operations that occur in the e-business environment.
Compute intensive public key operations as used by the SSL/TLS protocol can be offloaded
from the CP to the CEX2A, potentially increasing system throughput. The CEX2 in
accelerator mode works in clear key mode only.
The connection of the CEX2 feature to the System z9 CPs through the PCI-X bus incurs
latency and data transmission time. Because of this connection to the z9 CPs, the CEX2
executes its cryptographic operations asynchronously to a CP operation. A CP requesting a
cryptographic operation from the CEX2 uses a message queuing protocol to communicate
with the CEX2. After enqueueing a request to the CEX2, the host operating system suspends
the task that has enqueued the cryptographic operation and dispatches another task. Thus,
processing of the cryptographic operation in the CEX2 works in parallel to other tasks that are
executed in the z9 CP. A special CP task polls at fixed time intervals for finished operations of
the CEX2, dequeues them, and executes the Resume function to cause the redispatch of the
application that is waiting for the result of the cryptographic operation. For each PCI-X
adapter in the CEX2, up to eight requests can be waiting in the queue either for execution or
for dequeueing of the result of a cryptographic operation by a CP. In the CEX2, several
operations can be performed in parallel.
The CEX2A is actually a CEX2C that has been reconfigured by the user to only provide a
subset of the CEX2C functions at enhanced speed. This reconfiguration is a manual process
performed at the System z9 Support Element.
Note that:
The reconfiguration is done at the coprocessor level, that is, a CEX2C feature can host a
CEX2C coprocessor and a CEX2A accelerator, or two CEX2C coprocessors or two
CEX2A accelerators.
The reconfiguration is working both ways, that is, from CEX2C to CEX2A, and from
CEX2A to CEX2C. Master keys in the CEX2C domains can be optionally preserved when
reconfiguring from CEX2C to CEX2A.
The reconfiguration process is disruptive to the involved coprocessor or accelerator
operations. The coprocessor or accelerator must be deactivated using ICSF on all LPARS
where it is being used before engaging the manual reconfiguration process.
The FIPS 140-2 certification is not relevant to CEX2A because it is operating with clear
keys only.
The function extension capability through UDX is not available to CEX2A.
A System z9 can support up to eight Crypto Express2 features (depending on the other
features are installed), and each engine can be configured independently as either a
coprocessor or accelerator.
Each PCIXCC has an 8-character serial number and a 2-digit Adjunct Processor (AP) number
or ID. The number of APs is limited to 16 on System z9, and a CEX2C is, therefore, given an
AP number between 0 and 15.
Other key functions of CEX2C serve to enhance the security of public/private key encryption
processing include:
Retained key support (RSA private keys generated and kept stored within the secure
hardware boundary)
Support for 4753 Network Security Processor migration
User-Defined Extensions (UDX)
User-Defined Extensions to the Common Cryptographic Architecture (CCA) support
custom algorithms that execute within the CEX2C Cryptographic Coprocessor. The UDX
The Encrypt and Decrypt RSA functions support key lengths of 512 to 4096-bit, in the
Modulus Exponent (ME) and Chinese Remainder Theorem (CRT) formats.
The maximum number of SSL transactions per second that can be supported on a System z9
by any combination of CPACF and CEX2A coprocessors is limited by the amount of cycles
available to perform the software portion of the SSL/TLS transactions. When both PCI-X
coprocessors on a Crypto Express2 feature are configured as accelerators, the Crypto
Express 2 feature is designed to perform up to 6000 SSL handshakes per second. This
represents, approximately, a 3X performance improvement compared to z990 when using
either a PCI Cryptographic Accelerator (PCICA) feature or the current CEX2C feature.
Note: These performance values indicate a throughput. That is, it is necessary to initiate
several threads of parallel requests to the CEX2A to achieve this performance.
Secure
Tamper- Battery- crypto
Real-time module
detection backed
10 clock 8 4
circuitry RAM
Random AVR
Flash
SDRAM number 6 security 9
EPROM 3
2 generator microcontroller
Interconnect
PCI-X base card
Batteries
PCI-X to PCI-X
bridge
dc/dc
Power
PCI-X bus edge connector
Segment 3
(in flash, CCA application
replaceable)
Digital certificate
Segment 1 POST 1
(in flash, Miniboot 1
replaceable)
Digital certificate
Segment 0 POST 0
(in ROM, Miniboot 0
permanent)
The purpose of POST is to test and initialize all hardware in the coprocessor card, including
the PowerPC 405GPr processor, the cryptographic engines, the communications interfaces,
and all other logic. It prevents use of the card if there are serious faults.
The purpose of Miniboot is to control the secure loading of new software into Segments 1, 2,
and 3. The Miniboot code-loading architecture provides assurance that any software
executing in the card has not been tampered with, and that it was created by IBM or someone
approved by IBM to do so. Each segment has control over what software can be loaded into
the next segment, and all segments are protected with digital signatures that can be verified
back to a root key securely managed by IBM.
Master key
All other keys that are encrypted under a master key are stored outside the protected area of
the cryptographic hardware; they cannot be attacked because the master key used to encrypt
them is itself secure inside the tamper-protected cryptographic hardware and is zeroized if
there is any attempted attack. This is an effective way to protect a large number of keys while
needing to provide physical security for only a master key.
When the cryptographic hardware is a PCIXCC/CEX2C, the master key is called the
Symmetric-keys Master Key (SYM-MK). In a z/OS environment, the SYM-MK is 128 bits (16
bytes) long.
Table 5-2 shows some of the key types supported by the CCA.
CIPHER A 64-bit or 128-bit key used in the Encipher or Decipher callable service.
DATA A 64-bit, 128-bit, or 192-bit key used in the Encipher, Decipher, MAC generate, or
MAC verify callable service.
DATAC A 128-bit key used in the Encipher or Decipher callable service, but not in the MAC
generate or MAC verify callable service.
DATAM 128-bit key used in the MAC generate or MAC verify callable service.
DECIPHER A 64-bit or 128-bit key used only to decrypt data. DECIPHER keys cannot be used
in the Encipher callable service.
ENCIPHER A 64-bit or 128-bit key used only to encrypt data. ENCIPHER keys cannot be used
in the Decipher callable service.
EXPORTER A 128-bit key-encrypting key used to convert a key from the operational form into
exportable form.
IMPORTER A 128-bit key-encrypting key used to convert a key from the importable form into
operational form.
MAC A 64-bit or 128-bit key used in the MAC generate or MAC verify callable service.
MACVER A 64-bit or 128-bit key used in the MAC verify callable service but not in the MAC
generate callable service.
Each type of key (except the master key) has a unique control vector associated with it. The
bits in a control vector specify the possible uses of the key in great detail. For example, there
are bits which specify the key type, the key subtype, whether the key can be exported, and
whether the key can be used in encryption, decryption, MAC generation, and MAC
verification. This prevents the many attacks that are otherwise possible by using a key for an
inappropriate function.
Whenever the master key is used to encrypt a key, the cryptographic hardware produces a
variation of the master key according to the type of key that is being enciphered. These
variations are called master key variants. The cryptographic hardware creates a master key
variant by exclusive ORing a control vector with the master key. For example, when the
master key is used to encipher a DATA key, the cryptographic hardware produces the master
key DATA variant by XORing the master key with the control vector for DATA keys. After
creating the master key DATA variant, the cryptographic hardware encrypts the DATA key by
using the master key DATA variant as the key for the encryption algorithm. See Figure 5-15.
Encryption request 1
"DATA
key" MIOH
JNOR
Control Encrypted 7C
%=#F
vector C key K
plaintext ciphertext
Control vector
2 checking
DES 5
Master key
encryption
3
4
Master key variant: DES
DATA keys decryption
Unencrypted
DATA key
CEX2C secure boundary
DES encryption
In Figure 5-16, we formulate a request to encrypt some plaintext using a DATA key K that has
already been encrypted under the SYM-MK master key of the CEX2C (1). K has an
associated control vector C. C is examined to see if it has attributes that qualify it to be used
in the called service in the requested way (2). If it does not, the service invocation fails. If C is
valid, execution of the requested service continues. The CEX2C XORs the master key with
the DATA Control Vector to produce a master key variant (3). Next it uses the master key
variant to decrypt our DATA key K (4). Finally it performs the requested encryption using the
decrypted DATA key (5).
Notice that each key K is encrypted in such a way that the value of the master key and the
control vector C (associated with K) must be specified to recover the key.
If a caller alters the value of the control vector to permit use of the key in a command, the
correct value of the key is not recovered by the key decryption process and any resulting
output of the service is invalid, that is, any output is equivalent to that resulting from using a
random unknown key value in that service.
The conversion from one key form to another key form is considered to be a one-way flow:
importable → operational → exportable. An operational key form cannot be turned back into
an importable key form, and an exportable key form cannot be turned back into an operational
or importable key form.
The key_identifier parameter, which is found in most of the cryptographic API callable
services, allows the programmer to pass keys to the service either directly by value or
indirectly through a key label.
A key in importable or exportable form is kept in an external key token. The external key token
contains the encrypted key and its associated control vector; see Figure 5-17 on page 272.
Alice's system
Key Export
CEX2C
Maste DES
key A encryption
DES DES
decryption decryption
DATA
control
vector
Unencrypted Unencrypted
DATA key EXPORTER key
After the manual installation of these initial key-encrypting keys, all subsequent key
distribution can be done electronically. For example, Alice can execute the Key Export service
to convert the information for K found in its internal key token to an exportable key in an
external key token. The external key token contains K encrypted under the exporter key
(instead of the master key) and Ks that are associated control vector. The key is encrypted
under the key-encrypting key that exists on Alice’s sending system as an exporter key and on
Bob’s receiving system as an importer key. See where Alice sends a DATA key to Bob.
Note: Because the key-export service is performed in the CEX2C, the clear value of the
key to be exported is not revealed. Also note that if the content of the control vector is
changed either accidentally or intentionally, the correct key value will not be recovered
because the value of the encrypted key is cryptographically coupled to the control vector.
Bob's system
Key Import
CEX2C
Master DES
key B encryption
DES DES
decryption decryption
DATA
control
vector
Unencrypted Unencrypted
DATA key IMPORTER key
Almost all private keys that are encrypted under a master key are stored outside the protected
area of the cryptographic hardware; they cannot be attacked because the master key used to
encrypt them is itself secure inside the tamper-protected cryptographic hardware and will be
zeroized if there is any attempted attack.
There is one exception to the rule that private keys are stored outside the cryptographic
hardware. CCA supports retained RSA keys, in which the RSA key pair is generated inside the
secure cryptographic hardware, and only the public key is ever allowed to leave the secure
environment. The private key remains inside the secure hardware and is never allowed to
leave in any form. This key is designed to meet the strict demands of some standards, which
require assurance that the private key can exist only in a single cryptographic module. This
rule greatly strengthens non-repudiation. If a private key can exist only in one cryptographic
device, it provides assurance that any digital signature computed using that private key can
have originated only at the system in which that device is installed. In the PCIXCC, retained
RSA private keys are stored in the flash memory inside the secure module. Similar to all CCA
data stored in that memory, they are securely encrypted under a TDES key that is destroyed if
there is any attempt to tamper with the device.
Conceptually, the master key used to protect DES keys could have also been used to protect
PKA private keys. However, the CCA designers chose to use a different master key as
follows:
When the cryptographic hardware is a PCICC or PCIXCC/CEX2C, the 192-bit master key
is called the Asymmetric-keys Master Key (ASYM-MK).
When the cryptographic hardware is a CCF, there are two PKA master keys.
– The Key Management Master Key (KMMK) is a 192-bit key that is used to protect
private keys that are used in both digital signature generation and decryption of secret
(symmetric) keys.
– The Signature Master Key (SMK) is a 192-bit key that is used to protect private keys
that are used only in digital signature generation.
Operational keys are accessed either directly by value in an internal key token or indirectly by
a key label:
Internal key token
The format of an RSA private internal key token differs from the format of a DSS private
internal key token; we only discuss the former. As shown in Figure 5-20 an RSA private
internal key token contains several sections:
– R indicates that the section is required
– O indicates that the section is optional
In Figure 5-20 and succeeding figures:
– d represents the RSA private exponent
– e represents the public exponent
– n represents the modulus
Random number r
Random number r-1 Blinding information sub-section
X'00' padding to get a multiple of 8 bytes
Key label
A key label indirectly identifies an internal key token stored in key storage. (An example of
key storage in the z/OS environment is the ICSF Public Key Data Set, a VSAM data set
often called the PKDS).
The key_identifier parameter found in most of the cryptographic API callable services
allows the programmer to pass keys to the service either directly by value or indirectly through
a key label.
You can use the PKA Key Import callable service to do either of the following tasks:
Get a private key deciphered from an importer key and enciphered by the ASYM-MK.
Get a clear, unenciphered private key enciphered by the ASYM-MK.
CCA callable services can use PKA public key tokens directly in the external form.
Hardware Crypto
CEX2C z/OS
Symmetric-keys
Master Key RACF
Plaintext Appl
Asymmetric-keys ICSF
Master Key Ciphertext
Segment 3
Crypto instruction Callable
Segment 2 services CALL CSNxxxx
Segment 1 APIs
Segment 0
Key to use
or instructions
in the application
Options
ICSF
In the z/OS environment, it is the Integrated Cryptographic Service Facility (ICSF) that
provides access to cryptographic functions through callable services. The ICSF callable
services comply with the IBM CCA cryptographic API and are available for programs written
in assembler or high-level languages. IBM CCA supports a hierarchical structure of keys
where keys can be encrypted by other keys (key-encrypting keys, KEKs), the master key
being at the top of the hierarchy.
ICSF also provides key repositories in the form of two VSAM data sets where keys can be
kept in key tokens in clear value or encrypted under a KEK or under the coprocessors master
keys. The VSAM data sets are the Cryptographic Key Data Set (CKDS) and the Public Key
Data Set (PKDS). The key tokens in the CKDS and the PKDS are given a user- or
system-defined label that is used for their retrieval and maintenance.
Figure 5-24 is a schematic view of the hardware cryptography implementation in the System z
environment.
In the Figure 5-24, an application program has issued a CCA cryptographic API call on a
System z9. The call is routed to the ICSF started task. The ICSF started task invokes RACF
to determine whether the user ID associated with the request is authorized to use the
requested cryptographic service and any keys associated with the request. If the user ID has
the proper authority, the ICSF started task decides whether it should perform the request
using ICSF software or cryptographic hardware.
If ICSF decides to use cryptographic hardware, it will give control to its routines that contain
the crypto instructions. (The cryptographic instructions that drive the CPACF are listed in
5.11, “CP Assist for Cryptographic Functions (CPACF)” on page 258.) ICSF routes the
request to the CEX2C and if the request is, say, a request to encrypt data, the ICSF started
task provides the CEX2C with the data to be encrypted and the key to be used by the
encryption algorithm. Recall that the key is encrypted, in this case under a variant of the
Symmetric Keys Master Key(SYM-MK) stored in the CEX2C. The request proceeds as shown
previously in Figure 5-16 on page 271.
The interactions between the functional blocks shown in Figure 5-24 are as follows:
ICSF is a z/OS started task that offers cryptographic APIs to applications and drives the
requests to the Crypto Express2 Coprocessors (CEX2C).
The CEX2C is a “secure” coprocessor in that it contains a master key used to encrypt keys
to be kept in storage or in the PKDS data set. The master key resides in the coprocessor
hardware only and is used to decrypt internally to the coprocessor the secure keys that
are provided so that they can be used to encrypt or decrypt data.
ICSF needs other data sets to operate. The CKDS for the use of cryptographic hardware,
and an options data set that contains the ICSF started task startup parameters. ICSF
requires a PKDS as well. The PKDS doesn’t need to contain any records, or even be
initialized, but it does need to be allocated by ICSF.
Installing and maintaining the secret master key is a task that security officers can perform
from TSO/E terminals or from an optional Trusted Key Entry (TKE) workstation, the latter
for a very high security level of the interactions between the security officers and the
CEX2C.
If there is more than one secure coprocessor to which ICSF has access, all coprocessors
must have been set with the same master key value.
The CPACF operates only with clear keys.
The keys can be stored in ICSF-managed VSAM data sets and pointed to by the application
program by using the label under which they are stored. The Cryptographic Key Data Set
(CKDS) is used to store the symmetric keys in their encrypted form, and the Public Key Data
Set (PKDS) is used to store the asymmetric keys. If the level of ICSF that you are using is
HCR7720 or higher, you can also store keys in the CKDS in clear (unencrypted) form.
Chapter 6. LDAP
This chapter examines the Lightweight Directory Access Protocol (LDAP) as implemented on
z/OS.
What is LDAP
Today people and businesses rely on networked computer systems to support distributed
applications. These distributed applications might interact with computers on the same local
area network, within a corporate intranet, within extranets linking up partners and suppliers,
or anywhere on the worldwide Internet. To improve functionality and ease-of-use, and to
enable cost-effective administration of distributed applications, information about the services,
resources, users, and other objects accessible from the applications needs to be organized in
a clear and consistent manner. Much of this information can be shared among many
applications, but it must also be protected in order to prevent unauthorized modification or the
disclosure of private information.
Information describing the various users, applications, files, printers, and other resources
accessible from a network is often collected into a special database that is sometimes called
a directory. As the number of different networks and applications has grown, the number of
specialized directories of information has also grown, resulting in islands of information that
are difficult to share and manage. If all of this information could be maintained and accessed
in a consistent and controlled manner, it would provide a focal point for integrating a
distributed environment into a consistent and seamless system.
The LDAP is an open industry standard that has evolved to meet these needs. LDAP defines
a standard method for accessing and updating information in a directory.
Directory service
A directory is a listing of information about objects arranged in some order that gives details
about each object. Common examples are a city telephone directory and a library card
catalog. For a telephone directory, the objects listed are people—the names are arranged
alphabetically, and the details given about each person are address and telephone number.
Books in a library card catalog are ordered by author or by title, and information such as the
ISBN number of the book and other publication information is given.
In computer terms, a directory is a specialized database, also called a data repository, that
stores typed and ordered information about objects. A particular directory might list
information about printers (the objects) consisting of typed information such as location (a
formatted character string), speed in pages per minute (numeric), print streams supported
(for example PostScript® or ASCII), and so on.
Directories allow users or applications to find resources that have the characteristics needed
for a particular task. For example, a directory of users can be used to look up a person's
e-mail address or fax number. A directory can be searched to find a nearby PostScript color
printer, or a directory of application servers can be searched to find a server that can access
customer billing information.
The information in a directory is generally read much more often than it is written. As a
consequence, directories do not usually implement the complicated transaction or rollback
schemes that relational databases use for doing high-volume complex updates. Directory
Remember:
Root
Hierarchical structure
o=IBM
All entries have attributes
Object class determines entry level
Object class determines mandatory ou=TMCC
and optional attributes for an entry
Distinguished name
cn=userid entry
Relative Distinguished name
RDN attribute 1
Attributes are protected by Access attribute 2
Control Lists ACLs attribute 3
attribute 4
"root"
Directory
Namespace
c=US c=UK
oc = country
c = US
cn=Tim
Hahn
oc =person
cn =Tim Hahn
mail = [email protected]
mail = [email protected] All entries have attributes (and values)
Object class (oc) is an attribute in all entries
RDN: cn=Tim Hahn
Attributes grouped into mandatory and
DN: cn=Tim Hahn, o=IBM, optional
c=US
In addition, LDAP allows you to control which attributes are required and allowed in an entry
through the use of a special attribute called objectClass. The values of the objectClass
attribute determine the attributes that can be specified in the entry.
The z/OS LDAP server supports different naming formats. While naming based on country,
organization, and organizational unit is one method, another method is to name entries based
on an organization’s registered DNS domain name.
An example of search is, you might want to search the entire directory subtree below IBM for
people with the name Tim Hahn, retrieving the e-mail address of each entry found. LDAP lets
you do this easily. Or you might want to search the entries directly below the c=US entry for
organizations with the string Acme in their name and that have a FAX number. LDAP lets you
do this also.
The LDAP bind operation is used to indicate to the LDAP server who is going to be making
add/modify/search/compare or delete requests. The LDAP bind operation is an
authentication process. This authentication process can be used by distributed applications
which need to implement some form of authentication.
UNBIND,
ABANDON
o=IBM o=Tivoli
oc=organization o=Lotus
o=Tivoli
o=IBM
Schema
oc=person
cn=Tim Hahn
[email protected]
[email protected]
In z/OS can be:
DB2 tables
RACF data base
IODF data
However, for the designer of an LDAP directory, it is not so much the structure of the
messages being sent and received over the wire that is of interest. What is important is the
logical model that is defined by these messages and data types, how the directory is
organized, what operations are possible, how information is protected, and so forth.
z/OS
IODF
IODF Only in
schema
HCD IIS LDAP
RMF RMF
RMF DDS schema
LDAP client TCP/IP slapd SDBM RACF
LDAP client
stack daemon RACF schema
LDAP V3
Basic auth Only in
LDBM ACL
SSL/TLS HFS zFS ITDS
schema
Kerberos
CRAM-MD5 GDBM
config
Digest-MD5
TDBM ACL
LDAP DB2 schema
client EXOP
USS
Schemas are another important part of LDAP. Schemas define the type of objects that can be
stored in the directory. Schemas also list the attributes of each object type and wether these
attributes are required or optional.
The LDAP configuration utility helps you configure new LDAP server instances with minimal
user interaction.
The LDAP configuration utility takes a profile file as input and generates a set of output
members in a data set to facilitate an LDAP server configuration. The profile file is targeted for
the System Administrator (or System Programmer) and the LDAP Administrator and it
contains statements that must be updated with appropriate values. The LDAP configuration
utility generates a series of JCL members, configuration files, and a procedure to start the
LDAP server. The JCL jobs are segregated based on typical administrative roles in a z/OS
installation and contain the required commands to configure the z/OS components used by
the LDAP server. Each administrator is responsible for reviewing and submitting their JCL job.
After all JCL jobs are submitted, each administrator is responsible for reviewing their job’s
output and addressing any errors that might have occurred. When all JCL jobs have
completed successfully, the LDAP server can be started.
The minimal user interaction with the utility and the jobs it produces to update the required
z/OS components results in a simplified approach to LDAP configuration. This approach
allows novice LDAP users and administrators and even novice z/OS users to quickly deploy
an LDAP server. In addition, the utility does not restrict the configuration of advanced LDAP
features, such as referrals, replication, password encryption, and sysplex setup.
Assumes that RACF is the security server in use. If not the resulting
JCL job needs to be converted to properly update the security server in
use.
All values in the input files must be less than 66 bytes in length
and must contain only printable characters in the IBM-1047 code page.
All values in the input files must be less than 66 bytes in length
and must contain only printable characters in the IBM-1047 code page.
Outputs
Error messages if required variables are not assigned values in the input file or
fail simplified syntax checking
Warning messages if overwriting existing output data set
Multiple JCL jobs that will update the various z/OS components
PROG member to establish APF Authorization
Configuration files for various components
PROC to start the server
Format
The format of this command is as follows:
ldapcnf -i profile_file or dsconfig -i profile_file
where:
profile_file specifies the input file that contains statements necessary to configure the
LDAP server.
Example 6-1 shows an example using ldapcnf, where ldap.profile is in the /home/u
directory.
In this file there are statements containing a keyword and value which must have the
appropriate value for the target system being configured.
Example 6-2 shows a sample portion of the ldap.profile file. The LDAPUSRID statement, as
shown in the example, has a pre-assigned value of GLDSRV. Above the statement there is
some commentary that describes the statement and its usage.
# LDAPUSRID <user_id>
#
# Description:
# User ID for the LDAP server to run under.
#
# Note:
# This variable’s value must be capitalized.
# ---------------------------------------
LDAPUSRID=’GLDSRV’
Most of the statements in the ldap.profile are required and those that are not required are
labelled as optional. Some statements in the ldap.profile have pre-assigned values; however,
they might not be valid on the target system being configured. Values must be provided for all
required statements in the ldap.profile file.
The ldap.profile file embeds three other advanced input files.All of the input files are in the
same format as an environment variable file.
The output from ldapcnf is written to an output data set that you specify in ldap.profile. If the
data set does not exist, the utility allocates the output data set for you.
ldap.profile/
ds.profile SLAPDENV
ldapcnf
ldap.db2.profile/ DBCLI
ds.db2.profile
RACF
ldap.racf.profile/ DBSPUFI
ds.racf.profile
PRGMCTRL
DSNAOINI
Security
Database
Administrator Administrator
Each administrator is responsible for updating input files in addition to reviewing and
submitting jobs in the output members that the LDAP configuration utility produces for their
component.
Note: If configuring SDBM and password encryption, the Security Administrator must have
read/write authority on all files in the /usr/lpp/ocsf/lib and /usr/lpp/ocsf/addins directories.
"root"
Object Classes definitions
c=US c=UK objectclass person
oc=country
c=US
requires : cn
objectClass
o=IBM allows: mail
o=Lotus o=Tivoli
oc=organization
o=IBM
objectclass organization
Data is stored in the directory using directory entries. An entry consists of an object class,
which is required, and its attributes. Attributes can be either required or optional. The object
class specifies the kind of information that the entry describes and defines the set of
attributes it contains. Each attribute has one or more associated values.
The schema is published as part of the directory information, and is available in the
Subschema entry (DN="cn=schema").
The schema has more configuration information than that included in the LDAP Version 3
Request For Comments (RFCs) or standard specifications. For example, for a given attribute,
you can state which indexes must be maintained. This additional configuration information is
maintained in the subschema entry as appropriate. An additional object class is defined for
the subschema entry IBMsubschema, which has MAY attributes that hold the extended schema
information.
Tivoli Directory Server requires that the schema that is defined for a naming context be stored
in a special directory entry, "cn=schema". The entry contains all of the schema defined for the
server. To retrieve schema information, you can perform an ldap_search using the following:
DN: "cn=schema", search scope: base, filter: objectclass=subschema
or
DN: "cn=schema", search scope: base, filter: objectclass=*
ObjectClasses
AttributeTypes
IBMAttributeTypes
Matching rules
LDAP syntaxes
The schema is represented and stored as another entry in the directory. Example 6-3 shows
a portion of the schema entry.
The objectClass values specified for the schema entry are top, subEntry, subSchema, and
ibmSubschema. This set of object classes result in the objectClass, cn, and
subtreeSpecification attributes being required for a schema entry and the attributeTypes,
objectClasses, ldapSyntaxes, matchingRules, and ibmAttributeTypes attributes being
allowed in a schema entry.
Attribute types
Attribute types define the characteristics of the data values stored in the directory. Each
attribute type defined in a schema must contain a unique numeric object identifier and
optionally contain a textual name, zero or more alias names, and a description of the attribute
type. The characteristics defined for each attribute type include the syntax, length, and
matching rules.
Matching rules
Matching rules allow entries to be selected from the database based on the evaluation of the
matching rule assertion. Matching rule assertions are propositions that might evaluate to true,
false, or undefined concerning the presence of the attribute value or values in an entry.
The z/OS LDAP server is shipped with predefined supported matching rules. The set of
matching rules cannot be changed, added to, obsoleted, or deleted by users.
Object classes
Object classes define the characteristics of individual directory entries. The object classes
listed in a directory entry determine the set of required and optional attributes for the entry.
Each object class defined in a schema must contain a unique numeric object identifier and
optionally contain a textual name, zero or more alias names, a description of the object class,
and lists of required (MUST) or optional (MAY) attribute types.
LDAP syntaxes
Each attribute type definition includes the LDAP syntax which applies to the values for the
attribute. The LDAP syntax defines the set of characters which are allowed when entering
data into the directory. The z/OS LDAP server is shipped with predefined supported syntaxes.
The set of syntaxes cannot be changed, added to, or deleted by users.
For each file, find the following line and replace <suffix> with one of the suffixes defined for
the back end in the LDAP server configuration file:
“dn: cn=schema, <suffix>”
Make your updates, and then run the ldapmodify command from the z/OS shell specifying the
host, port, bind DN, password, and schema file for each schema file to load the schema into
the directory.
Authentication operations:
Bind: Initiates an LDAP session between a client and a server. Allows the client to prove
its identity by authenticating itself to the server.
Unbind: Terminates a client/server session.
Abandon: Allows a client to request that the server abandon an outstanding operation.
Security model
The security model is based on the bind operation. There are several different bind
operations possible, and thus the security mechanism applied is different as well. One
possibility is when a client requesting access supplies a DN identifying itself along with a
simple clear-text password. If no DN and password is declared, an anonymous session is
assumed by the LDAP server. The use of clear text passwords is strongly discouraged when
the underlying transport service cannot guarantee confidentiality and can, therefore, result in
disclosure of the password to unauthorized parties.
Furthermore, extended protocol operations are available in LDAP V3. An extension related to
security is the Extension for Transport Layer Security (TLS) for LDAPv3. This allow operations
too use TLS as a means to encrypt an LDAP session and protect against spoofing. TLS has a
mechanism which enables it to communicate to an SSL server so that it is backwards
compatible. The basic principles of SSL and TLS are the same.
dn="racfid=auster,profiletype=user,o=IBM"
pw=<password> bind request
ldap_bind_s(ld,host,port,dn,pw)
z/OS
LDAP LDAP Server
Client SDBM
(API)
successful bind
dn: racfid=auster,profiletype=user,o=IBM
objectclass=racfUser
objectclass=racfBaseCommon
objectclass=racfBaseUserSegment RACF userId
racfid=AUSTER
RACF DB
racfprogrammername=James Auster
racfdefaultgroup=racfid=groupid,profiletype=GROUP,sysplex=...
Using SDBM, the RACF database back end of the LDAP server, you can:
Add new users and groups to RACF
Add users to groups (connections)
Modify RACF information for users and groups
Retrieve RACF information for users and groups
Delete users and groups from RACF
Remove users from groups (connections)
Retrieve RACF user password envelope
The SDBM database of the LDAP server implements portions of the adduser, addgroup,
altuser, altgroup, deluser, delgroup, listuser, listgrp, connect, remove, and search RACF
commands. An individual user has the same authority through SDBM as with normal RACF
commands. The SDBM database of the LDAP server makes use of the R_Admin run
command interface to accomplish its access to RACF data. As a result, this support is subject
to the restrictions of the R_Admin interface. One restriction in particular affects return of
search results.
If the SDBM database is to be used for authentication purposes only, consider having your
clients use the authenticateOnly server control, to streamline bind processing. This
supported control overrides any extended group membership searching and default group
membership gathering and is supported for Version 3 clients.
Note: The SDBM back end only updates the default RACF on a given system. That is, the
AT and ONLYAT clauses of the RACF commands, used to redirect RACF commands, are
not exploited by SDBM.
Note: The use of RACF passtickets is supported by the z/OS LDAP server. It is
recommended that the LDAP server be run as a started task if RACF passticket support
will be used. The job name that is associated with the LDAP Server started task should be
used as the application name when generating RACF passtickets.
successful bind
Directory
Note: Entries that are added and subject to Native Authentication cannot contain the
userpassword attribute.
useNativeAuth <selected|all|off>
selected - entries located in native subtrees that contain the
ibm-nativeId attribute
all - every entry in native subtrees will use native authentication
with ibm-nativeId or uid attribute
off - Native Authentication is disabled
In order for an entry to bind natively or perform a native password modify, that entry must
contain a mapping to the Security Server identity that is associated with the user. This can be
accomplished by using either the ibm-nativeId attribute or the uid attribute that is defined in
schema.user.ldif. If your directory entries already contain a single-valued uid attribute (which
holds the Security Server user ID), then these entries are already configured for native
authentication if you plan on using the useNativeAuth all option. If you do not plan on using
uids for mapping, then you can specify the ibm-nativeId attribute for your Security Server ID
associations and this attribute is used with selected or all specified for the useNativeAuth
option. If both the ibm-nativeId and uid attributes exist in an entry, the ibm-nativeId value is
used. The user ID specified by either the uid or ibm-nativeId attributes must contain a valid
OMVS segment in the Security Server.
If you use the useNativeAuth option, also specify the nativeUpdateAllowed option to enable
native password changes in the Security Server to occur through the TDBM back end.
As mentioned, there are two LDAP operations affected: bind and password modify. There is a
set of criteria that is used to determine if an entry actually participates in native
authentication. This criteria changes depending on the configuration options that have been
selected.
Note: If the DN that is listed in the nativeAuthSubtree option contains a space character in
it, then the entire DN must be enclosed in quotation marks in the configuration file.
cn=You,o=IBM,c=US
-userpassword=oldpassword
+userpassword=newpassword
If the ldapmodify command fails with LDAP return code LDAP_INVALID_CREDENTIALS and the
following LDAP reason code, then it is possible to change the RACF password of a TDBM
entry participating in native authentication by doing an LDAP simple bind:
R004109 The password has expired.
The forward slash (/) is used as the indication of a password change during the LDAP simple
bind. Password changes made using the LDAP simple bind to a TDBM entry participating in
native authentication are subject to the system password rules. A password change will fail
with LDAP return code LDAP_INVALID_CREDENTIALS and LDAP reason code of:
R004128 Native authentication password change failed: The new password is not
valid, or does not meet requirements.
if the new password does not pass the rules established on the system.
Note that when the bind succeeds, the password is changed even if the LDAP function
eventually fails.
Note: LDAP ACLs must be set properly to allow update of the userpassword attribute for
the password modification to complete successfully. The distinguished name provided on
the -D parameter of the ldapmodify command must have authority to update the
userpassword attribute. To allow each individual user to update their own password, an
LDAP ACL should be established to permit them to write userpassword attribute values.
You can also use the special cn=this identity entry to establish the LDAP ACL.
You should substitute the root of your directory tree for the dn: o=Your Company line in the
LDIF file to allow each user who is defined for native authentication to update the RACF
password through LDAP.
ldapservicename=hostname@REALM
In the z/OS LDAP server, Kerberos is used for authentication only. The Kerberos options for
integrity and confidentiality are not supported. Authorization information for ACLs is gathered
by the LDAP server after the authentication process has completed and is based on the
Kerberos identity of the bound client.
Install and configure the z/OS Network Authentication and Privacy Service
Kerberos on the machine where the LDAP server will run.
Create the LDAP servers Kerberos KDC account.
Optionally generate the servers keytab file (if not on the same system as
the KDC)
Specify the necessary Kerberos options in the slapd.conf file
User
Note: From this point forward in this discussion, we use the phrase GSS API bind to refer
to Kerberos Version 5 binds.
Before you attempt to perform a Kerberos GSS API bind, be sure to:
1. Have the Network Authentication and Privacy Service (Kerberos 5) installed and
configured and the service started.
2. Create a Kerberos identity for the user ID that will start the LDAP server. For example:
ALTUSER LDAPSRV PASSWORD(password) NOEXPIRED
KERB(KERBNAME(ldap_prefix/hostname))
In this command, ldap_prefix is either “LDAP” or “ldap” and hostname is the primary host
name for the system in DNS.
If the KDC and LDAP server are on the same system, you do not need a keytab file. If the
ID which starts the LDAP server has READ access to the IRR.RUSERMAP facility class in
RACF, then you can use this instead of a keytab file as follows:
RDEFINE FACILITY IRR.RUSERMAP UACC(NONE)
PERMIT IRR.RUSERMAP CLASS(FACILITY) ID(LDAPSRV) ACCESS(READ)
SETR RACLIST(FACILITY) REFRESH
4. Enable your configuration file for Kerberos authentication.
# Global Section
supportKrb5 yes
serverKrbPrinc LDAP/[email protected]
krbLDAPAdmin [email protected]
krbKeytab none
# TDBM Section
krbIdentityMap on
# SDBM Section krbIdentityMap on
5. Start your server. Your LDAP server is now configured with Kerberos support.
Note: The “LDAP” portion of the serverKrbPrinc identity can either be “ldap” or “LDAP” in
the configuration file and in the Kerberos segment of the RACF ID where it is defined.
Check your KDC for case requirements.
New schema files that must be loaded into the LDAP Server to
enable GSSAPI authentication :
MS.ActiveDirectory.ldif and SecurityIdentities.ldif
Attributetypes
krbRealmName-V2
krbPrincSubtree
krbPrincipalName
krbAliasedObjectName
krbHintAliases
altSecurityIdentities
ibm-kn or ibm-kerberosName
Objectclasses
krbRealm-V2
ibm-securityIdentities
krbAlias
krbPrincipalName (no object class) The attribute is used to define the entry’s
Kerberos identity. This attribute is used for
identity mapping. Currently this attribute is not
associated with an object class. This means that
for an entry to contain this attribute you can add
the object class extensibleObject or define and
add your own object class.
racfId=JEFF,profiletype=user,sysplex=plex1
Default mapping
The GSS API bind operation passes a Kerberos identity to the LDAP server which in its initial
form cannot be used for access control in the server. This Kerberos identity known as
<principal>@<REALM> is converted to a DN of the form ibm-kn=<principal>@<REALM>. Now
this Kerberos DN can be used in access control lists.
For example, if you performed a Kerberos bind as [email protected], you are mapped to
[email protected] and this DN is added to a list of DNs that are used for access control
throughout the server. This process is known as the default mapping and is always performed
when a SASL bind with a mechanism of GSS API is performed.
SDBM mapping
If an SDBM back end is configured and the krbIdentityMap configuration is on, then the
SDBM back end tries to map the Kerberos identity to the appropriate RACF ID. If a RACF ID
is found, then the SDBM DN that represents the RACF ID is added to the list of DNs.
dn: cn=Tim,o=Lotus,c=US
objectClass: krbAlias
krbHintAliases: cn=Jeff,o=Lotus,c=US
altSecurityIdentity
dn: cn=Jeff,o=IBM,c=US
objectclass: ibm-securityIdentities
altSecurityIdentity: KERBEROS:[email protected]
dn:cn=Jeff,o=Lotus,c=US
dn: cn=Scott,o=IBM,c=US objectClass: krbAlias
aclEntry: objectClass: extensibleObject
[email protected]:normal:rw krbPrincipalName:[email protected]
krbAliasedObjectName:cn=Tim,
o=Lotus,c=US dn:racfId=JEFF,profiletype=user,
sysplex=plex1
KERBNAME:[email protected]
dn: krbRealmName-V2=IBM.COM,
o=Lotus,c=US
dn:cn=Ken,o=IBM,c=US objectClass: krbRealm-V2
aclEntry:cn=Jeff,o=IBM, krbRealmName-V2: IBM.COM
c=us:normal:rw krbPrincSubtree: o=Lotus,c=US
dn: cn=Tim,o=Lotus,c=US
dn:cn=Jeff,o=IBM,c=US objectClass: krbAlias
objectClass:ibm-securityIdentities krbHintAliases:
altSecurityIdentities = cn=Jeff,o=Lotus,c=US
KERBEROS:[email protected]
dn: cn=Shayne,o=Lotus,c=US
aclEntry: cn=Tim,o=Lotus,c=US:normal:w
aclEntry:racfId=JEFF,profiletype=user,
sysplex=plex1:normal:r
The user Jeff with a Kerberos identity of [email protected] is performing a Kerberos GSS API
bind to an LDAP server that is configured with an LDBM, a TDBM, and a SDBM back end.
During the bind process, the Kerberos identity [email protected] by default is mapped to
[email protected], and this value is added to the list of DNs that is used for access
control.
After default mapping is performed, each of the back ends attempt to perform identity
mapping:
1. The LDBM back end first looks for the Kerberos realm object with a
krbRealmName-V2=IBM.COM and does not find one. Then, the back end attempts to find the
entry that contains altSecurityIdentities=KERBEROS:[email protected]. The entry with the
DN cn=Jeff,o=IBM,c=US matches this criteria, and the DN is added to the alternate DN
list.
2. Next, the server moves to the TDBM back end and tries to find the Kerberos realm object
with a krbRealmName-V2=IBM.COM. This time, the realm object is found so all of the
krbPrincSubtree values of the realm object are collected. Then, the server searches each
of these subtrees (in this example, only the o=Lotus,c=US subtree) for entries that contain
Note: If the value cn=Jeff,o=Lotus,c=US did not exist in Tim’s krbHintAliases, then
Tim did not want you to alias him. So, the DN cn=Tim,o=Lotus,c=US is not added to the
DN list.
3. Finally, the server gets to the SDBM back end and invokes a RACF API that attempts to
map the Kerberos identity [email protected] to its associated RACF ID. In this example, the
API returns the Jeff user ID, and the DN racfid=JEFF,profiletype=user,sysplex=plex1
is constructed and added to the list of access control DNs.
At this point, the bind has completed and the list of DNs that is used for access control is as
follows:
[email protected]
cn=Jeff,o=IBM,c=Us
cn=Jeff,o=Lotus,c=Us
cn=Tim,o=Lotus,c=US
racfid=JEFF,profiletype=user,sysplex=plex1
Now that [email protected] is bound to the server and the list of alternate DNs has been
generated, Jeff now has authority to perform other operations as follows:
Because [email protected] was mapped to [email protected], Jeff has read and write
permission to normal data in the cn=Scott,o=IBM,c=US entry.
The Kerberos identity [email protected] also has read and write permission to the normal data
in the cn=Ken,o=IBM,c=US entry because his identity is also mapped to
cn=Jeff,o=IBM,c=US.
Modify operations are permitted on the cn=Shayne,o=IBM,c=US entry because
[email protected] is also mapped to cn=Tim,o=Lotus,c=US and Tim has write access to Shayne.
Read access is also permitted on the cn=Shayne,o=IBM,c=US entry because [email protected]
is mapped to the SDBM DN racfid=JEFF,profiletype=user,sysplex=plex1 who has read
permission to the cn=Shayne,o=IBM,c=US entry.
This example shows that access control is based on the combination of all the mapped DN’s
access control permissions.
ACLs are represented by a set of attributes that appear to be a part of the entry. The
attributes that are associated with access control, such as entryOwner, ownerPropagate,
aclEntry, and aclPropagate, are unusual in that they are associated logically with each entry
but can have values that depend upon other entries that are higher in the directory hierarchy.
Depending upon how they are established, these attribute values can be explicit to an entry or
can be inherited from an ancestor entry.
Use of LDAP’s SDBM back end allows a user to be authenticated to the directory namespace
using the RACF ID and password. The RACF identity becomes associated with the user’s
RACF-style distinguished name that was used on the LDAP bind operation. It is then possible
to set up ACLs for entries managed by the LDBM, TDBM, or GDBM back end using
ACL model
Let us begin with looking at the ACL model. The ACL model is based on two sets of attributes:
The entryOwner information
The Access Control Information (ACI)
In conformance with the LDAP model, the ACI and the entryOwner information both are
represented as attribute-value pairs. You use the LDIF syntax to administer these values.
entryOwner information
The entry owners have complete permissions to perform any operation on the object
regardless of the aclEntry. Additionally, the entry owners are the only ones who are permitted
to administer the aclEntries for that object. entryOwner is an access control subject, it can be
defined as individuals, groups or roles. The attributes that define the entry ownership are as
follows:
entryOwner: Defines an entry owner
ownerPropagate: Specifies whether the owner set is propagated to the children.
Note: The directory administrator and administration group members are the entry owners
for all objects in the directory by default, and this entry ownership cannot be removed from
any object.
ACI is further split, depending upon the way intended to specify the ACLs. We can specify the
ACLs, whereby we specify a set of rights to the user cn=user1,o=IBM,c=US over the current
object. The descendants also might be impacted depending upon the setting of the
aclPropagate attribute. Such ACLs are known as non-filtered ACLs.
Alternatively, you can also specify the set of rights to the user cn=user1,o=IBM,c=US over a set
of objects conforming to the filter cn=a*, which is a more generalized way of setting ACLs.
Such ACLs are called filtered ACLs. It is as easy as that. Below is the classification in more
detail.
Non-filtered ACLs
This type of ACL applies explicitly to the directory entry that contains them but can be
propagated to none or all of its descendant entries. The default behavior of the non-filtered
ACL is to propagate. The attributes that define non-filtered ACLs are:
aclEntry: Defines a permission set
aclentry=access-id:CN=USER1,O=IBM,C=US:normal:rsc:normal:deny:w
aclPropagate: Specifies whether the permission set is propagated to the descendant
entries
aclpropagate=TRUE
Filter-based ACLs do not propagate in the same way that non-filter-based ACLs currently do.
By nature, they inherently propagate to any comparison matched objects in the associated
subtree. For this reason, the aclPropagate attribute, which is used to stop propagation of
non-filter ACLs, does not apply to the new filter-based ACLs.
Note: The key thing to remember in the case of filtered ACLs is that the filter that you
specify is for the objects that are impacted and not the subject. This filter is often misread
as the set of subjects, rather than objects.
Similarly, if no entry owner is specified when the suffix entry is created, entryOwner is added
to the entry with a value set to the administrator DN, along with ownerPropagate TRUE.
Similarly, every entry must have an entry owner. If none is specified or inherited, a default
entryOwner value set to the administrator DN is assigned to the entry. The default value
cannot be deleted. If an entryOwner value is later added to the entry, explicitly or by
inheritance, the entire default entryOwner value is replaced. The LDAP server sets the value
of the ownerSource attribute to default when the entry is using the default owner.
Access evaluation
Access for a particular operation is granted or denied based on the subject’s bind DN for that
operation on the target object. Processing stops as soon as access can be determined.
The checks for access are done by first determining the entry ownership and then evaluating
the object’s Access Control Information (ACI) values.
Filter-based ACLs accumulate from the lowest containing entry, upward along the ancestor
entry chain, to the highest containing entry in the DIT. The effective access is calculated as
the union of the access rights granted, or denied, by the constituent ancestor entries. The
existing set of specificity and combinatory rules are used to evaluate effective access for filter
based ACLs.
Filter-based and non-filter-based attributes are mutually exclusive within a single containing
directory entry. Placing both types of attributes into the same entry is not allowed, and is a
constraint violation. Operations that are associated with the creation of, or updates to, a
directory entry fail if this condition is detected.
When calculating effective access, the first ACL type to be detected in the ancestor chain of
the target object entry sets the mode of calculation. In filter-based mode, non-filter-based
ACLs are ignored in effective access calculation. Likewise, in non-filter-based mode,
filter-based ACLs are ignored in effective access calculation.
By default, the directory administrator, administration group members, and the master server
(or peer server for replication, that is, ibm-slapdMasterDN) get full access rights to all objects
in the directory except write access to system attributes. Other entry owners get full access
rights to the objects under their ownership except write access to system attributes. By
default all users have read access rights to normal, system, and restricted attributes. If the
requesting subject has entry ownership, access is determined by the above default settings
and access processing stops.
If the requesting subject is not an entryOwner, then the ACI values for the object entries are
checked. The access rights as defined in the ACLs for the target object are calculated by the
specificity and combinatory rules.
Specificity rule
The most specific aclEntry definitions are ones that are used in the evaluation of permissions
that are granted or denied to a user. The levels of specificity are:
The access-id is more specific than group or role. Groups and roles are on the same
level.
Within the same dnType level, individual attribute level permissions are more specific than
attribute class level permissions.
Within the same attribute or attribute class level, deny is more specific than grant.
For example, if a defined ACI entry contains an access-id subject DN that matches the bind
DN, then the permissions are first evaluated based on that aclEntry. Under the same subject
DN, if matching attribute level permissions are defined, they supersede any permissions
defined under the attribute classes. Under the same attribute or attribute class level definition,
if conflicting permissions are present, denied permissions override granted permissions.
Combinatory rule
Permissions granted to subjects of equal specificity are combined. If the access cannot be
determined within the same specificity level, the access definitions of lesser specific level are
used. If the access is not determined after all defined ACIs are applied, the access is denied.
For example, consider the following two cases of ACIs defined on cn=user1,o=IBM,c=US:
Case 1:
access-id: cn=this: at.attribute1:grant:rws
access-id: cn=user1,o=IBM,c=US:at.attribute1:grant:rs:at.attribute1:deny:w
In this example, the (w)rite permission on attribute1 is denied to the user
cn=user1,o=IBM,c=US because access cannot be explicitly determined.
Case 2:
(cn=user1,o=IBM,c=US belongs to group cn=group1)
access-id: cn=this: at.attribute1:grant:rws
access-id: cn=user1,o=IBM,c=US:at.attribute1:grant:rs:at.attribute1:deny:w
group:cn=group1:at.attribute1:grant:w
In this case, after failing to determine access at the specificity level of access-id, the
access definitions of lesser specific levels (group) is determined. Because the group has
write permissions on attribute1, write permission will be granted to cn=user1,o=IBM,c=US.
Example
aclEntry: cn=tim,o=tworld:normal:rwsc:
sensitive:deny:rwsc:at.userpassword:w
Then, add the this LDIF file using the following syntax:
# ldapadd -D <admin dn> -w <admin password> -f acl.ldif
In a similar manner, you can add a group or role as an entry owner. The example is for an
(access-id) as the entry owner. The other examples that we show in this section follow a
similar method for the additions.
The next example shows how an access ID cn=Person 1, o=IBM,c=US is given permissions
to read, search, and compare the attribute attribute1. The permissions apply to any node in
the entire subtree that is at or below the node containing this ACI, that matches the
(objectclass=groupOfNames) comparison filter. The accumulation of matching
ibm-filterAclEntry attributes in any ancestor nodes has been terminated at this entry by
The next example shows how a role cn=System Admins,o=IBM,c=US is given permissions to
add objects below the node o=IBM,c=US, and read, search, and compare attribute attribute2
and the (critical) attribute class. The permission applies only to the node containing this
ACI. This is achieved by setting the aclPropagate attribute to FALSE.
dn: o=IBM,c=US
objectlass: organization
o: ibm
aclEntry: role:cn=System
Admins,o=IBM:object:grant:a:at.attribute2:grant:rsc:critical:grant:rsc
aclPropagate: false
Where:
action is one of the following values:
– replace: If the attribute value does not exist, create the value. If the attribute value
exists, replace the value.
– add: If the ACI or entryOwner does not exist, the ACI or entryOwner with the specific
values is created. If the ACI or entryOwner exists, then add the specified values to the
given ACI or entryOwner.
– delete: Deletes an ACL entry with a given value.
acl-attribute is one of entryOwner, ownerPropagate, aclEntry, aclPropagate,
ibm-filterAclEntry, or ibm-filterAclInherit.
value is the value of the given attribute.
For example, consider any entry cn=person1,o=IBM,c=US with the following ACL definition:
aclentry=access-id:CN=ABC:object:deny:d:object:a
aclentry=access-id:CN=P1,O=IBM,C=US:normal:rwsc:object:a
Note: You can put the four lines after the line of ldapmodify in this example in an LDIF file
and pass the file to ldapmodify using the -f option. Remember that ldapmodify and
ldapadd ultimately function as the same utility.
After the command in the example above, only the second aclEntry remains as follows:
aclentry=access-id:CN=P1,O=IBM,C=US:normal:rwsc:object:a
In this ldapmodify operation, the value of ACL entry to be removed is given as:
ldapmodify -D <admindn> -w <adminpw>
dn: ou=person1,o=IBM,c=US
changetype: modify
delete: aclentry
aclentry: access-id:CN=ABC:object:deny:d
Note: We have not given the object add (object:a) permission in the aclEntry value.
In such a scenario, both the ACL entries remain, but the deny permissions on object delete
(object:deny:d) is removed from the first ACL entry. The value of the delete entry in the ACL
entry is changed from deny to unspecified.
ou=payroll,o=IBM,c=US
ownerPropagate=TRUE
aclPropagate=FALSE
entryOwner=access-id:CN=ROOT
aclEntry=access-id:CN=USER1,O=IBM,C=US:system:deny:rsc:critical:deny:rwsc:sensi
tive:deny:rwsc:normal:rwsc:restricted:deny:rwsc
cn=accountant,ou=payroll,o=IBM,c=US
ownerPropagate=TRUE
aclPropagate=TRUE
entryOwner=access-id:CN=ROOT
aclEntry=access-id:CN=USER1,O=IBM,C=US:object:ad:normal:r
In this example, two entries are returned with the ACL showing that these are non-filtered
ACLs.
We run the same search against an entry with filtered ACLs as follows:
E:\>ldapsearch -D cn=root -w root -b ou=hr,o=IBM,c=US objectclass=* aclEntry
aclPropagate entryOwner ibm-filterAclEntry ibm-filterAclInherit ownerPropagate
ou=hr,o=IBM,c=US
ownerPropagate=TRUE
ibm-filterAclInherit=TRUE
entryOwner=access-id:CN=ROOT
z/OS
IODF
IODF Only in
schema
HCD IIS LDAP
RMF RMF
RMF DDS schema
LDAP client TCP/IP slapd SDBM RACF
LDAP client
stack daemon RACF schema
LDAP V3
Basic auth Only in
LDBM ACL
SSL/TLS HFS zFS ITDS
schema
Kerberos
CRAM-MD5 GDBM
config
Digest-MD5
TDBM ACL
LDAP DB2 schema
client EXOP
USS
The LDAP server also depends on the SCEERUN and SCEERUN2 data sets. Add these to
your LINKLIST or, if that is not possible, add it to STEPLIB.
The default data set characteristics for record format and record length (V 255) which OGET
will use when creating a new data set are not acceptable for JCL when submitting for batch
processing. In order to avoid this, allocate the MYUSER.DSNTIJCL sequential data set to be
fixed block 80 prior to performing the OGET operation.
A data set version of the DSNAOINI file needed for the TDBM back end can be created by
copying and editing the default file provided by DB2. The DSNAOINI file can be specified
either in the configuration file or in a DSNAOINI DD statement, or a DSNAOINI environment
variable can be used. The DD statement takes precedence.
Note: Be sure to turn off the use of sequence numbers when editing this data set.
When the data set versions of these files are available, they can be specified in the LDAPSRV
procedure. The configuration file can be specified using the CONFIG DD statement, the
envvars file can be specified using the ENVVAR DD statement, and the DSNAOINI file can be
specified using the DSNAOINI DD statement.
Note: Using the LDAP configuration utility (ldapcnf or dsconfig) to configure your server
creates all the necessary files in a partitioned data set.
Note: You can use any LDAP client to verify the LDAP server.
The following examples show how to verify the LDAP server using the ldapsearch tool:
Verifying LDBM and TDBM
The previous ldapsearch examples assume a default port of 389. If your port is not 389, use
the -p parameter to specify the correct port.
Be sure to substitute the correct TCP/IP host name or TCP/IP address for the 127.0.0.1 after
the -h parameter. The -b parameter specifies the starting point for the search. The use of the
quotation marks around the filter prevents the asterisk (*) from being interpreted by the shell.
Note that you can verify the LDAP server from TSO as well by substituting LDAPSRCH for
ldapsearch.
LDAP Server
o=ibm, c=us
Replication
After the z/OS LDAP server is installed and configured, users can access the directory, add
objects, delete objects, or perform search operations to retrieve particular sets of information.
There are several benefits realized through replication. The single greatest benefit is
providing a means of faster searches. Instead of having all search requests directed at a
single server, the search requests can be spread among several different servers. This
improves the response time for the request completion.
Additionally, the replica provides a backup to the replicating server. Even if the replicating
server crashes, or is unreadable, the replica still fulfills search requests and provides access
to the data.
Note: The z/OS support for peer-to-peer replication is provided for failover support
purposes. There is no support for resolving conflicting simultaneous updates on multiple
peer servers, which can cause a failure of replication. As a result, you need to target
updates to one peer server at a time.
A replication network can contain both peer replica servers and read-only replica servers. In
this case, each peer server must act as a master to each read-only replica (in addition to
being a peer to all the peer servers), so that updates that occur on any peer server are
replicated to all the other peer and read-only replicas in the network.
Replication is only supported when the servers involved are running in single-server mode.
Although replication is not supported when operating multiple concurrent server instances
against the same database (multi-server operating mode), similar benefits are afforded when
operating in this mode.
Replicating server
For the replication process to occur, the following tasks must happen:
The replicating server (master or peer) must be aware of each replica that is to receive the
change information.
Each read-only replica must be aware of the replicating server for the database that it
serves.
The replicating server becomes aware of the existence of the replica servers when objects
(entries) of type replicaObject are added to the directory. Each of these objects represents a
particular replica server. The attribute/value pairs within the replica object provide the
information the replicating server needs in order to find the replica server and send any
updates to that server.
Note: The replicaObject object class is provided in the system schema file
schema.user.ldif.
Replica server
Initialization, or population, of a replica database requires several steps.
Special Note: If the replicating server is configured with TDBM, changes to the schema
entry on the replicating server are not replicated. The schema on the replica must be
modified by a user bound as the masterServerDN or peerServerDN. A separate update of
the replica schema is required each time the schema is updated on the replicating server.
If you are modifying the schema on a TDBM read-only replica and are not bound as the
masterServerDN, the masterServer configuration option causes the modification to be
redirected to the replicating server, which causes the schema on the replica and replicating
servers to be out of synchronization. No error message occurs.
Note: To load the replicaObject entry, you must also load any parent entries in the
directory hierarchy in hierarchy order.
5. If the replicating server does not contain any entries, no further action must be taken to
ensure that the replica and replicating server are in synchronization and the replicating
server can now be restarted; otherwise, continue to the next step.
6. Transport the LDIF file created in step 2 to the replica server’s location.
7. Run a load utility on the replica server using the LDIF file from step 6. For TDBM, stop the
replica server if it is running and use ldif2tdbm.
Note: The ldif2tdbm utility does not replicate changes when adding entries to the
replicating server. So, if you are using ldif2tdbm to add entries to a replicating server you
must also use it to add entries to each replica, with no intervening updates on the
replicating server before the replica is loaded.
Referrals
Referrals provide a way for servers to refer clients to additional directory servers. With
referrals you can:
Distribute namespace information among multiple servers
Provide knowledge of where data resides within a set of interrelated servers
Route client requests to the appropriate server
In z/OS LDAP, referral entries are only supported in the TDBM (DB2-based) back end. The
default referral can be used with any type of back end.
dn Specifies the distinguished name. It is the portion of the namespace served by the
referenced server.
objectclass Specifies referral. For entries in TDBM, also include the object class
extensibleObject.
ref Specifies the LDAP URL of the server. This URL should consist of the ldap:// or
ldaps:// identifier, the hostname:port, and a DN. The DN requires a slash (/) before
it to delimit it from the hostname:port, and should match the DN of the referral
object. The ref attribute can be multi-valued, with each value specifying the LDAP
URL of a different server. When multiple values are used, each LDAP URL should
contain the same DN, and each server should hold equivalent information for the
portion of the namespace represented by the DN.
The server can have any number of referral objects within its database. However, the objects
must essentially be descendents of its suffix.
The default referral LDAP URL does not include the DN portion. It needs just the ldap://
identifier and the hostname:port. For example:
referral ldap://host3.ibm.com:999
SSL/TLS note: A non-secure client referral to a secure port is not supported. Also, a
secure client referral to a non-secure port is not supported.
LDBM
Update TDBM
Change log
entries added
GDBM
Changelog
LDAP Server
Figure 6-36 LDAP change logging
You can use an LDAP search operation to retrieve change log entries to obtain information
about what changes have taken place. Each LDAP server contains one change log. The
change log entries are created in the same order as the changes are made and each change
log entry is identified by a change number value, beginning with 1, that is incremented each
time a change number is assigned to a change log entry. Therefore, the change number of a
new change log entry is always greater than all the change numbers in the existing change
log entries.
The change log is implemented in the GDBM back end. The change log uses a hard-coded
suffix, cn=changelog. This suffix is a semi-reserved name. When the GDBM back end is
configured, the change log root (cn=changelog) must not overlap any suffix in any TDBM,
SDBM, or LDBM back end, and the change log suffix cannot be the source or target of a
rename operation. If GDBM is not configured, the user can use cn=changelog as a normal
suffix in a TDBM, SDBM, or LDBM back end. However, we do not recommend this method
because you will have to rename that suffix to avoid an overlap if GDBM is configured in the
The GDBM back end is configured in one of two ways: DB2-based (such as TDBM) or
file-based (such as LDBM). In either configuration:
1. There can be at most one GDBM back end in the configuration file.
2. The suffix option cannot be specified in the GDBM back end.
3. If the changeLoggingParticipant option is specified, it controls whether a change log entry
is created for a change to the LDAP server schema. Change log entries are never created
for any changes to GDBM entries, including the suffix entry.
Chapter 7. EIM
This chapter examines the Enterprise Identity Mapping (EIM) concept and its implementation
on z/OS.
Windows 2000/NT
NetServer
iSeries
WebSphere NDS
LINUX
Overview of EIM
Today’s network environments are made up of a complex group of systems and applications,
resulting in the need to manage multiple user registries. Dealing with multiple user registries
quickly grows into a large administrative problem that affects users, administrators, and
application developers. Consequently, many companies are struggling to securely manage
authentication and authorization for systems and applications. Enterprise Identity Mapping
(EIM) is an IBM eServer infrastructure technology that allows administrators and application
developers to address this problem more easily and inexpensively than previously possible.
EIM offers a new approach to enable inexpensive solutions to easily manage multiple user
registries and user identities in an enterprise. EIM is an architecture for describing the
relationships between individuals or entities (such as file servers and print servers) in the
enterprise and the many identities that represent them within an enterprise. In addition, EIM
provides a set of APIs that allow applications to ask questions about these relationships.
For example, given a person’s user identity in one user registry, you can determine which user
identity in another user registry represents that same person. If the user has authenticated
with one user identity and you can map that user identity to the appropriate identity in another
user registry, the user does not need to provide credentials for authentication again. You know
who the user is and only need to know which user identity represents that user in another
user registry. Therefore, EIM provides a generalized identity mapping function for the
enterprise.
The ability to map between a user’s identities in different user registries provides many
benefits. Primarily, it means that applications may have the flexibility of using one user
registry for authentication while using an entirely different user registry for authorization. For
example, an administrator could map an SAP® identity (or better yet, SAP could do the
mapping itself) to access SAP resources.
No code changes are required to existing user registries. The administrator does not need to
have mappings for all identities in a user registry. EIM allows one-to-many mappings (in other
words, a single user with more than one user identity in a single user registry). EIM also
allows many-to-one mappings (in other words, multiple users sharing a single user identity in
a single user registry, which although supported is not advised). An administrator can
represent any user registry of any type in EIM.
EIM is an open architecture that administrators may use to represent identity mapping
relationships for any registry. It does not require copying existing data to a new repository and
trying to keep both copies synchronized. The only new data that EIM introduces is the
relationship information. Administrators manage this data in an LDAP directory, which
provides the flexibility of managing the data in one place and having replicas wherever the
information is used. Ultimately, EIM gives enterprises and application developers the flexibility
to easily work in a wider range of environments with less cost than would be possible without
this support.
EIM concepts
A conceptual understanding of how EIM works is necessary to fully understand how you can
use EIM in your enterprise. Although the configuration and implementation of EIM APIs can
differ among server platforms, EIM concepts are common across IBM eserver servers.
Figure 7-2 provides an EIM implementation example in an enterprise. Three servers act as
EIM clients and contain EIM-enabled applications that request EIM data using lookup
operations. The domain controller stores information about the EIM domain, which includes
an EIM identifier, associations between these EIM identifiers and user identities, and EIM
registry definitions.
Currently, you can configure a number of IBM platforms to act as an EIM domain controller.
Any system that supports the EIM APIs can participate as a client in the domain. These client
systems use EIM APIs to contact an EIM domain controller to perform EIM lookup operations.
The location of the EIM client determines whether the EIM domain controller is a local or
remote system. The domain controller is local if the EIM client is running on the same system
EIM domain
An EIM domain is a directory within an LDAP server that contains EIM data for an enterprise.
An EIM domain is the collection of all the EIM identifiers, EIM associations, and user
registries that are defined in that domain. Systems (EIM clients) participate in the domain by
using the domain data for EIM lookup operations.
An EIM domain is different from a user registry. A user registry defines a set of user identities
known to and trusted by a particular instance of an operating system or application. A user
registry also contains the information needed to authenticate the user of the identity.
Additionally, a user registry often contains other attributes such as user preferences, system
privileges, or personal information for that identity.
In contrast, an EIM domain refers to user identities that are defined in user registries. An EIM
domain contains information about the relationship between identities in various user
registries (user name, registry type, and registry instance) and the actual people or entities
that these identities represent. Because EIM tracks relationship information only, there is
nothing to synchronize between user registries and EIM.
The right side of Figure 7-2 on page 360, shows the data that is stored within an EIM domain.
This data includes EIM identifiers, EIM registry definitions, and EIM associations. EIM data
defines the relationship between user identities and the people or entities that these identities
represent in an enterprise.
After you create your EIM identifiers, registry definitions, and associations, you can begin
using EIM to more easily organize and work with user identities within your enterprise.
EIM identifier
An EIM identifier represents a person or entity in an enterprise. A typical network consists of
various hardware platforms and applications and their associated user registries. Most
platforms and many applications use platform-specific or application-specific user registries.
These user registries contain all of the user identification information for users who work with
those servers or applications.
When you create an EIM identifier and associate it with the various user identities for a
person or entity, it becomes easier to build heterogeneous, multiple-tier applications (for
example, a single sign-on environment). When you create an EIM identifier and associations,
it also becomes easier to build and use tools that simplify the administration involved with
managing every user identity that a person or entity has within the enterprise.
You can also define user registries that exist within other user registries. Some applications
use a subset of user identities within a single instance of a user registry. For example, the
z/OS Security Server RACF registry can contain specific user registries that are a subset of
users within the overall RACF user registry. To model this behavior, EIM allows administrators
to create two kinds of EIM registry definitions:
System registry definitions
Application registry definitions
EIM registry definitions provide information regarding those user registries in an enterprise.
The administrator defines these registries to EIM by providing the following information:
A unique, arbitrary EIM registry name
The type of user registry
Each registry definition represents a specific instance of a user registry. Consequently, you
need to choose an EIM registry definition name that helps you to identify the particular
instance of the user registry. For example, you could choose the TCP/IP host name for a
system user registry, or the host name combined with the name of the application for an
application user registry. You can use any combination of alphanumeric characters, mixed
case, and spaces to create unique EIM registry definition names.
Note: Although the predefined registry definition types cover most operating system user
registries, you may need to create a registry definition for which EIM does not include a
predefined registry type. You have two options in this situation. You can either use an
existing registry definition which matches the characteristics of your user registry or you
can define a private user registry type.
For example in Figure 7-3 on page 364, the administrator followed the process required
and defined the type of registry as WebSphere® Third-Party Authentication (LTPA) for the
System_A_WAS application registry definition.
In Figure 7-3 on page 364, the administrator creates EIM registry definitions for user
registries representing System A, System B, and System C and a Windows Active Directory®
that contains users’ Kerberos principals with which users log into their desk top workstations.
In addition, the administrator created an application registry definition for WebSphere
Lightweight Third-Party Authentication (LTPA), which runs on System A.
The registry definition name that the administrator uses helps to identify the specific
occurrence of the type of user registry. For example, an IP address or host name is often
sufficient for many types of user registries. In this example, the administrator identifies the
specific user registry instance by using System_A_WAS as the registry definition name to
identify this specific instance of the WebSphere LTPA application. In addition to the name, the
administrator also provides the type of registry as System_A.
You can also define user registries that exist within other user registries. For example, the
z/OS Security Server RACF registry can contain specific user registries that are a subset of
users within the overall RACF user registry.
EIM associations
An EIM association is an entry that you create in an EIM domain to define a relationship
between user identities in different user registries. The type of association that you create
determines whether the defined relationship is direct or indirect. You can create one of two
types of associations in EIM: identifier associations and policy associations. You can use
policy associations instead of, or in combination with, identifier associations. How you use
associations depends on your overall EIM implementation plan.
For a user identity to be returned as the target of either type of EIM lookup operation, the user
identity must have a target association defined for it. This target association can be in the
form of an identifier association or a policy association.
The supplied information is passed to EIM and the lookup operation searches for and returns
any target user identities, by searching EIM data in the following order:
1. Identifier target association for an EIM identifier. The EIM identifier is identified in one of
two ways: It is supplied by the eimGetTargetFromIdentifier API. Alternatively, the EIM
identifier is determined from information supplied by the eimGetTargetFromSource API.
2. Certificate filter policy association.
3. Default registry policy association.
4. Default domain policy association.
The lookup operation, illustrated in Figure 7-4, searches flows in this manner:
1. The lookup operation checks whether mapping lookups are enabled. The lookup operation
determines whether mapping lookups are enabled for the specified source registry, the
specified target registry, or both specified registries. If mapping lookups are not enabled
for one or both of the registries, then the lookup operation ends without returning a target
user identity
2. The lookup operation checks whether there are identifier associations that match the
lookup criteria. If an EIM identifier was provided, the lookup operation uses the specified
EIM identifier name. Otherwise, the lookup operation checks whether there is a specific
identifier source association that matches the supplied source user identity and source
registry. If there is one, the lookup operation uses it to determine the appropriate EIM
identifier name. The lookup operation then uses the EIM identifier name to search for an
identifier target association for the EIM identifier that matches the specified target EIM
registry definition name. If there is an identifier target association that matches, the lookup
operation returns the target user identity defined in the target association
3. The lookup operation checks whether the use of policy associations are enabled. The
lookup operation checks whether the domain is enabled to allow mapping lookups using
policy associations. The lookup operation also checks whether the target registry is
enabled to use policy associations. If the domain is not enabled for policy associations or
When an application supplies a user identity as the source, the application also must supply
the EIM registry definition name for the source user identity and the EIM registry definition
name that is the target of the EIM lookup operation. To be used as the source in a EIM lookup
operation, a user identity must have a source association defined for it.
When an application supplies an EIM identifier as the source of the EIM lookup operation, the
application must also supply the EIM registry definition name that is the target of the EIM
lookup operation. For a user identity to be returned as the target of either type of EIM lookup
operation, the user identity must have a target association defined for it.
The supplied information is passed to the EIM domain controller where all EIM information is
stored and the EIM lookup operation searches for the source association that matches the
supplied information. Based on the EIM identifier (supplied to the API or determined from the
source association information), the EIM lookup operation then searches for a target
association for that identifier that matches the target EIM registry definition name.
This source information is passed to the EIM domain controller and the EIM lookup operation
finds a source association that matches the information. Using the EIM identifier name, the
EIM lookup operation searches for a target association for the johnday identifier that matches
the target EIM registry definition name for System_B. When the matching target association
is found, the EIM lookup operation returns the jsd1 user identity to the application.
EIM mapping policy support provides a means of enabling and disabling the use of policy
associations for the entire domain, as well as for each specific target user registry. EIM also
allows you to set whether a specific registry can participate in mapping lookup operations in
The default setting for an EIM domain is that mapping lookups that use policy associations
are disabled for the domain. When the use of policy associations is disabled for the domain,
all mapping lookup operations for the domain return results only by using specific, identifier
associations between user identities and EIM identifiers.
The default setting for each individual registry is that mapping lookup participation is enabled
and the use of policy associations is disabled. When you enable the use of policy
associations for an individual target registry, you must also ensure that this setting is enabled
for the domain.
You can configure mapping lookup participation and the use of policy associations for each
registry in one of the following ways:
Mapping lookup operations cannot be used for the specified registry at all. In other words,
an application that performs a mapping lookup operation involving that registry will fail to
return results.
Mapping lookup operations can use specific identifier associations between user identities
and EIM identifiers only. Mapping lookups are enabled for the registry, but the use of policy
associations is disabled for the registry.
Mapping lookup operations can use specific identifier associations when they exist and
policy associations when specific identifier associations do not exist (all settings are
enabled).
EIM access controls allow a user to perform specific administrative tasks or EIM lookup
operations. Only users with EIM administrator access are allowed to grant or revoke
authorities for other users. EIM access controls are granted only to user identities that are
known to the EIM domain controller.
The following sections provide brief descriptions of the functions that each EIM access control
group can perform.
LDAP administrator
This access control allows the user to configure a new EIM domain. A user with this access
control can perform the following functions:
Create a domain v Delete a domain
Create and remove EIM identifiers
Create and remove EIM registry definitions
Create and remove source, target, and administrative associations
Perform EIM lookup operations
Retrieve associations, EIM identifiers, and EIM registry definitions
Add, remove, and list EIM authority information
Steps for installing and configuring the EIM domain controller on z/OS
Note: For the z/OS Integrated Security Services LDAP server, the following requirements
must be met:
APAR OW55078 (PTF UW92346) must be applied.
LDAP must be configured to use the TDBM back end.
The SDBM (RACF) back end is optional.
Restriction: z/OS LDAP by default has a 511 character limit on the length of a
distinguished name for an entry. If this default length is exceeded, message ITY0023
(indicating an unexpected LDAP error) is issued, indicating that DB2 needs to be
reconfigured to support longer distinguished names. This error might show up when
working with long identifier, registry, domain names or suffixes.
2. Consider the options you have for setting up an EIM domain that includes z/OS:
a. Use LDAP on z/OS as the domain controller. (z/OS and non-z/OS applications could
access the data.) The LDAP server on z/OS must be configured with the TDBM back
end. If you plan to use RACF user IDs and passwords for the bind credentials,
configure the server with the SDBM and the TDBM back ends.
b. Set up the z/OS LDAP server in multi-server mode. This configuration has multiple
LDAP servers sharing the same TDBM back-end store, which is useful if you want to
balance the work load between your LDAP servers.
c. The z/OS EIM application can access a domain controller that resides on another
platform.
Figure 7-7 lists important directories for EIM installation. Your system programmer should
review the right-most column of this table, crossing out any defaults that have changed and
recording the correct directory names.
This adds the EIM programs directory to the end of the list of directories to search for
programs. Add the export command to a user’s .profile file so that each time the user
enters a shell, the PATH is updated.
Note: This assumes that the o=IBM,c=US objects are defined in the LDAP Directory.
Tip: If you plan on dividing the administration responsibilities, repeat this command for
the other administrative users.
The following command can be issued by the LDAP administrator to give EIM
administrator, cn=eim administrator,ou=dept20,o=IBM,c=US, authority to administer the
EIM domain:
eimadmin
-aC
-d ’ibm-eimDomainName=My Domain,o=IBM,c=US’
-c ADMIN
-q ’cn=eim administrator,ou=dept20,o=IBM,c=US’
-f DN
-h ldap://some.ldap.host
-b ’cn=ldap administrator’
-w secret
3. Add registries to the EIM domain by entering a command such as the following command
from the z/OS shell:
eimadmin
-aR
-d domainDN
-r registryName
-y registryType
-n description
-h ldapHost
-b bindDN
-w bindPassword
Note: You can create associations only after registries and identifiers are in place.
The command creates only two associations. Conversely, you can create multiple
associations by specifying a file name as standard input to the eimadmin command.
Specifying a file name indicates using a file of associations as input for batch
processing of multiple associations.
Your LDAP server configuration and security requirements determine which method you
choose. The examples in this section illustrate how you can use these methods with the
eimadmin utility.
This information explains how the bind credentials specified correspond to the distinguished
name that LDAP uses for access checking. Your access to EIM data is determined by the
authority groups of which the distinguished name is a member. The exception is the
distinguished name for the LDAP administrator that has unrestricted access.
Note: Unless an SSL session has been established, the password is sent over the network
in plain text, making this method the least secure. The distinguished name that you specify
is the one LDAP uses for access checking.
Note: LDAP uses the client certificate’s subject distinguished name for access checking.
For access checking, LDAP considers a distinguished name formed by prefixing the Kerberos
principal name with ibm-kgn= or distinguished names located through special mapping or
searches.
The strength of SSL is that data transferred over the connection is encrypted, including the
password for a SIMPLE bind. The eimadmin utility recognizes the need for an SSL connection
when you specify an LDAP host name prefixed with ldaps://. It then requires that you specify
a RACF key ring, or a key database file and its password.
Managing registries
A domain typically contains multiple registries. User identities for a particular system are
associated with a system registry, while a subset of identities might be associated with an
application registry.
Note: After you define an application registry, you can refer to it by name in EIM APIs and
eimadmin commands without having to identify it as an application-type registry.
Listing a registry
You can list any registry using a command similar to the following:
eimadmin
-lR
-r ’App1’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
Removing a registry
To remove a registry, issue the following command:
eimadmin
-pR
-r ’App1’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
Attention: EIM refuses to remove a system registry if any application registries depend on
it.
You can find the dependents that you must remove by searching for all occurrences of the
system registry name in the output from the following command, which lists all registries:
eimadmin
-lR
-r ’*’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
Rule: When defining or referencing a registry alias, you must specify an associated
registry type.
Assigning an alias
Enter the following command to assign an alias name to an existing registry:
eimadmin
-mR
-r ’RACF Test Pok1’
-x ’z/OS’
-z ’RACF’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
This example defines the alias z/OS (of type RACF) for registry RACF Test Pok1.
Listing an alias
You can list the registry and its aliases using the following command:
eimadmin
-lR
-r ’RACF Test Pok1’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
Removing an alias
You can delete an alias for a registry using the following command:
eimadmin
-eR
-r ’RACF Test Pok1’
-x ’z/OS’
-z ’RACF’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
This example removes the alias z/OS (of type RACF) for registry RACF Test Pok1.
Enter the following two commands to reassign alias z/OS from registry RACF Test Pok1 to
registry RACF Pok1:
eimadmin
-mR
-r ’RACF Pok1’
-x ’z/OS’
-z ’RACF’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
eimadmin
-eR
-r ’RACF Test Pok1’
-x ’z/OS’
-z ’RACF’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
Adding an identifier
When you create a new EIM identifier, it is assigned a name that is unique within the domain.
The eimadmin utility requires that you specify a unique name (unlike the eimAddIdentifier
API option that generates a unique name for you).
You can assign an alternate name, or alias, to multiple identifiers. This non-unique name can
be used to further describe the represented individual or to serve as an alternate identifier for
lookup operations.
Enter the following command to add a new identifier John S. Day with two aliases:
eimadmin
-aI
-i ’John S. Day’
-j ’654321’
-j ’Contractor’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
You can also list the new identifier using an alias name.
The utility returns all entries having Contractor defined as an alternate name, as follows:
eimadmin
-lI
-j ’Contractor’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
Adding associations
You can register the system and application user IDs assigned to the individual by defining
EIM associations between the identifier and the corresponding registries.
Enter the following command to create source and target associations for user ID JD in
registry RACF Pok1:
eimadmin
-aA
-i ’John S. Day’
-r ’RACF Pok1’
-u ’JD’
-t source
-t target
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
Listing associations
Enter the following command to list all associations for John S. Day:
eimadmin
-lA
-i ’John S. Day’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
If you only need to reflect the deletion of a user ID from a registry, simply remove the
corresponding EIM associations.
Removing associations
Enter the following command to remove the source and target associations for user ID JD in
registry RACF Pok1:
eimadmin
-pA
-i ’John S. Day’
-r ’RACF Pok1’
-u ’JD’
-t source
-t target
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
Removing an identifier
Enter the following command to remove an identifier and its associations, including identifier
aliases:
eimadmin
-pI
-i ’John S. Day’
-d ’ibm-eimDomainName=MyDomain,o=IBM,c=US’
-h ldap://some.ldap.host
-b ’cn=eimadministrator,ou=dept20,o=IBM,c=US’
-w secret
Suppose that a user has registry administrator authority over a specific registry, and your task
is to switch the user’s authority to a different registry. You can accomplish this task in two
steps:
1. Add the user to the new registry administrator group.
2. Remove the user from the prior group.
Tip: Issuing these commands is optional. However, setting up your system this way can
eliminate the need for individual applications to handle EIM domain and bind information.
The default domain and bind information can be specified in one of three places:
1. The user ID the application runs under has the name of an LDAPBIND class profile in its
USER profile
2. The IRR.EIM.DEFAULTS profile in the LDAPBIND class
3. The IRR.PROXY.DEFAULTS profile in the FACILITY class
The EIM APIs try to retrieve the information from a profile if the application does not explicitly
supply the information to the EIM APIs using parameters. Applications or other services that
use EIM can instruct their callers to define a profile in the LDAPBIND class profile.
Before you begin, use the decision table of Figure 7-11 to determine which profile to use.
Figure 7-12 Setting up a registry name for your local RACF registry
Many of the EIM APIs require the name of a registry. For example, if you are adding a registry
to an EIM domain, you should know the name of the new registry. However, you can use the
lookup APIs (such as eimGetTargetFromSource, eimGetIdentifierFromSource, and
eimGetAssociatedIdentifiers) to convert:
1. A user ID to its equivalent RACF user ID
2. A local RACF user ID to an enterprise identifier
For such applications, you can eliminate the requirement for providing the RACF registry
name or its alias on the local system. You do this by giving a name to the local RACF registry.
To set up EIM so that you do not need a registry name on every lookup follow the instructions
in this section. To define the local registry, enter the following RACF command in which
registryName is the name of the local registry:
RDEFINE FACILITY IRR.PROXY.DEFAULTS EIM(LOCALREGISTRY(registryName))
Note: EIM does not look for the registry name in an LDAPBIND class profile.
Note: You need to define these registry names in the configured EIM domain.
If you want to disable a server (rather than a system) from using a configured EIM domain,
enter the following command:
RALTER LDAPBIND ldapbind_profile EIM(OPTIONS(DISABLE))
This command applies only to a server that has an ldapbind class profile specified for its user
ID.
Tip: To disable a system-wide default EIM domain (rather than a server) that default
profiles use, enter one of the following commands:
RALTER FACILITY IRR.PROXY.DEFAULTS EIM(OPTIONS(DISABLE))
RALTER LDAPBIND IRR.EIM.DEFAULTS EIM(OPTIONS(DISABLE))
Using output from the RACF database unload utility and eimadmin
to prime your EIM domain with information
You can start to put EIM information (identifiers, RACF user IDs, and associations) into your
EIM domain by using output from DBUNLOAD and eimadmin.
For large installations, priming the EIM domain with identifiers and associations can involve a
lot of work. To make the task of getting started with EIM easier, the eimadmin utility accepts
as input a file containing a list of identifiers and associations.
The section explores the steps for setting up an EIM domain based on user information
contained in a RACF database. The initial assumptions are that the EIM domain, World Wide
Domain, has been created and a SAF system registry, SAF user IDs, is defined in the
domain. The LDAP host name for the domain is ldap://some.big.host. The EIM
administrator uses the bind distinguished name of cn=EIM Admin,o=My Company,c=US and the
password is secret. The EIM administrator bind distinguished name has been given EIM
administrator authority and can perform all of the steps that we list here.
Tip: At a minimum, a user who is looking for a mapping in the EIM domain needs to have
EIM mapping operations authority. In most cases, the application has one set of
credentials for connect to an EIM domain, and those credentials are shared by all users.
However, if individual access is needed, then a bind distinguished name needs to be
defined for each of the users and given EIM mapping operations authority.
We consider the publications that we list in this section particularly suitable for a more
detailed discussion of the topics that we cover in this book.
Other publications
These publications are also relevant as further information sources:
z/OS Integrated Security Services Network Authentication Service Administration,
SC24-5926
z/OS Integrated Security Services Network Authentication Service Programming,
SC24-5927
z/OS Cryptographic Services PKI Services Guide and Reference, SA22-7693
z/OS Integrated Security Services LDAP Server Administration and Use, SC24-5923
z/OS Security Server RACF Auditor's Guide, SA22-7684
z/OS Security Server RACF Callable Services, SA22-7691
z/OS Security Server RACF Command Language Reference, SA22-7687
z/OS Security Server RACF Data Areas, GA22-7680
z/OS Security Server RACF Diagnosis Guide, GA22-7689
z/OS Security Server RACF General User's Guide, SA22-7685
z/OS Security Server RACF Macros and Interfaces, SA22-7682
z/OS Security Server RACF Messages and Codes, SA22-7686
z/OS Security Server RACF Security Administrator's Guide, SA22-7683
z/OS Security Server RACF System Programmer's Guide, SA22-7681
z/OS Security Server RACROUTE Macro Reference, SA22-7692
z/OS Integrated Security Services Enterprise Identity Mapping (EIM) Guide and
Reference, SA22-7875
z/OS OCSF Service Provider Module Developer's Guide and Reference, SC24-5900
z/OS Open Cryptographic Services Facility (OCSF) Application Programming, SC24-5899
z/OS Cryptographic Services ICSF Administrator’s Guide, SA22-7521
z/OS Cryptographic Services ICSF Application Programmer’s Guide, SA22-7522
z/OS Cryptographic Services ICSF Messages, SA22-7523
z/OS Cryptographic Services ICSF Overview, SA22-7519
z/OS Cryptographic Services ICSF System Programmer’s Guide, SA22-7520
z/OS Cryptographic Services ICSF TKE PCIX Workstation User’s Guide, SA23-2211
z/OS Cryptographic Services System SSL Programming, SC24-5901
Security on z/OS, The ABCs of z/OS System Programming is an 11-volume collection that
RACF, and LDAP provides an introduction to the z/OS operating system and the hardware INTERNATIONAL
architecture. Whether you are a beginner or an experienced system
programmer, the ABCs collection provides the information that you need to
TECHNICAL
Kerberos and PKI SUPPORT
start your research into z/OS and related subjects. If you want to become more
familiar with z/OS in your current environment or if you are evaluating ORGANIZATION
Cryptography and EIM platforms to consolidate your e-business applications, the ABCs collection can
serve as a powerful technical tool.
Volume 1: Introduction to z/OS and storage concepts, TSO/E, ISPF, JCL,
SDSF, and z/OS delivery and installation
BUILDING TECHNICAL
Volume 2: z/OS implementation and daily maintenance, defining
INFORMATION BASED ON
subsystems, JES2 and JES3, LPA, LNKLST, authorized libraries, Language
PRACTICAL EXPERIENCE
Environment, and SMP/E
Volume 3: Introduction to DFSMS, data set basics, storage management
IBM Redbooks are developed
hardware and software, VSAM, System-managed storage, catalogs, and by the IBM International
DFSMStvs Technical Support
Volume 4: Communication Server, TCP/IP, and VTAM Organization. Experts from
Volume 5: Base and Parallel Sysplex, System Logger, RRS, GRS, z/OS IBM, Customers and Partners
system operations, ARM, and GPDS from around the world create
Volume 6: Introduction to security, RACF, Digital certificates and PKI, timely technical information
Kerberos, cryptography and z990 integrated cryptography, System z based on realistic scenarios.
firewall technologies, LDAP, EIM, and firewall technologies Specific recommendations
Volume 7: Printing in a z/OS environment, Infoprint Server and Infoprint are provided to help you
Central implement IT solutions more
effectively in your
Volume 8: An introduction to z/OS problem diagnosis
environment.
Volume 9: z/OS UNIX System Services
Volume 10: Introduction to z/Architecture, System z processor design,
System z connectivity, LPAR concepts, HCD, and HMC
Volume 11: Capacity planning, performance management, WLM, RMF, and For more information:
SMF ibm.com/redbooks