RFC 4261

Common Open Policy Service (COPS) Over Transport Layer Security (TLS)

πŸ“… published December 2005, from ietf

RFC 4261: Common Open Policy Service (COPS) Over Transport Layer Security (TLS) πŸŽ€

Okay bestie, this is RFC 4261 ✨ and it's titled "Common Open Policy Service (COPS) Over Transport Layer Security (TLS)." It was written by J. Walker and A. Kulkarni (Ed.) of Intel Corp. It's a Standards Track doc dated December 2005. Its header says it updates RFC 2748 πŸ¦‹. That's the only RFC it lists in the header.


Status of This Memo πŸ“œ

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

Copyright (C) The Internet Society (2005).

Abstract πŸ’«

This document describes how to use Transport Layer Security (TLS) to secure Common Open Policy Service (COPS) connections over the Internet.

This document also updates RFC 2748 by modifying the contents of the Client-Accept message.

Table Of Contents πŸ—‚οΈ

1. Introduction ....................................................2
2. COPS Over TLS ...................................................3
3. Separate Ports versus Upward Negotiation ........................3
4. COPS/TLS Objects and Error codes ................................4
   4.1. The TLS Message Integrity Object (Integrity-TLS) ...........4
   4.2. Error Codes ................................................4
5. COPS/TLS Secure Connection Initiation ...........................5
   5.1. PEP Initiated Security Negotiation .........................5
   5.2. PDP Initiated Security Negotiation .........................6
6. Connection Closure ..............................................7
   6.1. PEP System Behavior ........................................7
   6.2. PDP System Behavior ........................................8
7. Endpoint Identification and Access Control ......................8
   7.1. PEP Identity ...............................................9
   7.2. PDP Identity ...............................................9
8. Cipher Suite Requirements ......................................10
9. Backward Compatibility .........................................10
10. IANA Considerations ...........................................10
11. Security Considerations .......................................11
12. Acknowledgements ..............................................11
13. References ....................................................12
   13.1. Normative References .....................................12
   13.2. Informative References ...................................12

1. Introduction 🌸

okay so COPS [RFC2748] was built to push clear-text policy info from a centralized Policy Decision Point (PDP) out to a bunch of Policy Enforcement Points (PEP) across the Internet. COPS has its own security mechanisms to protect the per-hop integrity of the policy it delivers. BUT 😭 some uses, like sensitive stuff (for example, certain kinds of security policy distribution), need extra protection like data confidentiality. That's because some orgs need to hide some or all of their security policies, since policy distribution to devices like mobile platforms can cross domain boundaries.

TLS [RFC2246] was designed for channel-oriented security. TLS standardizes SSL and can be used with any connection-oriented service. It gives you one-way and two-way authentication, dynamic session keying, and data stream privacy and integrity. Iconic πŸ‘‘

This document explains how to use COPS over TLS. "COPS over TLS" gets shortened to COPS/TLS πŸ’….

Glossary πŸ“–

  • COPS - Common Open Policy Service. See [RFC2748].
  • COPS/TCP - A plain-vanilla implementation of COPS.
  • COPS/TLS - A secure implementation of COPS using TLS.
  • PDP - Policy Decision Point. Also referred to as the Policy Server. See [RFC2753].
  • PEP - Policy Enforcement Point. Also referred to as the Policy Client. See [RFC2753].

Conventions used in this document πŸŽ€

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].

2. COPS Over TLS πŸ¦‹

COPS/TLS is super simple. You use COPS over TLS pretty much the same way you'd use COPS over TCP (COPS/TCP). The only real difference is a specific procedure to set up the connection. Otherwise COPS/TLS and COPS/TCP are the same. no cap 🧚

3. Separate Ports versus Upward Negotiation πŸ”₯

There are two ways that insecure and secure versions of the same protocol can run at the same time.

In the first method, the secure version of the protocol also gets its own well-known port. Having well-known port numbers for both the secure and insecure versions is called 'Separate Ports'. Clients that need security can just connect to the well-known secure port. This is easy to do, and existing insecure implementations don't need any changes. The downside is that it doesn't scale well, because every secure implementation needs a new port. More problems with this approach are listed in [RFC2595].

The second method is called 'Upward Negotiation'. Here, the secure and insecure versions run on the same port. The client connects to the server, they both figure out each other's capabilities, and they start security negotiations if they want to. This method usually needs some changes to the protocol being secured.

Because of all the issues with Separate Ports, the authors decided to use Upward Negotiation for COPS/TLS. It's giving sensible 🫢

4. COPS/TLS Objects and Error codes πŸ§šβ€β™€οΈ

