trace out the defined networking management API for reimplementation and documentation

This commit is contained in:
c0repwn3r 2023-02-03 10:48:31 -05:00
parent 5b6778337a
commit 94d90c21a2
Signed by: core
GPG Key ID: FDBF740DADDCEECF
19 changed files with 893 additions and 6 deletions

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true"> <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="postgres@localhost" uuid="dabac25c-3ebe-453d-bd51-12ab79dbbc90"> <data-source source="LOCAL" name="trifidapi@localhost" uuid="39c81b89-3fc4-493f-b203-7a00527cffe6">
<driver-ref>postgresql</driver-ref> <driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize> <synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver> <jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://localhost:5432/postgres</jdbc-url> <jdbc-url>jdbc:postgresql://localhost:5432/trifidapi</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir> <working-dir>$ProjectFileDir$</working-dir>
</data-source> </data-source>
</component> </component>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="SqlDialectMappings"> <component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$/trifid-api/migrations/20230203003134_create_orgs.sql" dialect="GenericSQL" /> <file url="file://$PROJECT_DIR$/trifid-api/migrations/20230203025121_create_users.sql" dialect="GenericSQL" />
<file url="PROJECT" dialect="PostgreSQL" /> <file url="PROJECT" dialect="PostgreSQL" />
</component> </component>
</project> </project>

View File

@ -0,0 +1,34 @@
POST /v1/auth/verify-magic-link HTTP/2
Host: api.defined.net
Content-Length: 67
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{"magicLinkToken":"ml-SscNLk4HKWlv5Ui2w-ELehq2WD62AtW1OcV6IbLyJeY"}
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: SPUP26RGRBGVG6ZXP5OFMB4HSM
Content-Length: 91
Date: Fri, 03 Feb 2023 14:37:28 GMT
{"data":{"sessionToken":"sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw"},"metadata":{}}

32
api/v1/feature-flags.txt Normal file
View File

@ -0,0 +1,32 @@
GET /v1/feature-flags HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: 44MZAIERZGS5JDKVDLSTHHDZSI
Content-Length: 237
Date: Fri, 03 Feb 2023 15:26:00 GMT
{"data":{"DNCLIENT_ARMV5":false,"DNCLIENT_MIPS_SOFTFLOAT":false,"HOST_BLOCKLIST":true,"HOST_CONFIG_DNS":false,"LIST_CERT_AUTHORITIES":false,"MANUAL_IP_ALLOCATION":true,"MOBILE_ENROLLMENT":true,"OIDC_MULTIPLE_ADMINS":true},"metadata":{}}

183
api/v1/hosts.txt Normal file
View File

@ -0,0 +1,183 @@
GET /v1/hosts?includeCounts=true&pageSize=25&filter%5BisLighthouse%5D=true HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: UQV7FNQM7RTK327VAEJYJML3RI
Content-Length: 69
Date: Fri, 03 Feb 2023 15:30:00 GMT
{"data":[],"metadata":{"totalCount":0,"page":{"start":0,"count":0}}}
POST /v1/hosts HTTP/2
Host: api.defined.net
Content-Length: 202
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{"networkID":"network-SQC5D2FCFI7SQEV24VNIIV6ORI","name":"testhouse","listenPort":4242,"staticAddresses":["4.3.2.1:4242"],"isLighthouse":true,"roleID":"role-PLK37J7HFPGUG7SMXD4SB65A5U","ipAddress":null}
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: FT63YQUXPBJK4Q3M6RLXEUHH3A
Content-Length: 391
Date: Fri, 03 Feb 2023 15:32:59 GMT
{"data":{"id":"host-33MGY37MVYNTXUJ7RKHJNWZVWI","organizationID":"org-4QN6JAFFP6QKV2ZY75Z6MGKDGQ","networkID":"network-SQC5D2FCFI7SQEV24VNIIV6ORI","roleID":"role-PLK37J7HFPGUG7SMXD4SB65A5U","name":"testhouse","ipAddress":"10.16.0.1","staticAddresses":["4.3.2.1:4242"],"listenPort":4242,"isLighthouse":true,"isRelay":false,"createdAt":"2023-02-03T15:32:59Z","isBlocked":false},"metadata":{}}
GET /v1/hosts?includeCounts=true&pageSize=25&filter%5BisLighthouse%5D=true HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: QXHNKJVABDOXVPBP4FK4CUBW3Q
Content-Length: 436
Date: Fri, 03 Feb 2023 15:38:06 GMT
{"data":[{"id":"host-33MGY37MVYNTXUJ7RKHJNWZVWI","organizationID":"org-4QN6JAFFP6QKV2ZY75Z6MGKDGQ","networkID":"network-SQC5D2FCFI7SQEV24VNIIV6ORI","roleID":"role-PLK37J7HFPGUG7SMXD4SB65A5U","name":"testhouse","ipAddress":"10.16.0.1","staticAddresses":["4.3.2.1:4242"],"listenPort":4242,"isLighthouse":true,"isRelay":false,"createdAt":"2023-02-03T15:32:59Z","isBlocked":false}],"metadata":{"totalCount":1,"page":{"start":0,"count":1}}}
GET /v1/hosts?includeCounts=true&pageSize=25&filter%5BisLighthouse%5D=false&filter%5BisRelay%5D=false HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
GET /v1/hosts?includeCounts=true&pageSize=25&filter%5BisRelay%5D=true&filter%5BisLighthouse%5D=false HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: JBPJUT2YLPHDJHG6EKL5NN672A
Content-Length: 69
Date: Fri, 03 Feb 2023 15:42:20 GMT
{"data":[],"metadata":{"totalCount":0,"page":{"start":0,"count":0}}}
GET /v1/hosts?includeCounts=true&pageSize=25&filter%5BisLighthouse%5D=true HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: 4BDEKPZJAN6LC2EYFRNIJZZBWI
Content-Length: 436
Date: Fri, 03 Feb 2023 15:42:59 GMT
{"data":[{"id":"host-33MGY37MVYNTXUJ7RKHJNWZVWI","organizationID":"org-4QN6JAFFP6QKV2ZY75Z6MGKDGQ","networkID":"network-SQC5D2FCFI7SQEV24VNIIV6ORI","roleID":"role-PLK37J7HFPGUG7SMXD4SB65A5U","name":"testhouse","ipAddress":"10.16.0.1","staticAddresses":["4.3.2.1:4242"],"listenPort":4242,"isLighthouse":true,"isRelay":false,"createdAt":"2023-02-03T15:32:59Z","isBlocked":false}],"metadata":{"totalCount":1,"page":{"start":0,"count":1}}}

32
api/v1/hosts/host-ID.txt Normal file
View File

@ -0,0 +1,32 @@
GET /v1/hosts/host-33MGY37MVYNTXUJ7RKHJNWZVWI HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: SZBUNNHTIPFOVUFZPMBDK7DFJ4
Content-Length: 391
Date: Fri, 03 Feb 2023 15:33:24 GMT
{"data":{"id":"host-33MGY37MVYNTXUJ7RKHJNWZVWI","organizationID":"org-4QN6JAFFP6QKV2ZY75Z6MGKDGQ","networkID":"network-SQC5D2FCFI7SQEV24VNIIV6ORI","roleID":"role-PLK37J7HFPGUG7SMXD4SB65A5U","name":"testhouse","ipAddress":"10.16.0.1","staticAddresses":["4.3.2.1:4242"],"listenPort":4242,"isLighthouse":true,"isRelay":false,"createdAt":"2023-02-03T15:32:59Z","isBlocked":false},"metadata":{}}

View File

@ -0,0 +1,71 @@
POST /v1/hosts/host-33MGY37MVYNTXUJ7RKHJNWZVWI/enrollment-code-check HTTP/2
Host: api.defined.net
Content-Length: 54
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{"code":"zsVFA3PUrd1WbELiQFO-z7U_jB3O1nTnDDQDefYazBU"}
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: SQBMVAHA6WZEO6DFPPS6FXYQGQ
Content-Length: 39
Date: Fri, 03 Feb 2023 15:35:42 GMT
{"data":{"exists":true},"metadata":{}}
POST /v1/hosts/host-33MGY37MVYNTXUJ7RKHJNWZVWI/enrollment-code-check HTTP/2
Host: api.defined.net
Content-Length: 54
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{"code":"zsVFA3PUrd1WbELiQFO-z7U_jB3O1nTnDDQDefYazBU"}
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: W36GBY76TO7IBWQVK4XEH5ZACA
Content-Length: 40
Date: Fri, 03 Feb 2023 15:36:36 GMT
{"data":{"exists":false},"metadata":{}}

View File

@ -0,0 +1,35 @@
POST /v1/hosts/host-33MGY37MVYNTXUJ7RKHJNWZVWI/enrollment-code HTTP/2
Host: api.defined.net
Content-Length: 2
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{}
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: 43VZI64FVKV7ET5FQNMLORPY5M
Content-Length: 102
Date: Fri, 03 Feb 2023 15:34:54 GMT
{"data":{"code":"zsVFA3PUrd1WbELiQFO-z7U_jB3O1nTnDDQDefYazBU","lifetimeSeconds":86400},"metadata":{}}

102
api/v1/networks.txt Normal file
View File

@ -0,0 +1,102 @@
GET /v1/networks HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: KXAKSGX74JSFA7E23C6ZXVHS4Y
Content-Length: 26
Date: Fri, 03 Feb 2023 15:26:00 GMT
{"data":[],"metadata":{}}
POST /v1/networks HTTP/2
Host: api.defined.net
Content-Length: 41
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{"name":"Network1","cidr":"10.16.0.0/15"}
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: TA6YDSDIHGP7FR26NXXVIGGLIY
Content-Length: 265
Date: Fri, 03 Feb 2023 15:28:39 GMT
{"data":{"cidr":"10.16.0.0/15","id":"network-SQC5D2FCFI7SQEV24VNIIV6ORI","organizationID":"org-4QN6JAFFP6QKV2ZY75Z6MGKDGQ","signingCAID":"ca-NDFFPI2L4Z5WHMWB5R7HTAMM3U","name":"Network1","lighthousesAsRelays":true,"createdAt":"2023-02-03T15:28:39Z"},"metadata":{}}
GET /v1/networks HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: X2KWLEM2N36WTNFPLS55JZUQX4
Content-Length: 267
Date: Fri, 03 Feb 2023 15:29:05 GMT
{"data":[{"cidr":"10.16.0.0/15","id":"network-SQC5D2FCFI7SQEV24VNIIV6ORI","organizationID":"org-4QN6JAFFP6QKV2ZY75Z6MGKDGQ","signingCAID":"ca-NDFFPI2L4Z5WHMWB5R7HTAMM3U","name":"Network1","lighthousesAsRelays":true,"createdAt":"2023-02-03T15:28:39Z"}],"metadata":{}}

101
api/v1/roles.txt Normal file
View File

@ -0,0 +1,101 @@
GET /v1/roles?includeCounts=true&cursor=&pageSize=500 HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: 4WYWVGZYCTXN4CQOIAFZKL4HSE
Content-Length: 240
Date: Fri, 03 Feb 2023 15:31:08 GMT
{"data":[{"id":"role-PLK37J7HFPGUG7SMXD4SB65A5U","name":"Lighthouse","description":"","firewallRulesCount":1,"createdAt":"2023-02-03T14:35:11Z","modifiedAt":"2023-02-03T14:35:11Z"}],"metadata":{"totalCount":1,"page":{"start":0,"count":1}}}
GET /v1/roles?includeCounts=true&cursor=&pageSize=25 HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: L26XAKHIORN4IM4YK6EJSGDKCQ
Content-Length: 240
Date: Fri, 03 Feb 2023 15:43:42 GMT
{"data":[{"id":"role-PLK37J7HFPGUG7SMXD4SB65A5U","name":"Lighthouse","description":"","firewallRulesCount":1,"createdAt":"2023-02-03T14:35:11Z","modifiedAt":"2023-02-03T14:35:11Z"}],"metadata":{"totalCount":1,"page":{"start":0,"count":1}}}
POST /v1/roles HTTP/2
Host: api.defined.net
Content-Length: 174
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{"name":"testrole","description":"1234role","firewallRules":[{"protocol":"ICMP","portRange":null,"description":"Allows ping requests from other hosts","allowedRoleID":null}]}
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: QS5G63RZGSYL6U67ZC6V4JKFKM
Content-Length: 308
Date: Fri, 03 Feb 2023 15:44:35 GMT
{"data":{"id":"role-KHWBRCVZFHSIXCV75P3FDZFTEU","name":"testrole","description":"1234role","createdAt":"2023-02-03T15:44:35Z","modifiedAt":"2023-02-03T15:44:35Z","firewallRules":[{"allowedRoleID":null,"protocol":"ICMP","portRange":null,"description":"Allows ping requests from other hosts"}]},"metadata":{}}

68
api/v1/roles/role-ID.txt Normal file
View File

@ -0,0 +1,68 @@
GET /v1/roles/role-PLK37J7HFPGUG7SMXD4SB65A5U HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: WAM3X5L3EF5LX2LPHRF52G7MVM
Content-Length: 302
Date: Fri, 03 Feb 2023 15:39:34 GMT
{"data":{"id":"role-PLK37J7HFPGUG7SMXD4SB65A5U","name":"Lighthouse","description":"","createdAt":"2023-02-03T14:35:11Z","modifiedAt":"2023-02-03T14:35:11Z","firewallRules":[{"allowedRoleID":null,"protocol":"ICMP","portRange":null,"description":"Allows ping requests from other hosts"}]},"metadata":{}}
PUT /v1/roles/role-KHWBRCVZFHSIXCV75P3FDZFTEU HTTP/2
Host: api.defined.net
Content-Length: 232
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{"description":"1234role","firewallRules":[{"portRange":null,"description":"Allows ping requests from other hosts","protocol":"ICMP","allowedRoleID":null},{"protocol":"ANY","portRange":null,"allowedRoleID":null,"description":"hi"}]}
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: CIB7BXQNZTZHOM5KVB5AAODUZA
Content-Length: 384
Date: Fri, 03 Feb 2023 15:46:01 GMT
{"data":{"id":"role-KHWBRCVZFHSIXCV75P3FDZFTEU","name":"testrole","description":"1234role","createdAt":"2023-02-03T15:44:35Z","modifiedAt":"2023-02-03T15:44:35Z","firewallRules":[{"allowedRoleID":null,"protocol":"ANY","portRange":null,"description":"hi"},{"allowedRoleID":null,"protocol":"ICMP","portRange":null,"description":"Allows ping requests from other hosts"}]},"metadata":{}}

34
api/v1/signup.txt Normal file
View File

@ -0,0 +1,34 @@
POST /v1/signup HTTP/2
Host: api.defined.net
Content-Length: 31
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{"email":"c0repwn3r@gmail.com"}
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: WSFH35TR4KCV2QM4NJJKUPTNL4
Content-Length: 28
Date: Fri, 03 Feb 2023 14:35:11 GMT
{"data":null,"metadata":{}}

View File

@ -0,0 +1,35 @@
POST /v1/totp-authenticators HTTP/2
Host: api.defined.net
Content-Length: 2
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{}
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: UY2SL242LN73HFD74KUIX5TSPQ
Content-Length: 397
Date: Fri, 03 Feb 2023 14:38:48 GMT
{"data":{"totpToken":"totp-mH9eLzA9Q5WB-sg3Fq8CfkP13eTh3DxF25kVK2VEDOk","secret":"FDP4MWQL7FGEJP3AJNUDOMD24SZOFIYW","url":"otpauth://totp/Defined%20Networking:c0repwn3r@gmail.com?algorithm=SHA1\u0026digits=6\u0026image=https%3A%2F%2Fwww.defined.net%2Fimages%2Fbrand%2Flogo-square-dark.png\u0026issuer=Defined+Networking\u0026period=30\u0026secret=FDP4MWQL7FGEJP3AJNUDOMD24SZOFIYW"},"metadata":{}}

View File

