From 2e389966e633387b9c74f16e6a9d0cc06aeaa736 Mon Sep 17 00:00:00 2001 From: c0repwn3r Date: Tue, 7 Feb 2023 13:19:29 -0500 Subject: [PATCH] add cicd --- api/v1/dnclient.txt | 87 ++++++++++++++++++++++++++++++++++++ api/v2/enroll.txt | 22 +++++++++ builds.yml | 11 +++++ trifid-api/src/routes/mod.rs | 20 +++++++++ 4 files changed, 140 insertions(+) create mode 100644 api/v1/dnclient.txt create mode 100644 api/v2/enroll.txt create mode 100644 builds.yml diff --git a/api/v1/dnclient.txt b/api/v1/dnclient.txt new file mode 100644 index 0000000..909b5e3 --- /dev/null +++ b/api/v1/dnclient.txt @@ -0,0 +1,87 @@ + +POST /v1/dnclient HTTP/2 +Host: localhost:8087 +User-Agent: dnclient/0.1.8 +Content-Length: 300 +Accept-Encoding: gzip, deflate + +{"version":1,"hostID":"host-C6TNZPJLOTNSPHFSJGEYPS7JHM","counter":1,"message":"eyJ0eXBlIjoiQ2hlY2tGb3JVcGRhdGUiLCJ2YWx1ZSI6bnVsbCwidGltZXN0YW1wIjoiMjAyMy0wMi0wMVQxMzoyNDo1Ny4wMDU1OTA4NC0wNTowMCJ9","signature":"1VApA+Ls08bY+TaDyR0XQ/3kBBJ1u5FSY665VaTjr6IwcGFm7ngj5xuOXZtoKz3mLkg9fsHjARd+MAfCkPFdDQ=="} + +HTTP/2 200 OK +Cache-Control: no-store +Content-Security-Policy: default-src 'none' +Content-Type: application/json; charset=utf-8 +Strict-Transport-Security: max-age=31536000; includeSubdomains +Vary: Origin +X-Content-Type-Options: nosniff +X-Frame-Options: DENY +X-Request-Id: WJW3OBZCX7O2XDEAPHAZIMVERM +Content-Length: 49 +Date: Wed, 01 Feb 2023 18:24:36 GMT + +{"data":{"updateAvailable":false},"metadata":{}} + +POST /v1/dnclient HTTP/2 +Host: 127.0.0.1:8087 +User-Agent: dnclient/0.1.8 +Content-Length: 304 +Accept-Encoding: gzip, deflate + +{"version":1,"hostID":"host-C6TNZPJLOTNSPHFSJGEYPS7JHM","counter":1,"message":"eyJ0eXBlIjoiQ2hlY2tGb3JVcGRhdGUiLCJ2YWx1ZSI6bnVsbCwidGltZXN0YW1wIjoiMjAyMy0wMi0wMVQxMzoyNzoyMC4yMDczMjU2NzgtMDU6MDAifQ==","signature":"EImd4OPnMqF2JqgudzioxkRMMCms617GnZhjy5KQ9Gfl0ui2mMpLTGu4iAvfMGu0KmrlT+dpxLD8l+NYjSeVCg=="} + +HTTP/2 200 OK +Cache-Control: no-store +Content-Security-Policy: default-src 'none' +Content-Type: application/json; charset=utf-8 +Strict-Transport-Security: max-age=31536000; includeSubdomains +Vary: Origin +X-Content-Type-Options: nosniff +X-Frame-Options: DENY +X-Request-Id: TGXXBORPW2PUAZDLCK2UOZGBQY +Content-Length: 49 +Date: Wed, 01 Feb 2023 18:26:59 GMT + +{"data":{"updateAvailable":false},"metadata":{}} + +POST /v1/dnclient HTTP/2 +Host: 127.0.0.1:8087 +User-Agent: dnclient/0.1.8 +Content-Length: 300 +Accept-Encoding: gzip, deflate + +{"version":1,"hostID":"host-C6TNZPJLOTNSPHFSJGEYPS7JHM","counter":1,"message":"eyJ0eXBlIjoiQ2hlY2tGb3JVcGRhdGUiLCJ2YWx1ZSI6bnVsbCwidGltZXN0YW1wIjoiMjAyMy0wMi0wMVQxMzozMDoyMC4yMDc3NTc2OS0wNTowMCJ9","signature":"bUZln8ykcVa3ZUjJFmTphSrCULkyLa+s9VvbJj6xou8WSlKcXoZtewxuyOKe6ZQaVBTABOPZvQ/YWwkj5SgsDg=="} + +HTTP/2 200 OK +Cache-Control: no-store +Content-Security-Policy: default-src 'none' +Content-Type: application/json; charset=utf-8 +Strict-Transport-Security: max-age=31536000; includeSubdomains +Vary: Origin +X-Content-Type-Options: nosniff +X-Frame-Options: DENY +X-Request-Id: GX4BUG7DHV47ZVRFGWZ7CYDU74 +Content-Length: 48 +Date: Wed, 01 Feb 2023 18:29:59 GMT + +{"data":{"updateAvailable":true},"metadata":{}} + +POST /v1/dnclient HTTP/2 +Host: 127.0.0.1:8087 +User-Agent: dnclient/0.1.8 +Content-Length: 1024 +Accept-Encoding: gzip, deflate + +{"version":1,"hostID":"host-C6TNZPJLOTNSPHFSJGEYPS7JHM","counter":1,"message":"eyJ0eXBlIjoiRG9VcGRhdGUiLCJ2YWx1ZSI6ImV5SmxaRkIxWW10bGVWQkZUU0k2SWt4VE1IUk1VekZEVWxWa1NsUnBRazlTVlVwV1ZFVkZaMUpWVVhsT1ZGVjRUMU5DVVZaVlNrMVRWVTFuVXpCV1dreFRNSFJNVXpCTFlVZGFWVTFWVGtWaVJrWTFXbTFLYlZKVmFFeFZWM1ExV1d4Q05WRlhPWEpWVld4SFlVUk9TbGxVWkhOVGJGWlNaVVJXWVdJelNrTk5SREJMVEZNd2RFeFRNVVpVYTFGblZHdFdRMVpWZUVKSlJWWkZUV3BWTVUxVWEyZFZSbFpEVkVWc1JFbEZkRVpYVXpCMFRGTXdkRU5uUFQwaUxDSmthRkIxWW10bGVWQkZUU0k2SWt4VE1IUk1VekZEVWxWa1NsUnBRazlTVlVwV1ZFVkZaMWRFU1RGT1ZFVTFTVVpDVmxGcmVFcFJlVUpNVWxacmRFeFRNSFJNVVhCc1RqQlNRbFZ0VFhsWFJtaE9UMVpaZG1WVVNrTmhSbHBXV2xWb2QyTnJjM2hsUlRGcFRXdEpkMUV5ZEV0V00wb3pWVVU0ZUZKV1ZrWlFVVzkwVEZNd2RFeFZWazlTUTBKUFVsVktWbFJGUldkWFJFa3hUbFJGTlVsR1FsWlJhM2hLVVhsQ1RGSldhM1JNVXpCMFRGRnZQU0lzSW01dmJtTmxJam9pV0ZwUVZuSTFPSEp4WVVsdU1GaDZORkpIUVRkMFVUMDlJbjA9IiwidGltZXN0YW1wIjoiMjAyMy0wMi0wMVQxMzozMDoyMC40MzgwMTYzNTktMDU6MDAifQ==","signature":"NeMMe4ZisvyxVolalR+4WG+X/uogR4hBN94Q/0x/xD6xgNJK9FaoJDjlKUyjuEsjT3cBx0t9FDvu3Fb3DUJTDg=="} + +HTTP/2 200 OK +Cache-Control: no-store +Content-Security-Policy: default-src 'none' +Content-Type: application/json; charset=utf-8 +Strict-Transport-Security: max-age=31536000; includeSubdomains +Vary: Origin +X-Content-Type-Options: nosniff +X-Frame-Options: DENY +X-Request-Id: LCVYDE6NIVSICOERUVSCYYXIMI +Date: Wed, 01 Feb 2023 18:30:00 GMT + +{"data":{"version":1,"message":"eyJjb25maWciOiJabWx5WlhkaGJHdzZDaUFnYVc1aWIzVnVaRG9LSUNBdElHUmxjMk55YVhCMGFXOXVPaUJCYkd4dmQzTWdjR2x1WnlCeVpYRjFaWE4wY3lCbWNtOXRJRzkwYUdWeUlHaHZjM1J6Q2lBZ0lDQm9iM04wT2lCaGJua0tJQ0FnSUhCdmNuUTZJR0Z1ZVFvZ0lDQWdjSEp2ZEc4NklHbGpiWEFLSUNCdmRYUmliM1Z1WkRvS0lDQXRJR2h2YzNRNklHRnVlUW9nSUNBZ2NHOXlkRG9nWVc1NUNpQWdJQ0J3Y205MGJ6b2dZVzU1Q214cFoyaDBhRzkxYzJVNkNpQWdZVzFmYkdsbmFIUm9iM1Z6WlRvZ2RISjFaUXBzYVhOMFpXNDZDaUFnYUc5emREb2dNQzR3TGpBdU1Bb2dJSEJ2Y25RNklEUXlORElLSUNCeVpXRmtYMkoxWm1abGNqb2dNVEEwT0RVM05qQUtJQ0IzY21sMFpWOWlkV1ptWlhJNklERXdORGcxTnpZd0NteHZaMmRwYm1jNkNpQWdabTl5YldGME9pQjBaWGgwQ2lBZ2JHVjJaV3c2SUdsdVptOEtjR3RwT2dvZ0lHSnNiMk5yYkdsemREb2dXMTBLSUNCallUb2dmQW9nSUNBZ0xTMHRMUzFDUlVkSlRpQk9SVUpWVEVFZ1EwVlNWRWxHU1VOQlZFVXRMUzB0TFFvZ0lDQWdRMjEzUzA5clRteGpibEp3V20xc2FsbFlVbXhKUlVZeFpFZG9kbU50YkRCbFUwSnRZak5KWjFreU9YbGFWVUpxWWpO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VZFTWpVMU1Ua2dVRlZDVEVsRElFdEZXUzB0TFMwdENrcGllR0ZZZVZGUFJtWm5NWEpyYTI1aU1UUnNZeko0YTJObU5qTndTV1ZxUldkaGNqZDNSek5WYkVVOUNpMHRMUzB0UlU1RUlFNUZRbFZNUVNCRlJESTFOVEU1SUZCVlFreEpReUJMUlZrdExTMHRMUW90TFMwdExVSkZSMGxPSUU1RlFsVk1RU0JGUkRJMU5URTVJRkJWUWt4SlF5QkxSVmt0TFMwdExRcERZVkUwYWsxUlp5OHZRVmhMT0RZelJ6TkZaakZhU21oV01HcFNRMUo1VDNOMVRUQkhVMk41TlcxSlBRb3RMUzB0TFVWT1JDQk9SVUpWVEVFZ1JVUXlOVFV4T1NCUVZVSk1TVU1nUzBWWkxTMHRMUzBLIn0=","signature":"M3cZGUZdXyArIw3qdH/1GXlPUqE/YiP5VeZLU876RtJGm7SBBB5Cl3I5ODjvQmEiF2okffmr9zd884k5izh6AQ=="},"metadata":{}} diff --git a/api/v2/enroll.txt b/api/v2/enroll.txt new file mode 100644 index 0000000..bc3a41e --- /dev/null +++ b/api/v2/enroll.txt @@ -0,0 +1,22 @@ +POST /v2/enroll HTTP/1.1 +Host: localhost:8087 +User-Agent: dnclient/0.1.8 +Content-Length: 472 +Accept-Encoding: gzip, deflate +Connection: close + +{"code":"xM22QsIzd4F0nLDTbh86RCSYwelfU_Hshqt-7u4yy_Y","dhPubkey":"LS0tLS1CRUdJTiBORUJVTEEgWDI1NTE5IFBVQkxJQyBLRVktLS0tLQpqZW9aaDZZYUNNSHZKK04zWGRlQ1hCbHo3dm5saTBjL1NlQ1hVR3lYbEIwPQotLS0tLUVORCBORUJVTEEgWDI1NTE5IFBVQkxJQyBLRVktLS0tLQo=","edPubkey":"LS0tLS1CRUdJTiBORUJVTEEgRUQyNTUxOSBQVUJMSUMgS0VZLS0tLS0KWHE0RG9mUGJoQzBubjc4VEhRWUxhNC83V1Ixei9iU1kzSm9pRzNRZ1VMcz0KLS0tLS1FTkQgTkVCVUxBIEVEMjU1MTkgUFVCTElDIEtFWS0tLS0tCg==","timestamp":"2023-02-01T13:24:56.380006369-05:00"} + +HTTP/2 200 OK +Cache-Control: no-store +Content-Security-Policy: default-src 'none' +Content-Type: application/json; charset=utf-8 +Strict-Transport-Security: max-age=31536000; includeSubdomains +Vary: Origin +X-Content-Type-Options: nosniff +X-Frame-Options: DENY +X-Request-Id: IRZBCFJUXZKLAMF4VC2TE6LQ4I +Content-Length: 3370 +Date: Wed, 01 Feb 2023 18:24:36 GMT + +{"data":{"config":"ZmlyZXdhbGw6CiAgaW5ib3VuZDoKICAtIGRlc2NyaXB0aW9uOiBBbGxvd3MgcGluZyByZXF1ZXN0cyBmcm9tIG90aGVyIGhvc3RzCiAgICBob3N0OiBhbnkKICAgIHBvcnQ6IGFueQogICAgcHJvdG86IGljbXAKICBvdXRib3VuZDoKICAtIGhvc3Q6IGFueQogICAgcG9ydDogYW55CiAgICBwcm90bzogYW55CmxpZ2h0aG91c2U6CiAgYW1fbGlnaHRob3VzZTogdHJ1ZQpsaXN0ZW46CiAgaG9zdDogMC4wLjAuMAogIHBvcnQ6IDQyNDIKICByZWFkX2J1ZmZlcjogMTA0ODU3NjAKICB3cml0ZV9idWZmZXI6IDEwNDg1NzYwCmxvZ2dpbmc6CiAgZm9ybWF0OiB0ZXh0CiAgbGV2ZWw6IGluZm8KcGtpOgogIGJsb2NrbGlzdDogW10KICBjYTogfAogICAgLS0tLS1CRUdJTiBORUJVTEEgQ0VSVElGSUNBVEUtLS0tLQogICAgQ213S09rTmxjblJwWm1sallYUmxJRUYxZEdodmNtbDBlU0JtYjNJZ1kyOXlaVUJqYjNKbFpHOWxjeTVrWlhZbgogICAgY3lCUGNtZGhibWw2WVhScGIyNG96dC9wbmdZd3pzYnVyUVk2SUE2Z2Nwano0RDRHTEJkQTFCUXhtUi9mQ1R4cwogICAgSjZQdStCZGxGaXgzZmxBVVFBRVNRQnpjUUg2MWxWdVFWTlpDbXZZenpVYnN6SHJQ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tFWS0tLS0tCkpieGFYeVFPRmZnMXJra25iMTRsYzJ4a2NmNjNwSWVqRWdhcjd3RzNVbEU9Ci0tLS0tRU5EIE5FQlVMQSBFRDI1NTE5IFBVQkxJQyBLRVktLS0tLQotLS0tLUJFR0lOIE5FQlVMQSBFRDI1NTE5IFBVQkxJQyBLRVktLS0tLQpDYVE0ak1RZy8vQVhLODYzRzNFZjFaSmhWMGpSQ1J5T3N1TTBHU2N5NW1JPQotLS0tLUVORCBORUJVTEEgRUQyNTUxOSBQVUJMSUMgS0VZLS0tLS0K","organization":{"id":"org-56I3FGHQBB4TYQJ6QENKCUAMD4","name":"core@coredoes.dev's Organization"}},"metadata":{}} diff --git a/builds.yml b/builds.yml new file mode 100644 index 0000000..7edf785 --- /dev/null +++ b/builds.yml @@ -0,0 +1,11 @@ +image: alpine/3.17 +packages: + - rust +sources: + - https://git.e3t.cc/~core/trifid +tasks: + - check: | + cargo check + cargo clippy + - build: | + cargo build \ No newline at end of file diff --git a/trifid-api/src/routes/mod.rs b/trifid-api/src/routes/mod.rs index ad95566..5c2f1b3 100644 --- a/trifid-api/src/routes/mod.rs +++ b/trifid-api/src/routes/mod.rs @@ -7,6 +7,26 @@ use rocket::http::Status; pub const ERR_MSG_MALFORMED_REQUEST: &str = "unable to parse the request body - is it valid JSON, using correct types?"; pub const ERR_MSG_MALFORMED_REQUEST_CODE: &str = "ERR_MALFORMED_REQUEST"; +/* +TODO: + /v1/auth/magic-link [done] + /v1/auth/totp [done] + /v1/auth/verify-magic-link [done] + /v1/hosts/host-{id}/enrollment-code + /v1/hosts/host-{id}/enrollment-code-check + /v1/hosts/host-{id} + /v1/roles/role-{id} + /v1/feature-flags + /v1/hosts + /v1/networks + /v1/roles + /v1/signup [done] + /v1/totp-authenticators [done] + /v1/verify-totp-authenticator [done] + /v1/dnclient + /v2/enroll + /v2/whoami + */ #[derive(Serialize)] #[serde(crate = "rocket::serde")]