This section describes the COPS objects and error codes needed to support COPS/TLS.

4.1. The TLS Message Integrity Object (Integrity-TLS) πŸ”

The TLS Integrity object is what the PDP and the PEP use to start the TLS negotiation. This object should be included only in the Client-Open or Client-Accept messages. It MUST NOT be included in any other COPS message.

          0         1          2          3

    +----------+----------+----------+----------+
    |   Length (Octets)   | C-Num=16 | C-Type=2 |
    +----------+----------+----------+----------+
    |       ////////      |        Flags        |
    +----------+----------+----------+----------+

    Note: //// implies the field is reserved, set to 0, and should
          be ignored on receipt.

    Flags: 16 bits
                0x01 = StartTLS
                This flag indicates that the sender of the message
                wishes to initiate a TLS handshake.

The Client-Type of any message containing this object MUST be 0. Client-Type 0 is used to negotiate COPS connection level security and must only be used during the connection establishment phase. Please refer to section 4.1 of [RFC2748] for more details.

4.2. Error Codes 🚨

This section uses the error codes described in section 2.2.8 (Error Object) of [RFC2748].

Error Code: 13= Unknown COPS Object:

The Sub-code (octet 2) holds the unknown object's C-Num, and (octet 3) holds the unknown object's C-Type. If the PEP or PDP does not support TLS, the C-Num specified MUST be 16 and the C-Type MUST be 2. This shows that the TLS version of the Integrity object is not known.

This error code MUST be used by either PEP or PDP to indicate a security-related connection closure if it cannot support a TLS connection for the COPS protocol.

If the PDP wants to negotiate a different security mechanism than the one the PEP requested in the Client-Open, it MUST send the following error code:

Error Code: 15= Authentication Required

Here the Sub-code (octet 2) contains the C-Num=16 value for the Integrity Object, and (octet 3) MUST specify the PDP required/preferred Integrity object C-Type. If the server does not support any form of COPS-Security, it MUST set the Sub-code (octet 2) to 16 and (octet 3) to zero instead, meaning no type of the Integrity object is supported.

5. COPS/TLS Secure Connection Initiation 🀝

Security negotiation can be started by either the PDP or the PEP. The PEP can start a negotiation with a Client-Open message, while a PDP can start one with a Client-Accept message.

Once the TLS connection is established, all COPS data MUST be sent as TLS "application data". ✨

5.1. PEP Initiated Security Negotiation πŸ’–

A PEP MAY start a TLS security negotiation with a PDP using the Client-Open message. To do this, the Client-Open message MUST have a Client-Type of 0 and MUST include the Integrity-TLS object.

When the PDP gets the Client-Open message, it SHOULD respond with a Client-Accept message containing the Integrity-TLS object.

Note that to carry the Integrity-TLS object, the contents of the Client-Accept message defined in section 3.7 of [RFC2748] don't need to change, except that the C-Type of the integrity object contained therein should now be C-Type=2. For example:

<Client-Accept> ::= <Common Header>
                    <KA Timer>
                    [<ACCT Timer>]
                    [<Integrity (C-Num=16, C-Type=2)>]

Also, this new format of the Client-Accept message does not replace or obsolete the existing Client-Accept message format, which can keep being used for non-secure COPS session negotiations. 🌈

When the PEP gets the appropriate Client-Accept message, it SHOULD initiate the TLS handshake. 🧚

The message exchange goes like this:

C: Client-Open   (Client-Type = 0, Integrity-TLS)
S: Client-Accept (Client-Type = 0, Integrity-TLS)
<TLS handshake>
C/S: <...further messages...>

If the PDP does not want to open a secure connection with the PEP, it MUST reply with a Client-Close message and close the connection. The Client-Close message MUST include the error code 15= Authentication required, with the Sub-code (octet 2) set to 16 for the Integrity object's C-Num, and (octet 3) set to the C-Type matching the server's preferred Integrity type, or zero for no security.

A PEP that requires the Integrity-TLS object in a Client-Accept message MUST close the connection if the Integrity-TLS object is missing. The ensuing Client-Close message MUST include the error code 15= Authentication required, with the Sub-code (octet 2) containing the required Integrity object's C-Num=16, and (octet 3) containing the required Integrity object's C-Type=2. πŸ™ˆ

5.2. PDP Initiated Security Negotiation ✨

okay so this one flips who starts the whole vibe πŸ”„. The PEP opens a TCP connection to the PDP on the standard COPS port and sends a Client-Open message πŸ“¨. That Client-Open MUST have a Client-Type of 0.

