Security Events Working Group | A. Backman, Ed. |
Internet-Draft | Amazon |
Intended status: Standards Track | M. Jones, Ed. |
Expires: April 4, 2019 | Microsoft |
M. Scurtescu | |
M. Ansari | |
Cisco | |
A. Nadalin | |
Microsoft | |
October 1, 2018 |
Push-Based SET Token Delivery Using HTTP
draft-ietf-secevent-http-push-02
This specification defines how a Security Event Token (SET) may be delivered to an intended recipient using HTTP POST. The SET is transmitted in the body of an HTTP POST reqest to an endpoint operated by the recipient, and the recipient indicates successful or failed transmission via the HTTP response.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 4, 2019.
Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
This specification defines a mechanism by which a holder of a Security Event Token (SET) may deliver the SET to an intended recipient via HTTP POST.
Push-Based SET Delivery over HTTP POST is intended for scenarios where all of the following apply:
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
Throughout this documents all figures may contain spaces and extra line-wrapping for readability and space limitations.
This specification utilizes terminology defined in [RFC8417], as well as the terms defined below:
To deliver a SET to a given SET Receiver, the SET Transmitter makes a SET Transmission Request to the SET Receiver, with the SET itself contained within the request. The SET Receiver replies to this request with a response either acknowledging successful transmission of the SET, or indicating that an error occurred while receiving, parsing, and/or validating the SET.
Upon receipt of a SET, the SET Receiver SHALL validate that all of the following are true:
The mechanisms by which the SET Receiver performs this validation are out-of-scope for this document. SET parsing and issuer and audience identification are defined in [RFC8417]. The mechanism for validating the authenticity of a SET is implementation specific, and may vary depending on the authentication mechanisms in use, and whether the SET is signed and/or encrypted (See Section 3).
The SET Receiver SHOULD ensure that the SET is persisted in a way that is sufficient to meet the SET Receiver's own reliability requirements, and MUST NOT expect or depend on a SET Transmitter to re-transmit or otherwise make available to the SET Receiver a SET once the SET Receiver acknowledges that it was received successfully.
Once the SET has been validated and persisted, the SET Receiver SHOULD immediately return a response indicating that the SET was successfully delivered. The SET Receiver SHOULD NOT perform extensive business logic that processes the event expressed by the SET prior to sending this response. Such logic SHOULD be executed asynchronously from delivery, in order to minimize the expense and impact of SET delivery on the SET Transmitter.
The SET Transmitter SHOULD NOT re-transmit a SET, unless the response from the SET Receiver in previous transmissions indicated a potentially recoverable error (such as server unavailability that may be transient, or a decryption failure that may be due to misconfigured keys on the SET Receiver's side). In the latter case, the SET Transmitter MAY re-transmit a SET, after an appropriate delay to avoid overwhelming the SET Receiver (see Section 4).
The SET Transmitter MAY provide an out-of-band mechanism by which a SET Receiver may be notified of delivery failures, and MAY retain SETs that it failed to deliver and make them available to the SET Receiver via other means.
To transmit a SET to a SET Receiver, the SET Transmitter makes an HTTP POST request to an HTTP endpoint provided by the SET Receiver. The Content-Type header of this request MUST be "application/secevent+jwt" as defined in Sections 2.2 and 6.2 of RFC8417, and the Accept header MUST be "application/json". The request body MUST consist of the SET itself, represented as a JWT.
The mechanisms by which the SET Transmitter determines the HTTP endpoint to use when transmitting a SET to a given SET Receiver are not defined by this specification and may be implementation-specific.
The following is a non-normative example of a SET transmission request:
POST /Events HTTP/1.1 Host: notify.examplerp.com Accept: application/json Content-Type: application/secevent+jwt eyJhbGciOiJub25lIn0 . eyJwdWJsaXNoZXJVcmkiOiJodHRwczovL3NjaW0uZXhhbXBsZS5jb20iLCJmZWV kVXJpcyI6WyJodHRwczovL2podWIuZXhhbXBsZS5jb20vRmVlZHMvOThkNTI0Nj FmYTViYmM4Nzk1OTNiNzc1NCIsImh0dHBzOi8vamh1Yi5leGFtcGxlLmNvbS9GZ WVkcy81ZDc2MDQ1MTZiMWQwODY0MWQ3Njc2ZWU3Il0sInJlc291cmNlVXJpcyI6 WyJodHRwczovL3NjaW0uZXhhbXBsZS5jb20vVXNlcnMvNDRmNjE0MmRmOTZiZDZ hYjYxZTc1MjFkOSJdLCJldmVudFR5cGVzIjpbIkNSRUFURSJdLCJhdHRyaWJ1dG VzIjpbImlkIiwibmFtZSIsInVzZXJOYW1lIiwicGFzc3dvcmQiLCJlbWFpbHMiX SwidmFsdWVzIjp7ImVtYWlscyI6W3sidHlwZSI6IndvcmsiLCJ2YWx1ZSI6Impk b2VAZXhhbXBsZS5jb20ifV0sInBhc3N3b3JkIjoibm90NHUybm8iLCJ1c2VyTmF tZSI6Impkb2UiLCJpZCI6IjQ0ZjYxNDJkZjk2YmQ2YWI2MWU3NTIxZDkiLCJuYW 1lIjp7ImdpdmVuTmFtZSI6IkpvaG4iLCJmYW1pbHlOYW1lIjoiRG9lIn19fQ .
Figure 1: Example SET Transmission Request
If the SET is determined to be valid, the SET Receiver SHALL "acknowledge" successful transmission by responding with HTTP Response Status Code 202 (see Section 6.3.3 of RFC7231). The body of the response MUST be empty.
The following is a non-normative example of a successful receipt of a SET.
HTTP/1.1 202 Accepted
Figure 2: Example Successful Delivery Response
Note that the purpose of the "acknowledgement" response is to let the SET Transmitter know that a SET has been delivered and the information no longer needs to be retained by the SET Transmitter. Before acknowledgement, SET Receivers SHOULD ensure they have validated received SETs and retained them in a manner appropriate to information retention requirements appropriate to the SET event types signaled. The level and method of retention of SETs by SET Receivers is out-of-scope of this specification.
In the event of a general HTTP error condition, the SET Receiver MAY respond with an appropriate HTTP Status Code as defined in Section 6 of RFC7231.
When the SET Receiver detects an error parsing or validating a SET transmitted in a SET Transmission Request, the SET Receiver SHALL respond with an HTTP Response Status Code of 400. The Content-Type header of this response MUST be "application/json", and the body MUST be a JSON object containing the following name/value pairs:
The following is an example non-normative error response.
HTTP/1.1 400 Bad Request Content-Type: application/json { "err":"dup", "description":"SET already received. Ignored." }
Figure 3: Example Error Response
Security Event Token Delivery Error Codes are strings that identify a specific type of error that may occur when parsing or validating a SET. Every Security Event Token Delivery Error Code MUST have a unique name registered in the IANA "Security Event Token Delivery Error Codes" registry established by Section 7.1.
The following table presents the initial set of Error Codes that are registered in the IANA "Security Event Token Delivery Error Codes" registry:
Error Code | Description |
---|---|
json | Invalid JSON object. |
jwtParse | Invalid or unparsable JWT or JSON structure. |
jwtHdr | In invalid JWT header was detected. |
jwtCrypto | Unable to parse due to unsupported algorithm. |
jws | Signature was not validated. |
jwe | Unable to decrypt JWE encoded data. |
jwtAud | Invalid audience value. |
jwtIss | Issuer not recognized. |
setType | An unexpected Event type was received. |
setParse | Invalid structure was encountered such as an inability to parse or an incomplete set of Event claims. |
setData | SET event claims incomplete or invalid. |
dup | A duplicate SET was received and has been ignored. |
The SET delivery method described in this specification is based upon HTTP and depends on the use of TLS and/or standard HTTP authentication and authorization schemes as per [RFC7235].
Because SET Delivery describes a simple function, authorization for the ability to pick-up or deliver SETs can be derived by considering the identity of the SET issuer, or via other employed authentication methods. Because SETs are not commands (see ), SET Receivers are free to ignore SETs that are not of interest.
Delivery reliability requirements may vary from implementation to implementation. This specification defines the response from the SET Receiver in such a way as to provide the SET Transmitter with the information necessary to determine what further action is required, if any, in order to meet their requirements. SET Transmitters with high reliability requirements may be tempted to always retry failed transmissions, however it should be noted that for many types of SET delivery errors, a retry is extremely unlikely to be successful. For example, json, jwtParse, and setParse all indicate structural errors in the content of the SET that are likely to remain when re-transmitting the same SET. Others such as jws or jwe may be transient, for example if cryptographic material has not been properly distributed to the SET Receiver's systems.
Implementers SHOULD evaluate their reliability requirements and the impact of various retry mechanisms on the performance of their systems to determine the correct strategy for various error conditions.
In scenarios where HTTP authorization or TLS mutual authentication are not used or are considered weak, JWS signed SETs SHOULD be used (see [RFC7515] and Security Considerations). This enables the SET Receiver to validate that the SET issuer is authorized to deliver SETs.
SETs contain sensitive information that is considered PII (e.g. subject claims). Therefore, SET Transmitters and SET Receivers MUST require the use of a transport-layer security mechanism. Event delivery endpoints MUST support TLS 1.2 [RFC5246] and MAY support additional transport-layer mechanisms meeting its security requirements. When using TLS, the client MUST perform a TLS/SSL server certificate check, per [RFC6125]. Implementation security considerations for TLS can be found in "Recommendations for Secure Use of TLS and DTLS" [RFC7525].
The SET Receiver may be vulnerable to a denial-of-service attack where a malicious party makes a high volume of requests containing invalid SETs, causing the endpoint to expend significant resources on cryptographic operations that are bound to fail. This may be mitigated by authenticating SET Transmitters with a mechanism with low runtime overhead, such as mutual TLS or statically assigned bearer tokens.
At the time of receipt, the SET Receiver can rely upon transport layer mechanisms, HTTP authentication methods, and/or other context from the transmission request to authenticate the SET Transmitter and validate the authenticity of the SET. However, this context is typically unavailable to systems that the SET Receiver forwards the SET onto, or to systems that retrieve the SET from storage. If the SET Receiver requires the ability to validate SET authenticity outside of the context of the transmission request, then the SET Transmitter SHOULD sign the SET in accordance with [RFC7515], or encrypt it using an authenticated encryption scheme in accordance with [RFC7516].
If a SET needs to be retained for audit purposes, JWS MAY be used to provide verification of its authenticity.
When sharing personally identifiable information or information that is otherwise considered confidential to affected users, SET Transmitters and Receivers MUST have the appropriate legal agreements and user consent or terms of service in place.
The propagation of subject identifiers can be perceived as personally identifiable information. Where possible, SET Transmitters and Receivers SHOULD devise approaches that prevent propagation -- for example, the passing of a hash value that requires the subscriber to already know the subject.
This document defines Security Event Token Delivery Error Codes, for which IANA is asked to create and maintain a new registry titled "Security Event Token Delivery Error Codes". Initial values for the Security Event Token Delivery Error Codes registry are given in Table 1. Future assignments are to be made through the Expert Review registration policy ([RFC8126]) and shall follow the template presented in Section 7.1.1.
[[EDITORS NOTE: This section to be removed prior to publication]]
The following pub/sub, queuing, streaming systems were reviewed as possible solutions or as input to the current draft:
XMPP Events
The WG considered the XMPP events ands its ability to provide a single messaging solution without the need for both polling and push modes. The feeling was the size and methodology of XMPP was to far apart from the current capabilities of the SECEVENTs community which focuses in on HTTP based service delivery and authorization.
Amazon Simple Notification Service
Simple Notification Service, is a pub/sub messaging product from AWS. SNS supports a variety of subscriber types: HTTP/HTTPS endpoints, AWS Lambda functions, email addresses (as JSON or plain text), phone numbers (via SMS), and AWS SQS standard queues. It doesn’t directly support pull, but subscribers can get the pull model by creating an SQS queue and subscribing it to the topic. Note that this puts the cost of pull support back onto the subscriber, just as it is in the push model. It is not clear that one way is strictly better than the other; larger, sophisticated developers may be happy to own message persistence so they can have their own internal delivery guarantees. The long tail of OIDC clients may not care about that, or may fail to get it right. Regardless, I think we can learn something from the Delivery Policies supported by SNS, as well as the delivery controls that SQS offers (e.g. Visibility Timeout, Dead-Letter Queues). I’m not suggesting that we need all of these things in the spec, but they give an idea of what features people have found useful.
Other information:
Apache Kafka
Apache Kafka is an Apache open source project based upon TCP for distributed streaming. It prescribes some interesting general purpose features that seem to extend far beyond the simpler streaming model SECEVENTs is after. A comment from MS has been that Kafka does an acknowledge with poll combination event which seems to be a performance advantage. See: https://kafka.apache.org/intro
Google Pub/Sub
Google Pub Sub system favours a model whereby polling and acknowledgement of events is done as separate endpoints as separate functions.
Information:
The editors would like to thanks the members of the SCIM WG which began discussions of provisioning events starting with: draft-hunt-scim-notify-00 in 2015.
The editors would like to thank Phil Hunt and the other authors of draft-ietf-secevent-delivery-02, on which this draft is based.
The editor would like to thank the participants in the the SECEVENTS working group for their support of this specification.
Draft 00 - AB - Based on draft-ietf-secevent-delivery-02 with the following changes:
Draft 01 - AB:
Draft 02 - AB: