tripwire-server 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +48 -13
- data/lib/tripwire/server/client.rb +171 -16
- data/lib/tripwire/server/crypto_support.rb +49 -0
- data/lib/tripwire/server/gate_delivery.rb +298 -0
- data/lib/tripwire/server/sealed_token.rb +2 -0
- data/lib/tripwire/server/version.rb +1 -1
- data/lib/tripwire/server.rb +12 -0
- data/spec/README.md +37 -6
- data/spec/fixtures/api/fingerprints/detail.json +70 -0
- data/spec/fixtures/api/fingerprints/list.json +37 -0
- data/spec/fixtures/api/gate/agent-token-verify.json +12 -0
- data/spec/fixtures/api/gate/login-session-consume.json +10 -0
- data/spec/fixtures/api/gate/login-session-create.json +12 -0
- data/spec/fixtures/api/gate/registry-detail.json +45 -0
- data/spec/fixtures/api/gate/registry-list.json +47 -0
- data/spec/fixtures/api/gate/service-create.json +49 -0
- data/spec/fixtures/api/gate/service-detail.json +49 -0
- data/spec/fixtures/api/gate/service-disable.json +49 -0
- data/spec/fixtures/api/gate/service-update.json +49 -0
- data/spec/fixtures/api/gate/services-list.json +51 -0
- data/spec/fixtures/api/gate/session-ack.json +10 -0
- data/spec/fixtures/api/gate/session-create.json +13 -0
- data/spec/fixtures/api/gate/session-poll.json +36 -0
- data/spec/fixtures/api/sessions/detail.json +405 -0
- data/spec/fixtures/api/sessions/list.json +36 -0
- data/spec/fixtures/api/teams/api-key-create.json +21 -0
- data/spec/fixtures/api/teams/api-key-list.json +26 -0
- data/spec/fixtures/api/teams/api-key-revoke.json +20 -0
- data/spec/fixtures/api/teams/api-key-rotate.json +21 -0
- data/spec/fixtures/api/teams/team-create.json +14 -0
- data/spec/fixtures/api/teams/team-update.json +14 -0
- data/spec/fixtures/api/teams/team.json +14 -0
- data/spec/fixtures/errors/invalid-api-key.json +3 -3
- data/spec/fixtures/errors/missing-api-key.json +2 -2
- data/spec/fixtures/errors/not-found.json +4 -4
- data/spec/fixtures/errors/validation-error.json +6 -7
- data/spec/fixtures/gate-delivery/approved-webhook-payload.valid.json +20 -0
- data/spec/fixtures/gate-delivery/delivery-request.json +9 -0
- data/spec/fixtures/gate-delivery/env-policy.json +40 -0
- data/spec/fixtures/gate-delivery/vector.v1.json +28 -0
- data/spec/fixtures/gate-delivery/webhook-signature.json +9 -0
- data/spec/fixtures/manifest.json +179 -0
- data/spec/fixtures/sealed-token/vector.v1.json +37 -24
- data/spec/openapi.json +4905 -779
- data/spec/sealed-token.md +36 -17
- metadata +36 -14
- data/spec/fixtures/public-api/fingerprints/detail.json +0 -40
- data/spec/fixtures/public-api/fingerprints/list.json +0 -31
- data/spec/fixtures/public-api/sessions/detail.json +0 -47
- data/spec/fixtures/public-api/sessions/list.json +0 -33
- data/spec/fixtures/public-api/teams/api-key-create.json +0 -18
- data/spec/fixtures/public-api/teams/api-key-list.json +0 -23
- data/spec/fixtures/public-api/teams/api-key-rotate.json +0 -18
- data/spec/fixtures/public-api/teams/team-create.json +0 -11
- data/spec/fixtures/public-api/teams/team-update.json +0 -11
- data/spec/fixtures/public-api/teams/team.json +0 -11
- /data/spec/fixtures/{public-api/teams/api-key-revoke.json → api/gate/agent-token-revoke.json} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"object": "gate_service",
|
|
4
|
+
"id": "acme_prod",
|
|
5
|
+
"status": "active",
|
|
6
|
+
"discoverable": false,
|
|
7
|
+
"name": "Acme Production",
|
|
8
|
+
"description": "Acme production signup flow",
|
|
9
|
+
"website": "https://acme.example.com",
|
|
10
|
+
"dashboard_login_url": "https://dashboard.acme.example.com/auth/gate",
|
|
11
|
+
"webhook_url": "https://api.acme.example.com/v1/gate/webhook",
|
|
12
|
+
"env_vars": [
|
|
13
|
+
{
|
|
14
|
+
"name": "Publishable key",
|
|
15
|
+
"key": "ACME_PUBLISHABLE_KEY",
|
|
16
|
+
"secret": false
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Secret key",
|
|
20
|
+
"key": "ACME_SECRET_KEY",
|
|
21
|
+
"secret": true
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"docs_url": "https://docs.acme.example.com/signup",
|
|
25
|
+
"sdks": [
|
|
26
|
+
{
|
|
27
|
+
"label": "Node",
|
|
28
|
+
"install": "npm install @acme/sdk",
|
|
29
|
+
"url": "https://www.npmjs.com/package/@acme/sdk"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"branding": {
|
|
33
|
+
"logo_url": "https://acme.example.com/logo.png",
|
|
34
|
+
"primary_color": "#117BE7",
|
|
35
|
+
"secondary_color": "#0B5CAD",
|
|
36
|
+
"ascii_art": "ACME",
|
|
37
|
+
"verified": false
|
|
38
|
+
},
|
|
39
|
+
"consent": {
|
|
40
|
+
"terms_url": "https://acme.example.com/terms",
|
|
41
|
+
"privacy_url": "https://acme.example.com/privacy"
|
|
42
|
+
},
|
|
43
|
+
"created_at": "2026-04-03T20:00:00.000Z",
|
|
44
|
+
"updated_at": "2026-04-03T20:00:00.000Z"
|
|
45
|
+
},
|
|
46
|
+
"meta": {
|
|
47
|
+
"request_id": "req_0123456789abcdef0123456789abcdef"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"object": "gate_service",
|
|
4
|
+
"id": "acme_prod",
|
|
5
|
+
"status": "active",
|
|
6
|
+
"discoverable": false,
|
|
7
|
+
"name": "Acme Production",
|
|
8
|
+
"description": "Acme production signup flow",
|
|
9
|
+
"website": "https://acme.example.com",
|
|
10
|
+
"dashboard_login_url": "https://dashboard.acme.example.com/auth/gate",
|
|
11
|
+
"webhook_url": "https://api.acme.example.com/v1/gate/webhook",
|
|
12
|
+
"env_vars": [
|
|
13
|
+
{
|
|
14
|
+
"name": "Publishable key",
|
|
15
|
+
"key": "ACME_PUBLISHABLE_KEY",
|
|
16
|
+
"secret": false
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Secret key",
|
|
20
|
+
"key": "ACME_SECRET_KEY",
|
|
21
|
+
"secret": true
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"docs_url": "https://docs.acme.example.com/signup",
|
|
25
|
+
"sdks": [
|
|
26
|
+
{
|
|
27
|
+
"label": "Node",
|
|
28
|
+
"install": "npm install @acme/sdk",
|
|
29
|
+
"url": "https://www.npmjs.com/package/@acme/sdk"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"branding": {
|
|
33
|
+
"logo_url": "https://acme.example.com/logo.png",
|
|
34
|
+
"primary_color": "#117BE7",
|
|
35
|
+
"secondary_color": "#0B5CAD",
|
|
36
|
+
"ascii_art": "ACME",
|
|
37
|
+
"verified": false
|
|
38
|
+
},
|
|
39
|
+
"consent": {
|
|
40
|
+
"terms_url": "https://acme.example.com/terms",
|
|
41
|
+
"privacy_url": "https://acme.example.com/privacy"
|
|
42
|
+
},
|
|
43
|
+
"created_at": "2026-04-03T20:00:00.000Z",
|
|
44
|
+
"updated_at": "2026-04-03T20:05:00.000Z"
|
|
45
|
+
},
|
|
46
|
+
"meta": {
|
|
47
|
+
"request_id": "req_0123456789abcdef0123456789abcdef"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"object": "gate_service",
|
|
4
|
+
"id": "acme_prod",
|
|
5
|
+
"status": "disabled",
|
|
6
|
+
"discoverable": false,
|
|
7
|
+
"name": "Acme Production",
|
|
8
|
+
"description": "Acme production signup flow",
|
|
9
|
+
"website": "https://acme.example.com",
|
|
10
|
+
"dashboard_login_url": "https://dashboard.acme.example.com/auth/gate",
|
|
11
|
+
"webhook_url": "https://api.acme.example.com/v1/gate/webhook",
|
|
12
|
+
"env_vars": [
|
|
13
|
+
{
|
|
14
|
+
"name": "Publishable key",
|
|
15
|
+
"key": "ACME_PUBLISHABLE_KEY",
|
|
16
|
+
"secret": false
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Secret key",
|
|
20
|
+
"key": "ACME_SECRET_KEY",
|
|
21
|
+
"secret": true
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"docs_url": "https://docs.acme.example.com/signup",
|
|
25
|
+
"sdks": [
|
|
26
|
+
{
|
|
27
|
+
"label": "Node",
|
|
28
|
+
"install": "npm install @acme/sdk",
|
|
29
|
+
"url": "https://www.npmjs.com/package/@acme/sdk"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"branding": {
|
|
33
|
+
"logo_url": "https://acme.example.com/logo.png",
|
|
34
|
+
"primary_color": "#117BE7",
|
|
35
|
+
"secondary_color": "#0B5CAD",
|
|
36
|
+
"ascii_art": "ACME",
|
|
37
|
+
"verified": false
|
|
38
|
+
},
|
|
39
|
+
"consent": {
|
|
40
|
+
"terms_url": "https://acme.example.com/terms",
|
|
41
|
+
"privacy_url": "https://acme.example.com/privacy"
|
|
42
|
+
},
|
|
43
|
+
"created_at": "2026-04-03T20:00:00.000Z",
|
|
44
|
+
"updated_at": "2026-04-03T20:15:00.000Z"
|
|
45
|
+
},
|
|
46
|
+
"meta": {
|
|
47
|
+
"request_id": "req_0123456789abcdef0123456789abcdef"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"object": "gate_service",
|
|
4
|
+
"id": "acme_prod",
|
|
5
|
+
"status": "active",
|
|
6
|
+
"discoverable": true,
|
|
7
|
+
"name": "Acme Production",
|
|
8
|
+
"description": "Acme production signup flow",
|
|
9
|
+
"website": "https://acme.example.com",
|
|
10
|
+
"dashboard_login_url": "https://dashboard.acme.example.com/auth/gate",
|
|
11
|
+
"webhook_url": "https://api.acme.example.com/v1/gate/webhook",
|
|
12
|
+
"env_vars": [
|
|
13
|
+
{
|
|
14
|
+
"name": "Publishable key",
|
|
15
|
+
"key": "ACME_PUBLISHABLE_KEY",
|
|
16
|
+
"secret": false
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Secret key",
|
|
20
|
+
"key": "ACME_SECRET_KEY",
|
|
21
|
+
"secret": true
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"docs_url": "https://docs.acme.example.com/signup",
|
|
25
|
+
"sdks": [
|
|
26
|
+
{
|
|
27
|
+
"label": "Node",
|
|
28
|
+
"install": "npm install @acme/sdk",
|
|
29
|
+
"url": "https://www.npmjs.com/package/@acme/sdk"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"branding": {
|
|
33
|
+
"logo_url": "https://acme.example.com/logo.png",
|
|
34
|
+
"primary_color": "#117BE7",
|
|
35
|
+
"secondary_color": "#0B5CAD",
|
|
36
|
+
"ascii_art": "ACME",
|
|
37
|
+
"verified": false
|
|
38
|
+
},
|
|
39
|
+
"consent": {
|
|
40
|
+
"terms_url": "https://acme.example.com/terms",
|
|
41
|
+
"privacy_url": "https://acme.example.com/privacy"
|
|
42
|
+
},
|
|
43
|
+
"created_at": "2026-04-03T20:00:00.000Z",
|
|
44
|
+
"updated_at": "2026-04-03T20:10:00.000Z"
|
|
45
|
+
},
|
|
46
|
+
"meta": {
|
|
47
|
+
"request_id": "req_0123456789abcdef0123456789abcdef"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"object": "gate_service",
|
|
5
|
+
"id": "acme_prod",
|
|
6
|
+
"status": "active",
|
|
7
|
+
"discoverable": false,
|
|
8
|
+
"name": "Acme Production",
|
|
9
|
+
"description": "Acme production signup flow",
|
|
10
|
+
"website": "https://acme.example.com",
|
|
11
|
+
"dashboard_login_url": "https://dashboard.acme.example.com/auth/gate",
|
|
12
|
+
"webhook_url": "https://api.acme.example.com/v1/gate/webhook",
|
|
13
|
+
"env_vars": [
|
|
14
|
+
{
|
|
15
|
+
"name": "Publishable key",
|
|
16
|
+
"key": "ACME_PUBLISHABLE_KEY",
|
|
17
|
+
"secret": false
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "Secret key",
|
|
21
|
+
"key": "ACME_SECRET_KEY",
|
|
22
|
+
"secret": true
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"docs_url": "https://docs.acme.example.com/signup",
|
|
26
|
+
"sdks": [
|
|
27
|
+
{
|
|
28
|
+
"label": "Node",
|
|
29
|
+
"install": "npm install @acme/sdk",
|
|
30
|
+
"url": "https://www.npmjs.com/package/@acme/sdk"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"branding": {
|
|
34
|
+
"logo_url": "https://acme.example.com/logo.png",
|
|
35
|
+
"primary_color": "#117BE7",
|
|
36
|
+
"secondary_color": "#0B5CAD",
|
|
37
|
+
"ascii_art": "ACME",
|
|
38
|
+
"verified": false
|
|
39
|
+
},
|
|
40
|
+
"consent": {
|
|
41
|
+
"terms_url": "https://acme.example.com/terms",
|
|
42
|
+
"privacy_url": "https://acme.example.com/privacy"
|
|
43
|
+
},
|
|
44
|
+
"created_at": "2026-04-03T20:00:00.000Z",
|
|
45
|
+
"updated_at": "2026-04-03T20:05:00.000Z"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"meta": {
|
|
49
|
+
"request_id": "req_0123456789abcdef0123456789abcdef"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"object": "gate_session",
|
|
4
|
+
"id": "gate_0123456789abcdefghjkmnpqrs",
|
|
5
|
+
"status": "pending",
|
|
6
|
+
"poll_token": "gtpoll_0123456789abcdefghjkmnpqrs",
|
|
7
|
+
"consent_url": "https://tripwirejs.com/gate?session=gate_0123456789abcdefghjkmnpqrs",
|
|
8
|
+
"expires_at": "2026-04-04T20:15:00.000Z"
|
|
9
|
+
},
|
|
10
|
+
"meta": {
|
|
11
|
+
"request_id": "req_0123456789abcdef0123456789abcdef"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"object": "gate_session",
|
|
4
|
+
"id": "gate_0123456789abcdefghjkmnpqrs",
|
|
5
|
+
"status": "approved",
|
|
6
|
+
"expires_at": "2026-04-04T20:15:00.000Z",
|
|
7
|
+
"gate_account_id": "gacct_0123456789abcdefghjkmnpqrs",
|
|
8
|
+
"account_name": "my-project",
|
|
9
|
+
"delivery_bundle": {
|
|
10
|
+
"integrator": {
|
|
11
|
+
"version": 1,
|
|
12
|
+
"algorithm": "x25519-hkdf-sha256/aes-256-gcm",
|
|
13
|
+
"key_id": "kid_integrator_0123456789abcdefgh",
|
|
14
|
+
"ephemeral_public_key": "ephemeral_public_key_integrator",
|
|
15
|
+
"salt": "salt_integrator",
|
|
16
|
+
"iv": "iv_integrator",
|
|
17
|
+
"ciphertext": "ciphertext_integrator",
|
|
18
|
+
"tag": "tag_integrator"
|
|
19
|
+
},
|
|
20
|
+
"gate": {
|
|
21
|
+
"version": 1,
|
|
22
|
+
"algorithm": "x25519-hkdf-sha256/aes-256-gcm",
|
|
23
|
+
"key_id": "kid_gate_0123456789abcdefghjkm",
|
|
24
|
+
"ephemeral_public_key": "ephemeral_public_key_gate",
|
|
25
|
+
"salt": "salt_gate",
|
|
26
|
+
"iv": "iv_gate",
|
|
27
|
+
"ciphertext": "ciphertext_gate",
|
|
28
|
+
"tag": "tag_gate"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"docs_url": "https://tripwirejs.com/docs/gate"
|
|
32
|
+
},
|
|
33
|
+
"meta": {
|
|
34
|
+
"request_id": "req_0123456789abcdef0123456789abcdef"
|
|
35
|
+
}
|
|
36
|
+
}
|