-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use encrytped data in example as recommended in Privacy and Security section #1290
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ data. | |
- [Event Data](#event-data) | ||
- [Size Limits](#size-limits) | ||
- [Privacy & Security](#privacy-and-security) | ||
- [Example](#example) | ||
- [Example](#examples) | ||
|
||
## Overview | ||
|
||
|
@@ -608,9 +608,9 @@ Consider the following to prevent inadvertent leakage especially when leveraging | |
Protocol level security SHOULD be employed to ensure the trusted and secure | ||
exchange of CloudEvents. | ||
|
||
## Example | ||
## Examples | ||
|
||
The following example shows a CloudEvent serialized as JSON: | ||
### Example of a CloudEvent with extension fields | ||
|
||
```JSON | ||
{ | ||
|
@@ -626,3 +626,31 @@ The following example shows a CloudEvent serialized as JSON: | |
"data" : "<much wow=\"xml\"/>" | ||
} | ||
``` | ||
|
||
### Example of a CloudEvent with encrypted data | ||
|
||
The following example shows a CloudEvent serialized as JSON with line-breaks | ||
for display purposes only: | ||
|
||
``` | ||
{ | ||
"specversion" : "1.0", | ||
"type" : "PAYMENT.AUTHORIZATION.CREATED", | ||
"source" : "https://paymentprocessor.example.com/", | ||
"subject" : "c7bbb040-d458-4d47-82a8-45413f9f2d33", | ||
"id" : "a978702e-ef48-4032-ac18-a057e0104076", | ||
"time" : "2024-05-30T17:31:00Z", | ||
"datacontenttype" : "application/jose", | ||
"data" : "eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00ifQ. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, because the contenttype defines what data is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually, |
||
OKOawDo13gRp2ojaHV7LFpZcgV7T6DVZKTyKOMTYUmKoTCVJRgckCL9kiMT03JGe | ||
ipsEdY3mx_etLbbWSrFr05kLzcSr4qKAq7YN7e9jwQRb23nfa6c9d-StnImGyFDb | ||
Sv04uVuxIp5Zms1gNxKKK2Da14B8S4rzVRltdYwam_lDp5XnZAYpQdb76FdIKLaV | ||
mqgfwX7XWRxv2322i-vDxRfqNzo_tETKzpVLzfiwQyeyPGLBIO56YJ7eObdv0je8 | ||
1860ppamavo35UgoRdbYaBcoh9QcfylQr66oc6vFWXRcZ_ZT2LawVCWTIy3brGPi | ||
6UklfCpIMfIjf7iGdXKHzg. | ||
48V1_ALb6US04U3b. | ||
5eym8TW_c8SuK0ltJ3rpYIzOeDQz7TALvtu6UG9oMo4vpzs9tX_EFShS8iB7j6ji | ||
SdiwkIr3ajwQzaBtQD_A. | ||
XFBoMYUZodetZdvTiFvSkQ" | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think so. See https://datatracker.ietf.org/doc/html/rfc7515#section-9.2.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, my bad