Then the PDP SHOULD reply with a Client-Accept message πŸ’Œ. To tell the PEP it's time to start the TLS handshake, the PDP MUST include the Integrity-TLS object in that Client-Accept.

When the PEP gets a Client-Accept with the Integrity-TLS object, it SHOULD kick off the TLS handshake 🀝. If for any reason it can't start the handshake, it MUST close the connection. no exceptions, bestie πŸ™…β€β™€οΈ

Here's the message exchange, bestie πŸ‘€:

C: Client-Open   (Client-Type = 0)
S: Client-Accept (Client-Type = 0, Integrity-TLS)
<TLS handshake>
C/S: <...further messages...>

After the PEP receives the Client-Accept, it MUST NOT send any messages until the TLS handshake is complete 🀐. If the PDP gets a message from the PEP before the handshake starts, the PDP MUST send a Client-Close with error code 15= Authentication Required 🚫. Rude.

A PDP that wants to negotiate security with a PEP that already has a non-secure connection MUST send a Client-Close with the error code 15= Authentication required. The Sub-code (octet 2) holds the required Integrity object's C-Num=16, and octet 3 holds the required Integrity object's C-Type=2. Then the PDP waits for the PEP to reconnect πŸ”. When the PDP receives the Client-Open, it SHOULD use the Client-Accept message to start security negotiation.

6. Connection Closure πŸ‘‹

okay so TLS has built-in ways to close connections securely πŸ”’. If an implementation receives a valid closure alert, it knows no more data is coming on that connection. TLS requires implementations to start a closure alert exchange before closing a connection. It also lets them close without waiting for the peer's closure alert, as long as they send their own first. We call that an "incomplete close" 🫠. TLS lets implementations reuse the session in this case, but COPS/TLS doesn't use that capability at all.

A connection closed without sending a closure alert first is a "premature close" 😬. A premature close doesn't mess with the security of data that already arrived. It just means later data might have been cut off. Since TLS doesn't know where COPS messages begin and end, you have to look at the COPS data itself (specifically the Message header) to figure out whether truncation happened πŸ”.

6.1. PEP System Behavior πŸ–₯️

PEP implementations MUST treat premature closes as errors and any data they received as possibly truncated 🚨. The COPS protocol lets the PEP system check whether truncation actually happened. A PEP system that detects an incomplete close SHOULD recover gracefully 🌸.

PEP systems SHOULD send a closure alert before closing the connection πŸ’Œ. A PEP that isn't ready to receive any more data MAY skip waiting for the PDP's closure alert and just close the connection. That creates an incomplete close on the PDP side, and that's fine 🫢.

6.2. PDP System Behavior πŸ§‘β€πŸ’»

COPS lets a PEP close the connection whenever it wants, so PDPs need to recover gracefully πŸ’…. PDPs SHOULD be ready for an incomplete close from the PEP, because a PEP often shuts down for operational reasons that have nothing to do with policy transfer between the PEP and PDP πŸ™ƒ.

Implementation note: The PDP usually expects to signal the end of data by closing the connection. But the PEP may have already sent its closure alert and dropped the connection 🫣.

PDP systems MUST try to start an exchange of closure alerts with the PEP system before closing the connection 🀝. PDP systems MAY close the connection after sending the closure alert, which creates an incomplete close on the PEP side 🌈.


7. Endpoint Identification and Access Control πŸ›‘οΈ

okay so every PEP implementation of COPS/TLS MUST support an access control mechanism to identify authorized PDPs πŸ•΅οΈβ€β™€οΈ. This makes sure the policy reaching the PEP is actually valid ✨. PEP deployments SHOULD require this access control mechanism for COPS over TLS. When access control is on, the PEP implementation MUST NOT start COPS/TLS connections to systems that the access control mechanism hasn't authorized as PDPs 🚫.

Same energy on the PDP side πŸ‘‘. PDP COPS/TLS implementations MUST support an access control mechanism so they can limit their services to authorized PEP systems only. Deployments MAY choose not to use one at the PDP, since an organization might not think the policy is sensitive and doesn't want to pay to manage credentials for the PEP systems πŸ’Έ. If access controls are used, though, the PDP implementation MUST terminate COPS/TLS connections from unauthorized PEP systems. It also MUST log an error if an auditable logging mechanism is present πŸ“.

Implementations of COPS/TLS MUST use X.509 v3 certificates conforming to [RFC3280] to identify PDP and PEP systems πŸͺͺ. COPS/TLS systems MUST perform certificate verification processing conforming to [RFC3280] πŸ”.

