File
Blob: spec/proto/waf.proto
| 1 | syntax = "proto3"; |
| 2 | package protocol; |
| 3 | |
| 4 | option optimize_for = SPEED; |
| 5 | option go_package = "go.miragespace.co/specter/spec/protocol"; |
| 6 | |
| 7 | message 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 | |
| 13 | message 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. |
| 27 | message 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 | |
| 40 | message SetWAFSettingsRequest { |
| 41 | string expected_version = 1; |
| 42 | WAFSettings config = 2; |
| 43 | } |
| 44 | |
| 45 | message HostWAFRecord { |
| 46 | uint32 schema = 1; |
| 47 | bytes owner = 2; |
| 48 | WAFPolicy policy = 3; |
| 49 | } |
| 50 | |
| 51 | message GetHostWAFRequest { |
| 52 | string hostname = 1; |
| 53 | } |
| 54 | |
| 55 | message SetHostWAFRequest { |
| 56 | string hostname = 1; |
| 57 | string expected_version = 2; |
| 58 | WAFPolicy policy = 3; |
| 59 | } |
| 60 | |
| 61 | message HostWAFResponse { |
| 62 | string hostname = 1; |
| 63 | string version = 2; |
| 64 | WAFPolicy policy = 3; |
| 65 | } |