foil-server 0.3.5 → 0.4.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 +24 -29
- data/lib/foil/server/client.rb +6 -155
- data/lib/foil/server/version.rb +1 -1
- data/lib/foil/server/webhooks.rb +71 -0
- data/lib/foil/server.rb +8 -6
- data/spec/README.md +14 -28
- data/spec/fixtures/api/organizations/api-key-create.json +1 -0
- data/spec/fixtures/api/organizations/api-key-list.json +1 -0
- data/spec/fixtures/api/organizations/api-key-revoke.json +1 -0
- data/spec/fixtures/api/organizations/api-key-rotate.json +1 -0
- data/spec/fixtures/api/organizations/api-key-update.json +1 -0
- data/spec/fixtures/api/sessions/detail.json +8 -1
- data/spec/fixtures/manifest.json +0 -85
- data/spec/fixtures/webhooks/signature.json +9 -0
- data/spec/openapi.json +1683 -6333
- metadata +4 -22
- data/lib/foil/server/gate_delivery.rb +0 -332
- data/spec/fixtures/api/gate/agent-token-revoke.json +0 -3
- data/spec/fixtures/api/gate/agent-token-verify.json +0 -12
- data/spec/fixtures/api/gate/login-session-consume.json +0 -10
- data/spec/fixtures/api/gate/login-session-create.json +0 -12
- data/spec/fixtures/api/gate/registry-detail.json +0 -45
- data/spec/fixtures/api/gate/registry-list.json +0 -47
- data/spec/fixtures/api/gate/service-create.json +0 -49
- data/spec/fixtures/api/gate/service-detail.json +0 -49
- data/spec/fixtures/api/gate/service-disable.json +0 -49
- data/spec/fixtures/api/gate/service-update.json +0 -49
- data/spec/fixtures/api/gate/services-list.json +0 -51
- data/spec/fixtures/api/gate/session-ack.json +0 -10
- data/spec/fixtures/api/gate/session-create.json +0 -13
- data/spec/fixtures/api/gate/session-poll.json +0 -36
- data/spec/fixtures/gate-delivery/approved-webhook-payload.valid.json +0 -19
- data/spec/fixtures/gate-delivery/delivery-request.json +0 -9
- data/spec/fixtures/gate-delivery/env-policy.json +0 -40
- data/spec/fixtures/gate-delivery/vector.v1.json +0 -28
- data/spec/fixtures/gate-delivery/webhook-signature.json +0 -9
data/spec/fixtures/manifest.json
CHANGED
|
@@ -101,91 +101,6 @@
|
|
|
101
101
|
"path": "/v1/organizations/{organizationId}/api-keys/{keyId}",
|
|
102
102
|
"method": "patch",
|
|
103
103
|
"status": "200"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"file": "api/gate/registry-list.json",
|
|
107
|
-
"path": "/v1/gate/registry",
|
|
108
|
-
"method": "get",
|
|
109
|
-
"status": "200"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"file": "api/gate/registry-detail.json",
|
|
113
|
-
"path": "/v1/gate/registry/{serviceId}",
|
|
114
|
-
"method": "get",
|
|
115
|
-
"status": "200"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"file": "api/gate/services-list.json",
|
|
119
|
-
"path": "/v1/gate/services",
|
|
120
|
-
"method": "get",
|
|
121
|
-
"status": "200"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"file": "api/gate/service-detail.json",
|
|
125
|
-
"path": "/v1/gate/services/{serviceId}",
|
|
126
|
-
"method": "get",
|
|
127
|
-
"status": "200"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"file": "api/gate/service-create.json",
|
|
131
|
-
"path": "/v1/gate/services",
|
|
132
|
-
"method": "post",
|
|
133
|
-
"status": "201"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"file": "api/gate/service-update.json",
|
|
137
|
-
"path": "/v1/gate/services/{serviceId}",
|
|
138
|
-
"method": "patch",
|
|
139
|
-
"status": "200"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"file": "api/gate/service-disable.json",
|
|
143
|
-
"path": "/v1/gate/services/{serviceId}",
|
|
144
|
-
"method": "delete",
|
|
145
|
-
"status": "200"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"file": "api/gate/session-create.json",
|
|
149
|
-
"path": "/v1/gate/sessions",
|
|
150
|
-
"method": "post",
|
|
151
|
-
"status": "201"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"file": "api/gate/session-poll.json",
|
|
155
|
-
"path": "/v1/gate/sessions/{gateSessionId}",
|
|
156
|
-
"method": "get",
|
|
157
|
-
"status": "200"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"file": "api/gate/session-ack.json",
|
|
161
|
-
"path": "/v1/gate/sessions/{gateSessionId}/ack",
|
|
162
|
-
"method": "post",
|
|
163
|
-
"status": "200"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"file": "api/gate/login-session-create.json",
|
|
167
|
-
"path": "/v1/gate/login-sessions",
|
|
168
|
-
"method": "post",
|
|
169
|
-
"status": "201"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"file": "api/gate/login-session-consume.json",
|
|
173
|
-
"path": "/v1/gate/login-sessions/consume",
|
|
174
|
-
"method": "post",
|
|
175
|
-
"status": "200"
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
"file": "api/gate/agent-token-verify.json",
|
|
179
|
-
"path": "/v1/gate/agent-tokens/verify",
|
|
180
|
-
"method": "post",
|
|
181
|
-
"status": "200"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"file": "api/gate/agent-token-revoke.json",
|
|
185
|
-
"path": "/v1/gate/agent-tokens/revoke",
|
|
186
|
-
"method": "post",
|
|
187
|
-
"status": "204",
|
|
188
|
-
"body": "none"
|
|
189
104
|
}
|
|
190
105
|
]
|
|
191
106
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"secret": "whsec_test",
|
|
3
|
+
"timestamp": "1735776000",
|
|
4
|
+
"expired_timestamp": "1735775400",
|
|
5
|
+
"now_seconds": 1735776000,
|
|
6
|
+
"raw_body": "{\"id\":\"wevt_0123456789abcdef0123456789abcdef\",\"object\":\"webhook_event\",\"type\":\"session.result.persisted\",\"created\":\"2026-01-02T00:00:00.000Z\",\"data\":{\"object\":\"session_result\",\"session\":{\"id\":\"sid_0123456789abcdefghjkmnpqrs\"}}}",
|
|
7
|
+
"signature": "bd76efe49c06ccb25ed39db7422fc3f58641337b57b6d73a2b5061dc4ea59192",
|
|
8
|
+
"invalid_signature": "0d76efe49c06ccb25ed39db7422fc3f58641337b57b6d73a2b5061dc4ea59192"
|
|
9
|
+
}
|