mirror of
https://github.com/fleetdm/fleet
synced 2026-05-19 15:09:20 +00:00
for #19027, this modifies the website to accept an `deliveryMethod` parameter to respond with the signed CSR instead of delivering an email. The current approach also maintains backwards compatibility: **Response without `deliveryMethod` (unchanged except for custom headers)** ``` $ curl --insecure -v -H 'content-type: application/json' http://localhost:2024/api/v1/deliver-apple-csr -d '{"unsignedCsrData": "foo"}' * Trying [::1]:2024... * Connected to localhost (::1) port 2024 > POST /api/v1/deliver-apple-csr HTTP/1.1 > Host: localhost:2024 > User-Agent: curl/8.4.0 > Accept: */* > content-type: application/json > Content-Length: 26 > < HTTP/1.1 200 OK < X-Powered-By: Sails <sailsjs.com> < Cache-Control: no-cache, no-store < X-Exit: success < X-Exit-Description: Delivered email to specified email address with certificate signing request attached. < Content-Type: text/plain; charset=utf-8 < Content-Length: 2 < ETag: W/"2-nOO9QiTIwXgNtWtBJezz8kv3SLc" < Set-Cookie: sails.sid=s%3AqOZoNKY2CCZ6PFb9fIKaAjtiTKjB7Gum.9jodWIUG6DCNnXu%2Bn%2BF8cJmI%2Fn19Tk%2FdIkDPBl%2BILbI; Path=/; HttpOnly < Date: Wed, 22 May 2024 18:23:16 GMT < Connection: keep-alive < Keep-Alive: timeout=5 < * Connection #0 to host localhost left intact OK ``` **Response with `deliveryMethod=json`** ``` $ curl --insecure -v -H 'content-type: application/json' http://localhost:2024/api/v1/deliver-apple-csr?deliveryMethod=json -d '{"unsignedCsrData": "foo"}' * Trying [::1]:2024... * Connected to localhost (::1) port 2024 > POST /api/v1/deliver-apple-csr?alt=json HTTP/1.1 > Host: localhost:2024 > User-Agent: curl/8.4.0 > Accept: */* > content-type: application/json > Content-Length: 26 > < HTTP/1.1 200 OK < X-Powered-By: Sails <sailsjs.com> < Cache-Control: no-cache, no-store < Content-Type: application/json; charset=utf-8 < X-Exit: success < X-Exit-Description: Delivered email to specified email address with certificate signing request attached. < X-Exit-Output-Friendly-Name: RSS feed XML < Content-Length: 26 < ETag: W/"1a-NnuclRv86ZEKA9WB967iUGlz84s" < Set-Cookie: sails.sid=s%3AbpaKOTbNe4E911qH4z1-12ABGd_z2d2I.mAimDARoZgnq8zpJHcF95y8qFJXX0iky4Suj0HUKjpI; Path=/; HttpOnly < Date: Wed, 22 May 2024 18:22:07 GMT < Connection: keep-alive < Keep-Alive: timeout=5 < * Connection #0 to host localhost left intact {"csr":"UEQ5NGJXdy4uLg=="} ``` # Checklist for submitter - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Eric <eashaw@sailsjs.com> |
||
|---|---|---|
| .. | ||
| account | ||
| admin | ||
| articles | ||
| customers | ||
| dashboard | ||
| docs | ||
| entrance | ||
| handbook | ||
| legal | ||
| reports | ||
| try-fleet | ||
| webhooks | ||
| create-or-update-one-newsletter-subscription.js | ||
| create-vanta-authorization-request.js | ||
| deliver-apple-csr.js | ||
| deliver-contact-form-message.js | ||
| deliver-demo-signup.js | ||
| deliver-mdm-beta-signup.js | ||
| deliver-mdm-demo-email.js | ||
| deliver-talk-to-us-form-submission.js | ||
| download-rss-feed.js | ||
| download-sitemap.js | ||
| get-human-interpretation-from-osquery-sql.js | ||
| save-questionnaire-progress.js | ||
| unsubscribe-from-all-newsletters.js | ||
| view-connect-vanta.js | ||
| view-contact.js | ||
| view-device-management.js | ||
| view-endpoint-ops.js | ||
| view-faq.js | ||
| view-fleetctl-preview.js | ||
| view-homepage-or-redirect.js | ||
| view-integrations.js | ||
| view-osquery-table-details.js | ||
| view-press-kit.js | ||
| view-pricing.js | ||
| view-query-detail.js | ||
| view-query-library.js | ||
| view-start.js | ||
| view-support.js | ||
| view-transparency.js | ||
| view-vanta-authorization.js | ||
| view-vulnerability-management.js | ||