If the PDP's certificate has a subjectAltName extension of type dNSName or iPAddress, that MUST be used as the PDP identity 🎯. If both types are there, dNSName SHOULD be the PDP identity. If neither type is present, the most specific Common Name field in the certificate's Subject field SHOULD be used 🧾.

Matching uses the matching rules in [RFC3280] πŸ“. If the certificate has more than one identity of a given type (like more than one dNSName in the subjectAltName extension), a match on any one of them is fine πŸ™Œ. Generally the COPS system uses the first name for matching, except where the IP address checking requirements below say otherwise.

7.1. PEP Identity πŸͺͺ

When PEP systems aren't access controlled, the PDP doesn't need outside knowledge of what the PEP's identity should be, so checks aren't possible or necessary πŸ€·β€β™€οΈ. In that case, PEP systems don't have to register with a certificate authority, and COPS over TLS uses one-way authentication, with the PDP authenticating to the PEP.

When PEP systems are access controlled, PEPs MUST be the subjects of end entity certificates [RFC3280] πŸŽ€. Then COPS over TLS uses two-way authentication, and the PDP MUST run the same identity checks on the PEPs that it runs on itself πŸ”.

When access controls are in effect at the PDP, PDP implementations MUST have a way to securely get the trust anchor for each authorized Certification Authority (CA) that issues certificates to supported PEPs πŸ”‘.

7.2. PDP Identity 🧭

Usually the PEP makes COPS/TLS requests by checking bootstrap policy information that lists the PDPs it's allowed to connect to πŸ“‹. That policy gives the PEP the PDP's hostname or IP address. How the bootstrap policy gets to the PEP is out of scope for this document 🀫. Still, every PEP implementation MUST provide a way to securely deliver or configure the bootstrap policy πŸ”’.

All PEP implementations MUST be able to securely get the trust anchor for each authorized Certification Authority (CA) that issues PDP certificates πŸ—οΈ. The PEPs MUST also support a way to securely get an access control list (ACL) or filter that identifies the authorized PDPs for each CA. Deployments must take care to avoid circular dependencies when accessing trust anchors and ACLs πŸ”„. At a minimum, trust anchors and ACLs may be installed manually πŸ› οΈ.

PEP deployments that span multiple domains, like on mobile platforms, MAY use different CAs and access control lists in each domain 🌍.

If the PDP hostname or IP address is in the bootstrap policy, the PEP MUST check it against the PDP's identity as shown in the PDP's TLS Certificate message 🧐.

Sometimes the bootstrap policy only identifies the authorized PDP by its IP address. In that case, the subjectAltName MUST be present in the certificate, and it MUST include an iPAddress format that matches the expected name of the policy server πŸ“.

If the PDP's hostname doesn't match the identity in the certificate, a PEP on a user-oriented system MUST either notify the user (PEP systems MAY let the user continue with the connection anyway) or end the connection with a bad certificate error πŸ™‹β€β™€οΈ. PEPs on unattended systems MUST log the error to an appropriate audit log (if one is available) and MUST end the connection with a bad certificate error πŸ€–. Unattended PEP systems MAY offer a configuration setting that turns this check off, but then they MUST also offer a setting that turns it back on ⚠️.


8. Cipher Suite Requirements πŸ”

Implementations MUST support the TLS_RSA_WITH_3DES_EDE_CBC_SHA cipher suite πŸ’–. All other cipher suites are optional.


9. Backward Compatibility πŸ”™

The PEP and PDP SHOULD be backward compatible with peers that haven't been changed to support COPS/TLS 🫢. They SHOULD handle errors that come back in response to the Integrity-TLS object 🩹.


10. IANA Considerations πŸ“š

okay so IANA added this C-Num, C-Type combo for the Integrity-TLS object to the registry at http://www.iana.org/assignments/cops-parameters πŸ—‚οΈ:

0x10  0x02    Message Integrity, Integrity-TLS      [RFC4261]

For Client-Type 0, IANA also added this Flags value for the Integrity-TLS object 🚩:

      0x01 = StartTLS

And for Client-Type 0, IANA added this text for Error Sub-Codes 🧾:

   Error Code: 15
   Error Sub-Code:
   Octet 2: C-Num of the Integrity object
   Octet 3: C-Type of the supported/preferred Integrity object or
            Zero.

  Error-Code    Error-SubCode      Description
              Octet 2  Octet 3
  ---------------------------------------------------
    15          16        0        No security
    15          16        2        Integrity-TLS supported/preferred

Further values for the Flags field and the reserved field can only be assigned by IETF Consensus rule, as defined in [RFC2434] πŸ”’.


11. Security Considerations 🚨

