Skip to content
File

Blob: spec/proto/waf.proto

protobuf66 lines
1syntax = "proto3";
2package protocol;
3 
4option optimize_for = SPEED;
5option go_package = "go.miragespace.co/specter/spec/protocol";
6 
7message WAFExclusion {
8 uint32 rule_id = 1;
9 // Exact escaped URL path without a query string. Empty means every path.
10 string path = 2;
11}
12 
13message WAFPolicy {
14 enum Mode {
15 UNKNOWN_MODE = 0;
16 INHERIT = 1;
17 BLOCK = 2;
18 MONITOR = 3;
19 OFF = 4;
20 }
21 
22 Mode mode = 1;
23 repeated WAFExclusion exclusions = 2;
24}
25 
26// Shared operator intent. Downloaders never write it.
27message WAFSettings {
28 enum Channel {
29 UNKNOWN_CHANNEL = 0;
30 LTS = 1;
31 STABLE = 2;
32 }
33 
34 bool enabled = 1;
35 WAFPolicy.Mode default_mode = 2;
36 Channel channel = 3;
37 string pinned_version = 4;
38}
39 
40message SetWAFSettingsRequest {
41 string expected_version = 1;
42 WAFSettings config = 2;
43}
44 
45message HostWAFRecord {
46 uint32 schema = 1;
47 bytes owner = 2;
48 WAFPolicy policy = 3;
49}
50 
51message GetHostWAFRequest {
52 string hostname = 1;
53}
54 
55message SetHostWAFRequest {
56 string hostname = 1;
57 string expected_version = 2;
58 WAFPolicy policy = 3;
59}
60 
61message HostWAFResponse {
62 string hostname = 1;
63 string version = 2;
64 WAFPolicy policy = 3;
65}