1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
use lazy_static;
use var_os;
use DEFAULT_COMPRESSION_LEVEL as ZSTD_DEFAULT_COMPRESSION_LEVEL;
// ? ---------------------------------------------------------------------------
// ? Configure default system constants
// ? ---------------------------------------------------------------------------
/// Default profile key
///
/// This is the default key used to store the profile in the request headers and
/// send it to the gateway downstream services.
///
pub const DEFAULT_PROFILE_KEY: &str = "x-mycelium-profile";
/// Default email key
///
/// This is the default key used to store the email in the request headers and
/// send it to the gateway downstream services.
///
pub const DEFAULT_EMAIL_KEY: &str = "x-mycelium-email";
/// Default scope key
///
/// The scope key should be used to inject the scope present on the connection
/// string into the request headers and send it to the gateway downstream
/// services.
///
pub const DEFAULT_SCOPE_KEY: &str = "x-mycelium-scope";
/// Default mycelium role key
///
/// This is the default key used to store the mycelium role in the request
/// headers and send it to the gateway downstream services.
///
pub const DEFAULT_MYCELIUM_ROLE_KEY: &str = "x-mycelium-role";
/// Default request id key
///
/// This is the default key used to store the request id in the request headers
/// and send it to the gateway downstream services.
///
pub const DEFAULT_REQUEST_ID_KEY: &str = "x-mycelium-request-id";
/// Default connection string key
///
/// This is the default key used to store the connection string in the request
/// headers and send it to the gateway downstream services.
///
pub const DEFAULT_CONNECTION_STRING_KEY: &str = "x-mycelium-connection-string";
/// Default tenant id key
///
/// This is the default key used to store the tenant id in the request headers
/// and send it to the gateway downstream services.
///
pub const DEFAULT_TENANT_ID_KEY: &str = "x-mycelium-tenant-id";
/// Default forward header key (unofficial, pre-RFC 7239)
///
/// This is the default key used to store the forward header in the request
/// headers and send it to the gateway downstream services.
///
pub const FORWARD_FOR_KEY: &str = "x-forwarded-for";
/// RFC 7239 standard Forwarded header key
///
/// The standard `Forwarded` header as defined in RFC 7239. Takes priority
/// over `X-Forwarded-For` when present. The gateway parses the `for=`
/// directive from this header to resolve the original client IP.
///
pub const RFC7239_FORWARDED_KEY: &str = "forwarded";
/// Default forwarded keys
///
/// This is the default key used to store the forwarded host, protocol and port
/// in the request headers and send it to the gateway downstream services.
///
pub const MYCELIUM_SERVICE_NAME: &str = "x-mycelium-service-name";
/// Default security group key
///
/// This is the default key used to store the security group in the request
/// headers and send it to the gateway downstream services.
///
pub const MYCELIUM_SECURITY_GROUP: &str = "x-mycelium-security-group";
/// Default forwarding keys
///
/// Such keys are used to map the headers that should be removed from the
/// downstream response before stream it back to the client.
///
pub const FORWARDING_KEYS: = ;
/// Mycelium provider key
///
/// This is the key used to indicate that the request is coming from the
/// internal provider. This key should be used to validate the issuer of the
/// request.
///
pub const MYCELIUM_PROVIDER_KEY: &str = "mycelium";
/// The scope used to indicate MCP routes
pub const MYCELIUM_AI_AWARE: &str = "mycelium-ai-aware";
/// Default compression level
///
/// This is the default compression level used to compress the profile before
/// encoding to Base64.
///
pub const DEFAULT_COMPRESSION_LEVEL: i32 = ZSTD_DEFAULT_COMPRESSION_LEVEL;
// ? ---------------------------------------------------------------------------
// ? Authentication and authorization
// ? ---------------------------------------------------------------------------
lazy_static!