Okay this one is serious, bestie 😀. A COPS PDP and PEP MUST check the results of the TLS negotiation to see whether an acceptable degree of authentication and privacy was reached. If the negotiation landed on unacceptable algorithms or key lengths, either side MAY choose to end the connection πŸ›‘.

A man-in-the-middle attack can be launched by deleting the Integrity-TLS object or by altering the Client-Open or Client-Accept messages πŸ‘€. If security is required, the PEP and PDP bootstrap policy must say so, and PEP and PDP implementations should reject Client-Open or Client-Accept messages that don't include an Integrity-TLS object 🫣.


12. Acknowledgements 🫢

This document freely plagiarizes and adapts Eric Rescorla's similar document [RFC2818], which specifies how HTTP runs over TLS πŸ’œ.

Discussions with David Durham, Scott Hahn, and Ylian Sainte-Hillaire also led to improvements in this document 🌸.

The authors wish to thank Uri Blumenthal for doing a thorough security review of the document πŸ™Œ.


13. References ✨

13.1. Normative References ✨

okay so this is the bit where the RFC lists the docs it needs you to have read first, bestie πŸ“š the whole spec leans on these, so they're the homework you can't skip πŸ’…

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
          Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2748] Durham, D., Boyle, J., Cohen, R., Herzog, S., Rajan, R.,
          and A. Sastry, "The COPS (Common Open Policy Service)
          Protocol", RFC 2748, January 2000.

[RFC2753] Yavatkar, R., Pendarakis, D., and R. Guerin, "A Framework
          for Policy-based Admission Control", RFC 2753, January
          2000.

[RFC3280] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet
          X.509 Public Key Infrastructure Certificate and Certificate
          Revocation List (CRL) Profile", RFC 3280, April 2002.

[RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0",
          RFC 2246, January 1999.

the big ones here are RFC 2748 (COPS, the protocol this whole thing is built on πŸ”₯), RFC 2753 (the policy admission control framework πŸŽ€), RFC 3280 (X.509 certificates and CRLs πŸ”), and RFC 2246 (TLS 1.0, the security layer 🫢)

13.2. Informative References πŸ¦‹

these ones are just extra reading, bestie, nice-to-know not need-to-know 🌸

[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000.

[RFC2595] Newman, C., "Using TLS with IMAP, POP3 and ACAP", RFC 2595,
          June 1999.

[RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an
          IANA Considerations Section in RFCs", BCP 26, RFC 2434,
          October 1998.

Authors' Addresses πŸŽ€

the two authors are both from Intel, in Hillsboro, Oregon 🌈 here's where you can reach them, iykyk πŸ’œ

Amol Kulkarni
Intel Corporation
2111 N.E. 25th Avenue
Hillsboro, OR  97214
USA

EMail: amol.kulkarni@intel.com


Jesse R. Walker
Intel Corporation
2111 N.E. 25th Avenue
Hillsboro, OR  97214
USA

EMail: jesse.walker@intel.com

Copyright (C) The Internet Society (2005). πŸ’–

this doc is covered by the rights, licenses and restrictions in BCP 78, and unless BCP 78 says otherwise, the authors keep all their rights 🫢

this document and everything in it is handed over "AS IS" πŸ™ˆ the contributor, the organization they represent or are sponsored by (if any), the Internet Society, and the Internet Engineering Task Force all disclaim ALL WARRANTIES, EXPRESS OR IMPLIED, including but not limited to any warranty that using the information here won't infringe any rights, and any implied warranties of merchantability or fitness for a particular purpose. no promises, bestie, just vibes πŸ’€

Intellectual Property πŸ”

the IETF doesn't take a position on whether any Intellectual Property Rights (or other rights) that someone might claim over the tech in this doc are valid or how far they reach, and it doesn't say whether any license for those rights is or isn't available 🌸 it also doesn't claim it went looking for any of those rights itself πŸ™ˆ

the procedures for rights in RFC docs are in BCP 78 and BCP 79 πŸ“š

copies of IPR disclosures sent to the IETF Secretariat, any assurances that licenses will be made available, and the results of any attempt to get a general license or permission for implementers or users to use proprietary rights can be found in the IETF's online IPR repository at http://www.ietf.org/ipr ✨

the IETF also invites anyone who knows about copyrights, patents, patent applications, or other proprietary rights that might cover tech needed to implement this standard to let them know, by writing to ietf-ipr@ietf.org πŸ’…

Acknowledgement 🌷

funding for the RFC Editor function is currently provided by the Internet Society 🌈 thank you, ISOC, you're literally keeping the RFCs alive 🫢✨

πŸ“¦ where this page comes from