LDAP AuthzID Controls: Lightweight Directory Access Protocol (LDAP) Authorization Identity Request and Response Controls
Two LDAP bind controls that let a client ask the server which identity it was actually granted.
Weltman, R., Smith, M., and M. Wahl, "Lightweight Directory Access Protocol (LDAP) Authorization Identity Request and Response Controls", RFC 3829, DOI 10.17487/RFC3829, July 2004, <https://www.rfc-editor.org/info/rfc3829>.
@misc{rfc3829,
series = {Request for Comments},
number = 3829,
howpublished = {RFC 3829},
publisher = {RFC Editor},
doi = {10.17487/RFC3829},
url = {https://www.rfc-editor.org/info/rfc3829},
author = {R. Weltman and M. Smith and M. Wahl},
title = {{Lightweight Directory Access Protocol (LDAP) Authorization Identity Request and Response Controls}},
pagetotal = 6,
year = 2004,
month = jul,
} RFC text
Contents
Network Working Group R. Weltman
Request for Comments: 3829 America Online
Category: Informational M. Smith
Pearl Crescent, LLC
M. Wahl
July 2004
Lightweight Directory Access Protocol (LDAP)
Authorization Identity Request and Response Controls
Status of this Memo
This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2004).
Abstract
This document extends the Lightweight Directory Access Protocol
(LDAP) bind operation with a mechanism for requesting and returning
the authorization identity it establishes. Specifically, this
document defines the Authorization Identity Request and Response
controls for use with the Bind operation.
1. Introduction
This document defines support for the Authorization Identity Request
Control and the Authorization Identity Response Control for
requesting and returning the authorization established in a bind
operation. The Authorization Identity Request Control may be
submitted by a client in a bind request if authenticating with
version 3 of the Lightweight Directory Access Protocol (LDAP)
protocol [LDAPv3]. In the LDAP server's bind response, it may then
include an Authorization Identity Response Control. The response
control contains the identity assumed by the client. This is useful
when there is a mapping step or other indirection during the bind, so
that the client can be told what LDAP identity was granted. Client
authentication with certificates is the primary situation where this
applies. Also, some Simple Authentication and Security Layer [SASL]
authentication mechanisms may not involve the client explicitly
providing a DN, or may result in an authorization identity which is
different from the authentication identity provided by the client
[AUTH].
The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
used in this document are to be interpreted as described in
[RFCKeyWords].
2. Publishing support for the Authorization Identity Request Control
and the Authorization Identity Response Control
Support for the Authorization Identity Request Control and the
Authorization Identity Response Control is indicated by the presence
of the Object Identifiers (OIDs) 2.16.840.1.113730.3.4.16 and
2.16.840.1.113730.3.4.15, respectively, in the supportedControl
attribute [LDAPATTRS] of a server's root DSA-specific Entry (DSE).
3. Authorization Identity Request Control
This control MAY be included in any bind request which specifies
protocol version 3, as part of the controls field of the LDAPMessage
as defined in [LDAPPROT]. In a multi-step bind operation, the client
MUST provide the control with each bind request.
The controlType is "2.16.840.1.113730.3.4.16" and the controlValue is
absent.
4. Authorization Identity Response Control
This control MAY be included in any final bind response where the
first bind request of the bind operation included an Authorization
Identity Request Control as part of the controls field of the
LDAPMessage as defined in [LDAPPROT].
The controlType is "2.16.840.1.113730.3.4.15". If the bind request
succeeded and resulted in an identity (not anonymous), the
controlValue contains the authorization identity (authzId), as
defined in [AUTH] section 9, granted to the requestor. If the bind
request resulted in an anonymous association, the controlValue field
is a string of zero length. If the bind request resulted in more
than one authzId, the primary authzId is returned in the controlValue
field.
The control is only included in a bind response if the resultCode for
the bind operation is success.
If the server requires confidentiality protections to be in place
prior to use of this control (see Security Considerations), the
server reports failure to have adequate confidentiality protections
in place by returning the confidentialityRequired result code.
If the client has insufficient access rights to the requested
authorization information, the server reports this by returning the
insufficientAccessRights result code.
Identities presented by a client as part of the authentication
process may be mapped by the server to one or more authorization
identities. The bind response control can be used to retrieve the
primary authzId.
For example, during client authentication with certificates [AUTH], a
client may possess more than one certificate and may not be able to
determine which one was ultimately selected for authentication to the
server. The subject DN field in the selected certificate may not
correspond exactly to a DN in the directory, but rather have gone
through a mapping process controlled by the server. Upon completing
the certificate-based authentication, the client may issue a SASL
[SASL] bind request, specifying the EXTERNAL mechanism and including
an Authorization Identity Request Control. The bind response MAY
include an Authorization Identity Response Control indicating the DN
in the server's Directory Information Tree (DIT) which the
certificate was mapped to.
5. Alternative Approach with Extended Operation
The LDAP "Who am I?" [AUTHZID] extended operation provides a
mechanism to query the authorization identity associated with a bound
connection. Using an extended operation, as opposed to a bind
response control, allows a client to learn the authorization identity
after the bind has established integrity and data confidentiality
protections. The disadvantages of the extended operation approach
are coordination issues between "Who am I?" requests, bind requests,
and other requests, and that an extra operation is required to learn
the authorization identity. For multithreaded or high bandwidth
server application environments, the bind response approach may be
preferable.
6. Security Considerations
The Authorization Identity Request and Response Controls are subject
to standard LDAP security considerations. The controls may be passed
over a secure as well as over an insecure channel. They are not
protected by security layers negotiated by the bind operation.
The response control allows for an additional authorization identity
to be passed. In some deployments, these identities may contain
confidential information which require privacy protection. In such
deployments, a security layer should be established prior to issuing
a bind request with an Authorization Identity Request Control.
7. IANA Considerations
The OIDs 2.16.840.1.113730.3.4.16 and 2.16.840.1.113730.3.4.15 are
reserved for the Authorization Identity Request and Response
Controls, respectively. The Authorization Identity Request Control
has been registered as an LDAP Protocol Mechanism [IANALDAP].
8. References
8.1. Normative References
[LDAPv3] Hodges, J. and R. Morgan, "Lightweight Directory Access
Protocol (v3): Technical Specification", RFC 3377,
September 2002.
[LDAPPROT] Wahl, M., Howes, T. and S. Kille, "Lightweight
Directory Access Protocol (v3)", RFC 2251, December
1997.
[RFCKeyWords] Bradner, S., "Key Words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[AUTH] Wahl, M., Alvestrand, H., Hodges, J. and R. Morgan,
"Authentication Methods for LDAP", RFC 2829, May 2000.
[SASL] Myers, J., "Simple Authentication and Security Layer
(SASL)", RFC 2222, October 1997.
[LDAPATTRS] Wahl, M., Coulbeck, A., Howes, T. and S. Kille,
"Lightweight Directory Access Protocol (v3): Attribute
Syntax Definitions", RFC 2252, December 1997.
[IANALDAP] Hodges, J. and R. Morgan, "Lightweight Directory Access
Protocol (v3): Technical Specification", RFC 3377,
September 2002.
8.2. Informative References
[AUTHZID] Zeilenga, K., "LDAP 'Who am I?' Operation", Work in
Progress, April 2002.
9. Author's Addresses
Rob Weltman
America Online
360 W. Caribbean Drive
Sunnyvale, CA 94089
USA
Phone: +1 650 937-3194
EMail: robw@worldspot.com
Mark Smith
Pearl Crescent, LLC
447 Marlpool Drive
Saline, MI 48176
USA
Phone: +1 734 944-2856
EMail: mcs@pearlcrescent.com
Mark Wahl
PO Box 90626
Austin, TX 78709-0626
USA
10. Full Copyright Statement
Copyright (C) The Internet Society (2004). This document is subject
to the rights, licenses and restrictions contained in BCP 78, and
except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at ietf-
ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
AI ELI5
On this page
§1Why a Client Wants to Know Its Identity
RFC 3829 defines two controls for the LDAP bind operation: the Authorization Identity Request Control and the Authorization Identity Response Control. A client sends the first in a bind request; the server may reply with the second in its bind response. The response holds the identity the client was granted.
This helps when the server maps or redirects identities during the bind. Client authentication with certificates is the main case. Some SASL mechanisms also leave out an explicit DN, or end with an authorization identity that differs from the authentication identity the client supplied. The request control may only be used with LDAP version 3.
Sometimes the guard lets you in under a different name than the one on your badge. These controls let you ask which name you were given.
§3The Request and Response Controls
The request control MAY go in any bind request that specifies protocol version 3, in the controls field of the LDAPMessage. Its controlType is 2.16.840.1.113730.3.4.16 and its controlValue is absent. In a multi-step bind, the client MUST send the control with each bind request.
The response control MAY appear in the final bind response, if the first bind request of the bind carried the request control. Its controlType is 2.16.840.1.113730.3.4.15. On success with a non-anonymous identity, the controlValue holds the authorization identity (authzId) granted. For an anonymous association it is a zero-length string. If the bind produced more than one authzId, the primary one is returned.
The response control is only included when the bind's resultCode is success.
You ask with a blank note. The answer comes back on a note with your name on it, or a blank note if you are just a guest.
- Bind request + Request ControlControl type 2.16.840.1.113730.3.4.16, no value.
- Bind response + Response ControlControl type 2.16.840.1.113730.3.4.15, value is the authzId; only sent when the result is success.
§4Failure Cases and a Certificate Example
If the server requires confidentiality protections before using the control and they are missing, it returns the confidentialityRequired result code. If the client lacks access rights to the authorization information, the server returns insufficientAccessRights.
The RFC's example: a client holding several certificates may not know which one the server chose, and the certificate's subject DN may not match a directory DN exactly because the server maps it. After certificate authentication, the client can send a SASL bind using the EXTERNAL mechanism with the request control. The response MAY then name the DN in the server's Directory Information Tree that the certificate was mapped to.
If the guard says the answer is private, or you are not allowed to ask, you get a polite refusal instead of a name.
§5The "Who am I?" Alternative
The LDAP "Who am I?" extended operation can also report the authorization identity of a bound connection. Because it runs after the bind, it lets a client learn the identity once integrity and confidentiality protections are in place. Its drawbacks are the need to coordinate it with bind and other requests, and the extra operation required.
For multithreaded or high-bandwidth server environments, the RFC says the bind response approach may be preferable.
You can also ask "Who am I?" later, after you are inside. That takes one more question, but the room can already be private.
§6Security and IANA Considerations
The controls are subject to standard LDAP security considerations and may be sent over a secure or an insecure channel. They are not protected by security layers negotiated by the bind operation.
Because the response can pass an additional authorization identity, which in some deployments may be confidential, the RFC says a security layer should be established before issuing a bind request with the request control. Support is advertised by listing the two OIDs in the supportedControl attribute of the server's root DSE. The OIDs are reserved for these controls, and the request control is registered as an LDAP Protocol Mechanism.
The answer slip is not locked in a safe. If your name is a secret, set up a private room before you ask.