@ -0,0 +1,71 @@
POST /v1/verify-totp-authenticator HTTP/2
Host: api.defined.net
Content-Length: 80
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{"totpToken":"totp-mH9eLzA9Q5WB-sg3Fq8CfkP13eTh3DxF25kVK2VEDOk","code":"266242"}
HTTP/2 400 Bad Request
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: DGCHQK6LSGGMPPJUPYGHXRQJRY
Content-Length: 124
Date: Fri, 03 Feb 2023 15:23:55 GMT
{"errors":[{"code":"ERR_INVALID_TOTP_TOKEN","message":"TOTP token does not exist (maybe it expired?)","path":"totpToken"}]}
POST /v1/verify-totp-authenticator HTTP/2
Host: api.defined.net
Content-Length: 80
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{"totpToken":"totp-gaUDaxPrrIBc8GEQ6z0vPisT8k0MEP1fgI8FA2ztLMw","code":"175543"}
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: NSVVFYH3S2J6FRBT2BHUVPSH5I
Content-Length: 88
Date: Fri, 03 Feb 2023 15:24:42 GMT
{"data":{"authToken":"auth-O7mugxdYta-RKtLMqDW4j8XCJ85EfZKKezeZZXBYtFQ"},"metadata":{}}

65
api/v2/whoami.txt Normal file
View File

@ -0,0 +1,65 @@
GET /v2/whoami HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: 7DDYV6APLCCTOZO6XUDGLP5YVU
Content-Length: 237
Date: Fri, 03 Feb 2023 14:37:53 GMT
{"data":{"actorType":"user","actor":{"id":"user-RTE7XCR7BBLZAPP7S3RCVME7FM","organizationID":"org-4QN6JAFFP6QKV2ZY75Z6MGKDGQ","email":"c0repwn3r@gmail.com","createdAt":"2023-02-03T14:35:11Z","hasTOTPAuthenticator":false}},"metadata":{}}
GET /v2/whoami HTTP/2
Host: api.defined.net
Sec-Ch-Ua: "Chromium";v="109", "Not_A Brand";v="99"
Accept: application/json
Content-Type: application/json
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer sess-CcSodB65KzkdJuPzdp-A-vdDx2P-Vxsynpk_LTGPUmw
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.75 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://admin.defined.net
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://admin.defined.net
Access-Control-Expose-Headers: X-Request-Id
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: UVEERC3K5QJV3PJINRP2RAJ3IY
Content-Length: 236
Date: Fri, 03 Feb 2023 15:25:26 GMT
{"data":{"actorType":"user","actor":{"id":"user-RTE7XCR7BBLZAPP7S3RCVME7FM","organizationID":"org-4QN6JAFFP6QKV2ZY75Z6MGKDGQ","email":"c0repwn3r@gmail.com","createdAt":"2023-02-03T14:35:11Z","hasTOTPAuthenticator":true}},"metadata":{}}

1
trifid-api/.env Normal file
View File

@ -0,0 +1 @@
DATABASE_URL=postgres://postgres@localhost/trifidapi

View File

@ -1,5 +1,10 @@
CREATE TABLE users ( CREATE TABLE users (
id SERIAL NOT NULL PRIMARY KEY, id SERIAL NOT NULL PRIMARY KEY,
email VARCHAR(320) NOT NULL, email VARCHAR(320) NOT NULL,
totp_secret VARCHAR(512) NOT NULL
) totp_enabled INTEGER NOT NULL,
totp_verified INTEGER NOT NULL,
totp_base32 VARCHAR(1024) NOT NULL,
totp_auth_url VARCHAR(1024) NOT NULL
);
CREATE INDEX idx_users_email ON users(email);

View File

@ -1 +1,10 @@
-- Add migration script here CREATE TABLE roles (
id SERIAL NOT NULL PRIMARY KEY,
role_name VARCHAR(128) NOT NULL,
role_desc VARCHAR(512) NOT NULL,
org_id SERIAL NOT NULL REFERENCES organizations(id)
);
CREATE INDEX idx_roles_org_id ON roles(org_id);
-- every org should have an id=0 role which every node is a member of

View File

@ -0,0 +1,9 @@
CREATE TABLE firewall_rules (
id SERIAL NOT NULL PRIMARY KEY,
allow_role_id SERIAL NOT NULL REFERENCES roles(id), -- all roles: use the organization role itself
protocol INTEGER NOT NULL, -- 0: any, 1: icmp, 2: udp, 3: tcp
port VARCHAR(256) NOT NULL, -- port range (ignore if protocol==1)
description VARCHAR(256) NOT NULL -- description
)