diff --git a/deployments/sentryflow.yaml b/deployments/sentryflow.yaml index 14d50ec..91497ad 100644 --- a/deployments/sentryflow.yaml +++ b/deployments/sentryflow.yaml @@ -36,6 +36,18 @@ rules: - delete resources: - wasmplugins + - apiGroups: + - "" + verbs: + - get + resources: + - configmaps + - apiGroups: + - apps + verbs: + - get + resources: + - deployments --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding diff --git a/docs/getting_started.md b/docs/getting_started.md index 22d393f..a92706f 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -13,10 +13,10 @@ observability. It includes detailed commands for each step along with their expl ## 2. Deploying SentryFlow -Configure SentryFlow receiver by following [this](receivers.md). Then deploy SentryFlow by following `kubectl` command: +Configure SentryFlow receiver by following [this](receivers.md). Then deploy updated SentryFlow manifest by following `kubectl` command: ```shell -kubectl apply -f https://raw.githubusercontent.com/5GSEC/SentryFlow/refs/heads/main/deployments/sentryflow.yaml +kubectl apply -f sentryflow.yaml ``` This will create a namespace named `sentryflow` and will deploy the necessary Kubernetes resources. diff --git a/docs/receivers.md b/docs/receivers.md index 7b99638..73189b2 100644 --- a/docs/receivers.md +++ b/docs/receivers.md @@ -6,3 +6,10 @@ SentryFlow supports following receivers: - [Istio sidecar](https://istio.io/latest/docs/setup/) service mesh. To integrate SentryFlow with it, refer to [this](receivers/service-mesh/istio/istio.md). +- [Nginx Inc.](https://docs.nginx.com/nginx-ingress-controller/) ingress controller. To integrate SentryFlow with it, + refer to [this](receivers/other/ingress-controller/nginx-inc/nginx_inc.md). + +## Non-Kubernetes + +- [Nginx web server](https://nginx.org/) running on Virtual Machine or Bare-Metal. To integrate SentryFlow + with it, refer to [this](receivers/other/web-server/nginx/nginx.md). diff --git a/docs/receivers/other/ingress-controller/nginx-inc/nginx_inc.md b/docs/receivers/other/ingress-controller/nginx-inc/nginx_inc.md new file mode 100644 index 0000000..8179e4f --- /dev/null +++ b/docs/receivers/other/ingress-controller/nginx-inc/nginx_inc.md @@ -0,0 +1,204 @@ +# Nginx Incorporation Ingress Controller + +## Description + +This guide provides a step-by-step process to integrate SentryFlow +with [Nginx Inc.](https://docs.nginx.com/nginx-ingress-controller/) Ingress Controller, aimed at enhancing API +observability. It includes detailed commands for each step along with their explanations. + +SentryFlow make use of following to provide visibility into API calls: + +- [Nginx njs](https://nginx.org/en/docs/njs/) module. +- [Njs filter](../../../../../filter/nginx). + +## Prerequisites + +- Nginx Inc. Ingress Controller. + Follow [this](https://docs.nginx.com/nginx-ingress-controller/installation/installing-nic/) to deploy it. + +## How to + +To Observe API calls of your workloads served by Nginx inc. ingress controller in Kubernetes environment, follow +the below +steps: + +1. Create the following configmap in the same namespace as ingress controller. + +```shell +cat < +data: + sentryflow.js: | + const DEFAULT_KEY = "sentryFlow"; + const ResStatusKey = ":status" + const MAX_BODY_SIZE = 1_000_000; // 1 MB + + function requestHandler(r, data, flags) { + r.sendBuffer(data, flags); + r.done(); + + let responseBody = "" + try { + responseBody = new TextDecoder("utf-8") + .decode(new Uint8Array(data)); + } catch (error) { + r.error(`failed to decode data, error: ${error}`) + } + + if (responseBody.length > MAX_BODY_SIZE) { + responseBody = "" + } + + let apiEvent = { + "metadata": { + "timestamp": Date.parse(r.variables.time_iso8601.split("+")[0]) / 1000, + "receiver_name": "nginx", + "receiver_version": ngx.version, + }, + "source": { + "ip": r.remoteAddress, + "port": r.variables.remote_port, + }, + "destination": { + "ip": r.variables.server_addr, + "port": r.variables.server_port, + }, + "request": { + "headers": {}, + "body": r.requestText || "", + }, + "response": { + "headers": {}, + "body": responseBody, + }, + "protocol": r.variables.server_protocol, + }; + + for (const header in r.headersIn) { + apiEvent.request.headers[header] = r.headersIn[header]; + } + + apiEvent.request.headers[":scheme"] = r.variables.scheme + apiEvent.request.headers[":path"] = r.uri + apiEvent.request.headers[":method"] = r.variables.request_method + + apiEvent.request.headers["body_bytes_sent"] = r.variables.body_bytes_sent + + apiEvent.request.headers["request_length"] = r.variables.request_length + + apiEvent.request.headers["request_time"] = r.variables.request_time + + apiEvent.request.headers["query"] = r.variables.query_string + + for (const header in r.headersOut) { + apiEvent.response.headers[header] = r.headersOut[header]; + } + apiEvent.response.headers[ResStatusKey] = r.variables.status + + ngx.shared.apievents.set(DEFAULT_KEY, JSON.stringify(apiEvent)); + } + + async function dispatchHttpCall(r) { + try { + let apiEvent = ngx.shared.apievents.get(DEFAULT_KEY); + await r.subrequest("/sentryflow", { + method: "POST", body: apiEvent, detached: true + }) + } catch (error) { + r.error(`failed to dispatch HTTP call to SentryFlow, error: ${error}`) + return; + } finally { + ngx.shared.apievents.clear(); + } + + r.return(200, "OK"); + } + + export default {requestHandler, dispatchHttpCall}; +EOF +``` + +2. Add the following volume and volume-mount in ingress controller deployment: + +```yaml +... +volumes: + - name: sentryflow-nginx-inc + configMap: + name: sentryflow-nginx-inc +... +... +volumeMounts: + - mountPath: /etc/nginx/njs/sentryflow.js + name: sentryflow-nginx-inc + subPath: sentryflow.js +``` + +3. Update ingress controller configmap as follows: + +```yaml +... +data: + http-snippets: | + js_path "/etc/nginx/njs/"; + subrequest_output_buffer_size 8k; + js_shared_dict_zone zone=apievents:1M timeout=300s evict; + js_import main from sentryflow.js; + location-snippets: | + js_body_filter main.requestHandler buffer_type=buffer; + mirror /mirror_request; + mirror_request_body on; + server-snippets: | + location /mirror_request { + internal; + js_content main.dispatchHttpCall; + } + location /sentryflow { + internal; + # Update SentryFlow URL with path to ingest access logs if required. + proxy_pass http://sentryflow.sentryflow:8081/api/v1/events; + proxy_method POST; + proxy_set_header accept "application/json"; + proxy_set_header Content-Type "application/json"; + } +``` + +4. Download SentryFlow manifest file + + ```shell + curl -sO https://raw.githubusercontent.com/5GSEC/SentryFlow/refs/heads/main/deployments/sentryflow.yaml + ``` + +5. Update the `.receivers` configuration in `sentryflow` [configmap](../../../../../deployments/sentryflow.yaml) as + follows: + + ```yaml + filters: + server: + port: 8081 + # Following is required for `nginx-inc-ingress-controller` receiver. + nginxIngress: + deploymentName: + configMapName: + sentryFlowNjsConfigMapName: + + receivers: + others: + - name: nginx-inc-ingress-controller # SentryFlow makes use of `name` to configure receivers. DON'T CHANGE IT. + namespace: # Kubernetes namespace in which you've deployed the ingress controller. + ... + ``` + +6. Deploy SentryFlow + + ```shell + kubectl apply -f sentryflow.yaml + ``` + +7. Trigger API calls to generate traffic. + +8. Use SentryFlow [log client](../../../../client) to see the API Events. diff --git a/docs/receivers/other/web-server/nginx/nginx.md b/docs/receivers/other/web-server/nginx/nginx.md new file mode 100644 index 0000000..d426663 --- /dev/null +++ b/docs/receivers/other/web-server/nginx/nginx.md @@ -0,0 +1,95 @@ +# Nginx Web Server + +## Description + +This guide provides a step-by-step process to integrate SentryFlow +with [Nginx webserver](https://nginx.org/), aimed at enhancing API +observability. It includes detailed commands for each step along with their explanations. + +SentryFlow make use of following to provide visibility into API calls: + +- [Nginx njs](https://nginx.org/en/docs/njs/) module. +- [Njs filter](../../../../../filter/nginx). + +## Prerequisites + +- Nginx web server. +- [Nginx-njs-module](https://github.com/nginx/njs?tab=readme-ov-file#downloading-and-installing). + +## How to + +To Observe API calls of your application running on a virtual machine (VM) behind a Nginx web server, follow the below +steps: + +1. Copy [sentryflow.js](../../../../../filter/nginx/sentryflow.js) file to `/etc/nginx/njs/` directory as + `sentryflow.js`. +2. Edit `nginx.conf` file located in `/etc/nginx/` directory as follows: + +```nginx configuration +load_module /etc/nginx/modules/ngx_http_js_module.so; +... +http { + ... + subrequest_output_buffer_size 8k; + js_path "/etc/nginx/njs/"; + js_shared_dict_zone zone=apievents:1M timeout=60s evict; + js_import main from sentryflow.js; + ... + server { + location / { + js_body_filter main.requestHandler buffer_type=buffer; + mirror /mirror_request; + mirror_request_body on; + } + + location /mirror_request { + internal; + js_content main.dispatchHttpCall; + } + + location /sentryflow { + internal; + + # SentryFlow URL with path to ingest access logs. + proxy_pass http:///api/v1/events; + + proxy_method POST; + proxy_set_header accept "application/json"; + proxy_set_header Content-Type "application/json"; + } + ... + } +} +``` + +Here is the sample [nginx.conf](../../../../../filter/nginx/nginx.conf) file for reference. + +3. Reload `nginx`: + +```shell +$ sudo nginx -s reload +``` + +4. Update the `.receivers` configuration in `sentryflow` [configmap](../../../../deployments/sentryflow.yaml) as + follows: + + ```yaml + filters: + server: + port: 8081 + + receivers: + others: + - name: nginx-webserver # SentryFlow makes use of `name` to configure receivers. DON'T CHANGE IT. + ... + ``` + +5. Deploy SentryFlow + + ```shell + kubectl apply -f sentryflow.yaml + ``` + +6. Trigger API calls to generate traffic. + +7. Use SentryFlow [log client](../../../../client) to see the API Events. \ No newline at end of file diff --git a/filter/nginx/Readme.md b/filter/nginx/Readme.md new file mode 100644 index 0000000..4a14095 --- /dev/null +++ b/filter/nginx/Readme.md @@ -0,0 +1,105 @@ +# Nginx + +This Nginx JavaScript script actively monitors API calls made to an application running on a virtual machine (VM) behind +a Nginx web server. + +## Sample API Event: + +```json +{ + "metadata": { + "timestamp": 1728722194, + "receiver_name": "nginx", + "receiver_version": "1.26.2" + }, + "source": { + "ip": "192.168.64.1", + "port": "58242" + }, + "destination": { + "ip": "192.168.64.19", + "port": "80" + }, + "request": { + "headers": { + "Host": "192.168.64.19", + "Connection": "keep-alive", + "Upgrade-Insecure-Requests": "1", + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8", + "Sec-GPC": "1", + "Accept-Language": "en-GB,en", + "Accept-Encoding": "gzip, deflate", + ":scheme": "http", + ":path": "/api/v1/healthz", + ":method": "GET", + "body_bytes_sent": "0", + "request_length": "440", + "request_time": "0.000", + "query": "just=for&testing=purpose" + }, + "body": "" + }, + "response": { + "headers": { + "Content-Type": "text/html", + "Content-Length": "555", + "status": "404" + }, + "body": "\r\n404 Not Found\r\n\r\n

404 Not Found

\r\n" + }, + "protocol": "HTTP/1.1" +} +``` + +# Getting Started + +- Install [nginx-njs-module](https://github.com/nginx/njs?tab=readme-ov-file#downloading-and-installing) +- Copy [sentryflow.js](sentryflow.js) file to `/etc/nginx/njs/` directory as `sentryflow.js`. +- Edit `nginx.conf` file located in `/etc/nginx/` directory as follows: + +```nginx configuration +load_module /etc/nginx/modules/ngx_http_js_module.so; +... +http { + ... + subrequest_output_buffer_size 8k; + js_path "/etc/nginx/njs/"; + js_shared_dict_zone zone=apievents:1M timeout=60s evict; + js_import main from sentryflow.js; + ... + server { + location / { + js_body_filter main.requestHandler buffer_type=buffer; + mirror /mirror_request; + mirror_request_body on; + } + + location /mirror_request { + internal; + js_content main.dispatchHttpCall; + } + + location /sentryflow { + internal; + # SentryFlow URL with path to ingest access logs. + proxy_pass http:///api/v1/events; + proxy_method POST; + proxy_set_header accept "application/json"; + proxy_set_header Content-Type "application/json"; + } + ... + } +} +``` + +Here is the sample [nginx.conf](nginx.conf) file for reference. + +- Reload `nginx`: + +```shell +$ sudo nginx -s reload +``` + +- Trigger API calls to generate traffic. +- Verify that the recorded API events in SentryFlow are similar to [sample event](#sample-api-event). diff --git a/filter/nginx/nginx.conf b/filter/nginx/nginx.conf new file mode 100644 index 0000000..504afd4 --- /dev/null +++ b/filter/nginx/nginx.conf @@ -0,0 +1,63 @@ +load_module /etc/nginx/modules/ngx_http_js_module.so; + +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log notice; +pid /var/run/nginx.pid; + +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + subrequest_output_buffer_size 8k; + js_path "/etc/nginx/njs/"; + + # Creates a 1MB shared memory dictionary to store key-value pairs + # that can be accessed by multiple worker processes. + # timeout: Specifies that key-value pairs will be removed after 60 seconds of inactivity. + js_shared_dict_zone zone=apievents:1M timeout=60s evict; + js_import main from sentryflow.js; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + server { + listen 80; + location / { + js_body_filter main.requestHandler buffer_type=buffer; + mirror /mirror_request; + mirror_request_body on; + } + + location /mirror_request { + # https://nginx.org/en/docs/http/ngx_http_core_module.html#internal + internal; + js_content main.dispatchHttpCall; + } + + location /sentryflow { + # https://nginx.org/en/docs/http/ngx_http_core_module.html#internal + internal; + # SentryFlow URL with path to ingest access logs. + proxy_pass http://192.168.64.1:8081/api/v1/events; + proxy_method POST; + proxy_set_header accept "application/json"; + proxy_set_header Content-Type "application/json"; + } + } +} diff --git a/filter/nginx/sentryflow.js b/filter/nginx/sentryflow.js new file mode 100644 index 0000000..0f017a7 --- /dev/null +++ b/filter/nginx/sentryflow.js @@ -0,0 +1,99 @@ +const DEFAULT_KEY = "sentryFlow"; +const ResStatusKey = ":status" +const MAX_BODY_SIZE = 1_000_000; // 1 MB + +function requestHandler(r, data, flags) { + // https://nginx.org/en/docs/njs/reference.html#r_sendbuffer + r.sendBuffer(data, flags); + + // https://nginx.org/en/docs/njs/reference.html#r_done + r.done(); + + let responseBody = "" + try { + responseBody = new TextDecoder("utf-8") + .decode(new Uint8Array(data)); + } catch (error) { + r.error(`failed to decode data, error: ${error}`) + // Do not return, process other info even without body. + } + + if (responseBody.length > MAX_BODY_SIZE) { + responseBody = "" + } + + let apiEvent = { + "metadata": { + // Divide by 1000 converts the timestamp from milliseconds to seconds. + "timestamp": Date.parse(r.variables.time_iso8601.split("+")[0]) / 1000, + "receiver_name": "nginx", + "receiver_version": ngx.version, + }, + "source": { + "ip": r.remoteAddress, + "port": r.variables.remote_port, + }, + "destination": { + "ip": r.variables.server_addr, + "port": r.variables.server_port, + }, + "request": { + "headers": {}, + "body": r.requestText || "", + }, + "response": { + "headers": {}, + "body": responseBody, + }, + "protocol": r.variables.server_protocol, + }; + + for (const header in r.headersIn) { + apiEvent.request.headers[header] = r.headersIn[header]; + } + + // https://nginx.org/en/docs/http/ngx_http_core_module.html#variables + apiEvent.request.headers[":scheme"] = r.variables.scheme + apiEvent.request.headers[":path"] = r.uri + apiEvent.request.headers[":method"] = r.variables.request_method + + // Number of bytes sent to a client, not counting the response header; this + // variable is compatible with the “%B” parameter of the mod_log_config Apache module. + apiEvent.request.headers["body_bytes_sent"] = r.variables.body_bytes_sent + + // Request length including request line, header, and request body. + apiEvent.request.headers["request_length"] = r.variables.request_length + + // Request processing time in seconds with a milliseconds resolution; + // Time elapsed since the first bytes were read from the client. + apiEvent.request.headers["request_time"] = r.variables.request_time + + // Query (args) in the request line. + apiEvent.request.headers["query"] = r.variables.query_string + + for (const header in r.headersOut) { + apiEvent.response.headers[header] = r.headersOut[header]; + } + apiEvent.response.headers[ResStatusKey] = r.variables.status + + // https://nginx.org/en/docs/njs/reference.html#ngx_shared + ngx.shared.apievents.set(DEFAULT_KEY, JSON.stringify(apiEvent)); +} + +async function dispatchHttpCall(r) { + try { + let apiEvent = ngx.shared.apievents.get(DEFAULT_KEY); + await r.subrequest("/sentryflow", { + method: "POST", body: apiEvent, detached: true + }) + } catch (error) { + r.error(`failed to dispatch HTTP call to SentryFlow, error: ${error}`) + return; + } finally { + ngx.shared.apievents.clear(); + } + + r.return(200, "OK"); +} + +export default {requestHandler, dispatchHttpCall}; diff --git a/protobuf/golang/sentryflow.pb.go b/protobuf/golang/sentryflow.pb.go index db495ba..97ca48b 100644 --- a/protobuf/golang/sentryflow.pb.go +++ b/protobuf/golang/sentryflow.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc v5.28.0 // source: sentryflow.proto @@ -31,11 +31,9 @@ type ClientInfo struct { func (x *ClientInfo) Reset() { *x = ClientInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientInfo) String() string { @@ -46,7 +44,7 @@ func (*ClientInfo) ProtoMessage() {} func (x *ClientInfo) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103,11 +101,9 @@ type APILog struct { func (x *APILog) Reset() { *x = APILog{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *APILog) String() string { @@ -118,7 +114,7 @@ func (*APILog) ProtoMessage() {} func (x *APILog) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +272,9 @@ type APIEvent struct { func (x *APIEvent) Reset() { *x = APIEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *APIEvent) String() string { @@ -291,7 +285,7 @@ func (*APIEvent) ProtoMessage() {} func (x *APIEvent) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -353,22 +347,25 @@ type Metadata struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ContextId uint32 `protobuf:"varint,1,opt,name=context_id,json=contextId,proto3" json:"context_id,omitempty"` - Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + ContextId uint32 `protobuf:"varint,1,opt,name=context_id,json=contextId,proto3" json:"context_id,omitempty"` + Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Deprecated: Marked as deprecated in sentryflow.proto. IstioVersion string `protobuf:"bytes,3,opt,name=istio_version,json=istioVersion,proto3" json:"istio_version,omitempty"` MeshId string `protobuf:"bytes,4,opt,name=mesh_id,json=meshId,proto3" json:"mesh_id,omitempty"` // The name of the Kubernetes node where the workload is running. If the workload // is not running in a Kubernetes environment, this field will be empty. NodeName string `protobuf:"bytes,5,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` + // Name of receiver (e.g., Istio, nginx). + ReceiverName string `protobuf:"bytes,6,opt,name=receiver_name,json=receiverName,proto3" json:"receiver_name,omitempty"` + // Version of receiver (e.g., 1.26.2). + ReceiverVersion string `protobuf:"bytes,7,opt,name=receiver_version,json=receiverVersion,proto3" json:"receiver_version,omitempty"` } func (x *Metadata) Reset() { *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Metadata) String() string { @@ -379,7 +376,7 @@ func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,6 +405,7 @@ func (x *Metadata) GetTimestamp() uint64 { return 0 } +// Deprecated: Marked as deprecated in sentryflow.proto. func (x *Metadata) GetIstioVersion() string { if x != nil { return x.IstioVersion @@ -429,6 +427,20 @@ func (x *Metadata) GetNodeName() string { return "" } +func (x *Metadata) GetReceiverName() string { + if x != nil { + return x.ReceiverName + } + return "" +} + +func (x *Metadata) GetReceiverVersion() string { + if x != nil { + return x.ReceiverVersion + } + return "" +} + // Workload represents a generic entity that can be either a Kubernetes or // non-Kubernetes resource. It serves as a source or destination for access // within a system. @@ -450,11 +462,9 @@ type Workload struct { func (x *Workload) Reset() { *x = Workload{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload) String() string { @@ -465,7 +475,7 @@ func (*Workload) ProtoMessage() {} func (x *Workload) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,11 +530,9 @@ type Request struct { func (x *Request) Reset() { *x = Request{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Request) String() string { @@ -535,7 +543,7 @@ func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -576,11 +584,9 @@ type Response struct { func (x *Response) Reset() { *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Response) String() string { @@ -591,7 +597,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,11 +636,9 @@ type APIMetrics struct { func (x *APIMetrics) Reset() { *x = APIMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *APIMetrics) String() string { @@ -645,7 +649,7 @@ func (*APIMetrics) ProtoMessage() {} func (x *APIMetrics) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +681,9 @@ type MetricValue struct { func (x *MetricValue) Reset() { *x = MetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetricValue) String() string { @@ -692,7 +694,7 @@ func (*MetricValue) ProtoMessage() {} func (x *MetricValue) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -729,11 +731,9 @@ type EnvoyMetrics struct { func (x *EnvoyMetrics) Reset() { *x = EnvoyMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvoyMetrics) String() string { @@ -744,7 +744,7 @@ func (*EnvoyMetrics) ProtoMessage() {} func (x *EnvoyMetrics) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,108 +870,113 @@ var file_sentryflow_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0xf6, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x73, 0x68, 0x49, 0x64, 0x12, - 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x60, 0x0a, 0x08, - 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, - 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x93, - 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x95, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x39, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x70, 0x12, 0x27, 0x0a, 0x0d, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x69, 0x73, + 0x74, 0x69, 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x73, + 0x68, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0x60, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, + 0x72, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, + 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x1a, 0x3a, 0x0a, 0x0c, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x95, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x99, 0x01, 0x0a, 0x0a, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, + 0x4a, 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x41, 0x50, 0x49, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x41, + 0x50, 0x49, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x70, + 0x65, 0x72, 0x41, 0x50, 0x49, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x50, + 0x65, 0x72, 0x41, 0x50, 0x49, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, 0x01, 0x0a, - 0x0a, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x70, - 0x65, 0x72, 0x41, 0x50, 0x49, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x41, 0x50, 0x49, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x70, 0x65, 0x72, 0x41, 0x50, - 0x49, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x41, 0x50, - 0x49, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7f, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, - 0x38, 0x0a, 0x0a, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x85, 0x03, 0x0a, 0x0c, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x50, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x49, - 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, - 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7f, 0x0a, 0x0b, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x85, 0x03, + 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x51, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x51, - 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x32, 0xbd, 0x02, 0x0a, 0x0a, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x46, 0x6c, 0x6f, 0x77, - 0x12, 0x3a, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x41, 0x50, 0x49, 0x4c, 0x6f, 0x67, 0x12, 0x14, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x1a, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x50, 0x49, 0x4c, 0x6f, 0x67, 0x22, 0x03, 0x88, 0x02, 0x01, 0x30, 0x01, 0x12, 0x39, 0x0a, 0x0b, - 0x47, 0x65, 0x74, 0x41, 0x50, 0x49, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x1a, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x36, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x41, - 0x50, 0x49, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x3d, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x30, 0x01, 0x12, 0x41, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x30, - 0x01, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x35, 0x47, 0x53, 0x45, 0x43, 0x2f, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x46, 0x6c, 0x6f, 0x77, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xbd, 0x02, 0x0a, 0x0a, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x3a, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x41, 0x50, 0x49, 0x4c, 0x6f, + 0x67, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, 0x4c, 0x6f, 0x67, 0x22, 0x03, 0x88, 0x02, 0x01, 0x30, 0x01, + 0x12, 0x39, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x50, 0x49, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x50, 0x49, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x36, 0x0a, 0x0c, 0x53, + 0x65, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, + 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x16, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x30, 0x01, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x35, 0x47, 0x53, 0x45, 0x43, 0x2f, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x46, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1044,128 +1049,6 @@ func file_sentryflow_proto_init() { if File_sentryflow_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_sentryflow_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ClientInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentryflow_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*APILog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentryflow_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*APIEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentryflow_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentryflow_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Workload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentryflow_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentryflow_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentryflow_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*APIMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentryflow_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*MetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentryflow_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*EnvoyMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/protobuf/golang/sentryflow_metrics.pb.go b/protobuf/golang/sentryflow_metrics.pb.go index cfb4782..ea9b33c 100644 --- a/protobuf/golang/sentryflow_metrics.pb.go +++ b/protobuf/golang/sentryflow_metrics.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc v5.28.0 // source: sentryflow_metrics.proto @@ -30,11 +30,9 @@ type APIClassifierRequest struct { func (x *APIClassifierRequest) Reset() { *x = APIClassifierRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_metrics_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_metrics_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *APIClassifierRequest) String() string { @@ -45,7 +43,7 @@ func (*APIClassifierRequest) ProtoMessage() {} func (x *APIClassifierRequest) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_metrics_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77,11 +75,9 @@ type APIClassifierResponse struct { func (x *APIClassifierResponse) Reset() { *x = APIClassifierResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sentryflow_metrics_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_sentryflow_metrics_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *APIClassifierResponse) String() string { @@ -92,7 +88,7 @@ func (*APIClassifierResponse) ProtoMessage() {} func (x *APIClassifierResponse) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_metrics_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -177,32 +173,6 @@ func file_sentryflow_metrics_proto_init() { if File_sentryflow_metrics_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_sentryflow_metrics_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*APIClassifierRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentryflow_metrics_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*APIClassifierResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/protobuf/python/sentryflow_pb2.py b/protobuf/python/sentryflow_pb2.py index 8728a70..de1239f 100644 --- a/protobuf/python/sentryflow_pb2.py +++ b/protobuf/python/sentryflow_pb2.py @@ -24,7 +24,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10sentryflow.proto\x12\x08protobuf\"1\n\nClientInfo\x12\x10\n\x08hostName\x18\x01 \x01(\t\x12\x11\n\tIPAddress\x18\x02 \x01(\t\"\xe7\x03\n\x06\x41PILog\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x11\n\ttimeStamp\x18\x02 \x01(\t\x12\x14\n\x0csrcNamespace\x18\x0b \x01(\t\x12\x0f\n\x07srcName\x18\x0c \x01(\t\x12\x30\n\x08srcLabel\x18\r \x03(\x0b\x32\x1e.protobuf.APILog.SrcLabelEntry\x12\x0f\n\x07srcType\x18\x15 \x01(\t\x12\r\n\x05srcIP\x18\x16 \x01(\t\x12\x0f\n\x07srcPort\x18\x17 \x01(\t\x12\x14\n\x0c\x64stNamespace\x18\x1f \x01(\t\x12\x0f\n\x07\x64stName\x18 \x01(\t\x12\x30\n\x08\x64stLabel\x18! \x03(\x0b\x32\x1e.protobuf.APILog.DstLabelEntry\x12\x0f\n\x07\x64stType\x18) \x01(\t\x12\r\n\x05\x64stIP\x18* \x01(\t\x12\x0f\n\x07\x64stPort\x18+ \x01(\t\x12\x10\n\x08protocol\x18\x33 \x01(\t\x12\x0e\n\x06method\x18\x34 \x01(\t\x12\x0c\n\x04path\x18\x35 \x01(\t\x12\x14\n\x0cresponseCode\x18\x36 \x01(\x05\x1a/\n\rSrcLabelEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a/\n\rDstLabelEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x02\x18\x01\"\xd9\x01\n\x08\x41PIEvent\x12$\n\x08metadata\x18\x01 \x01(\x0b\x32\x12.protobuf.Metadata\x12\"\n\x06source\x18\x03 \x01(\x0b\x32\x12.protobuf.Workload\x12\'\n\x0b\x64\x65stination\x18\x04 \x01(\x0b\x32\x12.protobuf.Workload\x12\"\n\x07request\x18\x05 \x01(\x0b\x32\x11.protobuf.Request\x12$\n\x08response\x18\x06 \x01(\x0b\x32\x12.protobuf.Response\x12\x10\n\x08protocol\x18\x07 \x01(\t\"l\n\x08Metadata\x12\x12\n\ncontext_id\x18\x01 \x01(\r\x12\x11\n\ttimestamp\x18\x02 \x01(\x04\x12\x15\n\ristio_version\x18\x03 \x01(\t\x12\x0f\n\x07mesh_id\x18\x04 \x01(\t\x12\x11\n\tnode_name\x18\x05 \x01(\t\"E\n\x08Workload\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\n\n\x02ip\x18\x03 \x01(\t\x12\x0c\n\x04port\x18\x04 \x01(\x05\"x\n\x07Request\x12/\n\x07headers\x18\x01 \x03(\x0b\x32\x1e.protobuf.Request.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x02 \x01(\t\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"z\n\x08Response\x12\x30\n\x07headers\x18\x01 \x03(\x0b\x32\x1f.protobuf.Response.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x02 \x01(\t\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x7f\n\nAPIMetrics\x12<\n\x0cperAPICounts\x18\x01 \x03(\x0b\x32&.protobuf.APIMetrics.PerAPICountsEntry\x1a\x33\n\x11PerAPICountsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x04:\x02\x38\x01\"l\n\x0bMetricValue\x12/\n\x05value\x18\x01 \x03(\x0b\x32 .protobuf.MetricValue.ValueEntry\x1a,\n\nValueEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb5\x02\n\x0c\x45nvoyMetrics\x12\x11\n\ttimeStamp\x18\x01 \x01(\t\x12\x11\n\tnamespace\x18\x0b \x01(\t\x12\x0c\n\x04name\x18\x0c \x01(\t\x12\x11\n\tIPAddress\x18\r \x01(\t\x12\x32\n\x06labels\x18\x0e \x03(\x0b\x32\".protobuf.EnvoyMetrics.LabelsEntry\x12\x34\n\x07metrics\x18\x15 \x03(\x0b\x32#.protobuf.EnvoyMetrics.MetricsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x45\n\x0cMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.protobuf.MetricValue:\x02\x38\x01\x32\xbd\x02\n\nSentryFlow\x12:\n\tGetAPILog\x12\x14.protobuf.ClientInfo\x1a\x10.protobuf.APILog\"\x03\x88\x02\x01\x30\x01\x12\x39\n\x0bGetAPIEvent\x12\x14.protobuf.ClientInfo\x1a\x12.protobuf.APIEvent0\x01\x12\x36\n\x0cSendAPIEvent\x12\x12.protobuf.APIEvent\x1a\x12.protobuf.APIEvent\x12=\n\rGetAPIMetrics\x12\x14.protobuf.ClientInfo\x1a\x14.protobuf.APIMetrics0\x01\x12\x41\n\x0fGetEnvoyMetrics\x12\x14.protobuf.ClientInfo\x1a\x16.protobuf.EnvoyMetrics0\x01\x42-Z+github.com/5GSEC/SentryFlow/protobuf/golangb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10sentryflow.proto\x12\x08protobuf\"1\n\nClientInfo\x12\x10\n\x08hostName\x18\x01 \x01(\t\x12\x11\n\tIPAddress\x18\x02 \x01(\t\"\xe7\x03\n\x06\x41PILog\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x11\n\ttimeStamp\x18\x02 \x01(\t\x12\x14\n\x0csrcNamespace\x18\x0b \x01(\t\x12\x0f\n\x07srcName\x18\x0c \x01(\t\x12\x30\n\x08srcLabel\x18\r \x03(\x0b\x32\x1e.protobuf.APILog.SrcLabelEntry\x12\x0f\n\x07srcType\x18\x15 \x01(\t\x12\r\n\x05srcIP\x18\x16 \x01(\t\x12\x0f\n\x07srcPort\x18\x17 \x01(\t\x12\x14\n\x0c\x64stNamespace\x18\x1f \x01(\t\x12\x0f\n\x07\x64stName\x18 \x01(\t\x12\x30\n\x08\x64stLabel\x18! \x03(\x0b\x32\x1e.protobuf.APILog.DstLabelEntry\x12\x0f\n\x07\x64stType\x18) \x01(\t\x12\r\n\x05\x64stIP\x18* \x01(\t\x12\x0f\n\x07\x64stPort\x18+ \x01(\t\x12\x10\n\x08protocol\x18\x33 \x01(\t\x12\x0e\n\x06method\x18\x34 \x01(\t\x12\x0c\n\x04path\x18\x35 \x01(\t\x12\x14\n\x0cresponseCode\x18\x36 \x01(\x05\x1a/\n\rSrcLabelEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a/\n\rDstLabelEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x02\x18\x01\"\xd9\x01\n\x08\x41PIEvent\x12$\n\x08metadata\x18\x01 \x01(\x0b\x32\x12.protobuf.Metadata\x12\"\n\x06source\x18\x03 \x01(\x0b\x32\x12.protobuf.Workload\x12\'\n\x0b\x64\x65stination\x18\x04 \x01(\x0b\x32\x12.protobuf.Workload\x12\"\n\x07request\x18\x05 \x01(\x0b\x32\x11.protobuf.Request\x12$\n\x08response\x18\x06 \x01(\x0b\x32\x12.protobuf.Response\x12\x10\n\x08protocol\x18\x07 \x01(\t\"\xa1\x01\n\x08Metadata\x12\x12\n\ncontext_id\x18\x01 \x01(\r\x12\x11\n\ttimestamp\x18\x02 \x01(\x04\x12\x19\n\ristio_version\x18\x03 \x01(\tB\x02\x18\x01\x12\x0f\n\x07mesh_id\x18\x04 \x01(\t\x12\x11\n\tnode_name\x18\x05 \x01(\t\x12\x15\n\rreceiver_name\x18\x06 \x01(\t\x12\x18\n\x10receiver_version\x18\x07 \x01(\t\"E\n\x08Workload\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\n\n\x02ip\x18\x03 \x01(\t\x12\x0c\n\x04port\x18\x04 \x01(\x05\"x\n\x07Request\x12/\n\x07headers\x18\x01 \x03(\x0b\x32\x1e.protobuf.Request.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x02 \x01(\t\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"z\n\x08Response\x12\x30\n\x07headers\x18\x01 \x03(\x0b\x32\x1f.protobuf.Response.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x02 \x01(\t\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x7f\n\nAPIMetrics\x12<\n\x0cperAPICounts\x18\x01 \x03(\x0b\x32&.protobuf.APIMetrics.PerAPICountsEntry\x1a\x33\n\x11PerAPICountsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x04:\x02\x38\x01\"l\n\x0bMetricValue\x12/\n\x05value\x18\x01 \x03(\x0b\x32 .protobuf.MetricValue.ValueEntry\x1a,\n\nValueEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb5\x02\n\x0c\x45nvoyMetrics\x12\x11\n\ttimeStamp\x18\x01 \x01(\t\x12\x11\n\tnamespace\x18\x0b \x01(\t\x12\x0c\n\x04name\x18\x0c \x01(\t\x12\x11\n\tIPAddress\x18\r \x01(\t\x12\x32\n\x06labels\x18\x0e \x03(\x0b\x32\".protobuf.EnvoyMetrics.LabelsEntry\x12\x34\n\x07metrics\x18\x15 \x03(\x0b\x32#.protobuf.EnvoyMetrics.MetricsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x45\n\x0cMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.protobuf.MetricValue:\x02\x38\x01\x32\xbd\x02\n\nSentryFlow\x12:\n\tGetAPILog\x12\x14.protobuf.ClientInfo\x1a\x10.protobuf.APILog\"\x03\x88\x02\x01\x30\x01\x12\x39\n\x0bGetAPIEvent\x12\x14.protobuf.ClientInfo\x1a\x12.protobuf.APIEvent0\x01\x12\x36\n\x0cSendAPIEvent\x12\x12.protobuf.APIEvent\x1a\x12.protobuf.APIEvent\x12=\n\rGetAPIMetrics\x12\x14.protobuf.ClientInfo\x1a\x14.protobuf.APIMetrics0\x01\x12\x41\n\x0fGetEnvoyMetrics\x12\x14.protobuf.ClientInfo\x1a\x16.protobuf.EnvoyMetrics0\x01\x42-Z+github.com/5GSEC/SentryFlow/protobuf/golangb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -38,6 +38,8 @@ _globals['_APILOG_DSTLABELENTRY']._serialized_options = b'8\001' _globals['_APILOG']._loaded_options = None _globals['_APILOG']._serialized_options = b'\030\001' + _globals['_METADATA'].fields_by_name['istio_version']._loaded_options = None + _globals['_METADATA'].fields_by_name['istio_version']._serialized_options = b'\030\001' _globals['_REQUEST_HEADERSENTRY']._loaded_options = None _globals['_REQUEST_HEADERSENTRY']._serialized_options = b'8\001' _globals['_RESPONSE_HEADERSENTRY']._loaded_options = None @@ -62,32 +64,32 @@ _globals['_APILOG_DSTLABELENTRY']._serialized_end=565 _globals['_APIEVENT']._serialized_start=572 _globals['_APIEVENT']._serialized_end=789 - _globals['_METADATA']._serialized_start=791 - _globals['_METADATA']._serialized_end=899 - _globals['_WORKLOAD']._serialized_start=901 - _globals['_WORKLOAD']._serialized_end=970 - _globals['_REQUEST']._serialized_start=972 - _globals['_REQUEST']._serialized_end=1092 - _globals['_REQUEST_HEADERSENTRY']._serialized_start=1046 - _globals['_REQUEST_HEADERSENTRY']._serialized_end=1092 - _globals['_RESPONSE']._serialized_start=1094 - _globals['_RESPONSE']._serialized_end=1216 - _globals['_RESPONSE_HEADERSENTRY']._serialized_start=1046 - _globals['_RESPONSE_HEADERSENTRY']._serialized_end=1092 - _globals['_APIMETRICS']._serialized_start=1218 - _globals['_APIMETRICS']._serialized_end=1345 - _globals['_APIMETRICS_PERAPICOUNTSENTRY']._serialized_start=1294 - _globals['_APIMETRICS_PERAPICOUNTSENTRY']._serialized_end=1345 - _globals['_METRICVALUE']._serialized_start=1347 - _globals['_METRICVALUE']._serialized_end=1455 - _globals['_METRICVALUE_VALUEENTRY']._serialized_start=1411 - _globals['_METRICVALUE_VALUEENTRY']._serialized_end=1455 - _globals['_ENVOYMETRICS']._serialized_start=1458 - _globals['_ENVOYMETRICS']._serialized_end=1767 - _globals['_ENVOYMETRICS_LABELSENTRY']._serialized_start=1651 - _globals['_ENVOYMETRICS_LABELSENTRY']._serialized_end=1696 - _globals['_ENVOYMETRICS_METRICSENTRY']._serialized_start=1698 - _globals['_ENVOYMETRICS_METRICSENTRY']._serialized_end=1767 - _globals['_SENTRYFLOW']._serialized_start=1770 - _globals['_SENTRYFLOW']._serialized_end=2087 + _globals['_METADATA']._serialized_start=792 + _globals['_METADATA']._serialized_end=953 + _globals['_WORKLOAD']._serialized_start=955 + _globals['_WORKLOAD']._serialized_end=1024 + _globals['_REQUEST']._serialized_start=1026 + _globals['_REQUEST']._serialized_end=1146 + _globals['_REQUEST_HEADERSENTRY']._serialized_start=1100 + _globals['_REQUEST_HEADERSENTRY']._serialized_end=1146 + _globals['_RESPONSE']._serialized_start=1148 + _globals['_RESPONSE']._serialized_end=1270 + _globals['_RESPONSE_HEADERSENTRY']._serialized_start=1100 + _globals['_RESPONSE_HEADERSENTRY']._serialized_end=1146 + _globals['_APIMETRICS']._serialized_start=1272 + _globals['_APIMETRICS']._serialized_end=1399 + _globals['_APIMETRICS_PERAPICOUNTSENTRY']._serialized_start=1348 + _globals['_APIMETRICS_PERAPICOUNTSENTRY']._serialized_end=1399 + _globals['_METRICVALUE']._serialized_start=1401 + _globals['_METRICVALUE']._serialized_end=1509 + _globals['_METRICVALUE_VALUEENTRY']._serialized_start=1465 + _globals['_METRICVALUE_VALUEENTRY']._serialized_end=1509 + _globals['_ENVOYMETRICS']._serialized_start=1512 + _globals['_ENVOYMETRICS']._serialized_end=1821 + _globals['_ENVOYMETRICS_LABELSENTRY']._serialized_start=1705 + _globals['_ENVOYMETRICS_LABELSENTRY']._serialized_end=1750 + _globals['_ENVOYMETRICS_METRICSENTRY']._serialized_start=1752 + _globals['_ENVOYMETRICS_METRICSENTRY']._serialized_end=1821 + _globals['_SENTRYFLOW']._serialized_start=1824 + _globals['_SENTRYFLOW']._serialized_end=2141 # @@protoc_insertion_point(module_scope) diff --git a/protobuf/python/sentryflow_pb2.pyi b/protobuf/python/sentryflow_pb2.pyi index da65788..d069544 100644 --- a/protobuf/python/sentryflow_pb2.pyi +++ b/protobuf/python/sentryflow_pb2.pyi @@ -84,18 +84,22 @@ class APIEvent(_message.Message): def __init__(self, metadata: _Optional[_Union[Metadata, _Mapping]] = ..., source: _Optional[_Union[Workload, _Mapping]] = ..., destination: _Optional[_Union[Workload, _Mapping]] = ..., request: _Optional[_Union[Request, _Mapping]] = ..., response: _Optional[_Union[Response, _Mapping]] = ..., protocol: _Optional[str] = ...) -> None: ... class Metadata(_message.Message): - __slots__ = ("context_id", "timestamp", "istio_version", "mesh_id", "node_name") + __slots__ = ("context_id", "timestamp", "istio_version", "mesh_id", "node_name", "receiver_name", "receiver_version") CONTEXT_ID_FIELD_NUMBER: _ClassVar[int] TIMESTAMP_FIELD_NUMBER: _ClassVar[int] ISTIO_VERSION_FIELD_NUMBER: _ClassVar[int] MESH_ID_FIELD_NUMBER: _ClassVar[int] NODE_NAME_FIELD_NUMBER: _ClassVar[int] + RECEIVER_NAME_FIELD_NUMBER: _ClassVar[int] + RECEIVER_VERSION_FIELD_NUMBER: _ClassVar[int] context_id: int timestamp: int istio_version: str mesh_id: str node_name: str - def __init__(self, context_id: _Optional[int] = ..., timestamp: _Optional[int] = ..., istio_version: _Optional[str] = ..., mesh_id: _Optional[str] = ..., node_name: _Optional[str] = ...) -> None: ... + receiver_name: str + receiver_version: str + def __init__(self, context_id: _Optional[int] = ..., timestamp: _Optional[int] = ..., istio_version: _Optional[str] = ..., mesh_id: _Optional[str] = ..., node_name: _Optional[str] = ..., receiver_name: _Optional[str] = ..., receiver_version: _Optional[str] = ...) -> None: ... class Workload(_message.Message): __slots__ = ("name", "namespace", "ip", "port") diff --git a/protobuf/sentryflow.proto b/protobuf/sentryflow.proto index 1e706b5..d496147 100644 --- a/protobuf/sentryflow.proto +++ b/protobuf/sentryflow.proto @@ -51,12 +51,17 @@ message APIEvent { message Metadata { uint32 context_id = 1; uint64 timestamp = 2; - string istio_version = 3; + string istio_version = 3 [deprecated = true]; string mesh_id = 4; // The name of the Kubernetes node where the workload is running. If the workload // is not running in a Kubernetes environment, this field will be empty. string node_name = 5; + + // Name of receiver (e.g., Istio, nginx). + string receiver_name = 6; + // Version of receiver (e.g., 1.26.2). + string receiver_version = 7; } // Workload represents a generic entity that can be either a Kubernetes or diff --git a/sentryflow/config/default.yaml b/sentryflow/config/default.yaml index 3be12b6..d7f1980 100644 --- a/sentryflow/config/default.yaml +++ b/sentryflow/config/default.yaml @@ -5,22 +5,28 @@ filters: server: port: 8081 - envoy: - uri: 5gsec/sentryflow-httpfilter:latest +# Envoy filter is required for `istio-sidecar` service-mesh receiver. +# envoy: +# uri: 5gsec/sentryflow-httpfilter:latest + +# Following is required for `nginx-inc-ingress-controller` receiver. +# nginxIngress: +# deploymentName: nginx-ingress-controller +# configMapName: nginx-ingress +# sentryFlowNjsConfigMapName: sentryflow-njs receivers: # aka sources - serviceMeshes: - - name: istio-sidecar - namespace: istio-system - others: # TBD - - name: "coroot" - # Either gRPC or HTTP not both - grpc: - url: localhost - port: 1234 - http: - url: localhost - port: 4321 +# Uncomment the following receivers according to your requirement. + +# serviceMeshes: +# - name: istio-sidecar +# namespace: istio-system + +# others: +# - name: nginx-inc-ingress-controller +# namespace: default + +# - name: nginx-webserver exporter: grpc: diff --git a/sentryflow/pkg/config/config.go b/sentryflow/pkg/config/config.go index e4bf8c6..2f78633 100644 --- a/sentryflow/pkg/config/config.go +++ b/sentryflow/pkg/config/config.go @@ -9,6 +9,8 @@ import ( "github.com/spf13/viper" "go.uber.org/zap" + + "github.com/5GSEC/SentryFlow/pkg/util" ) const ( @@ -16,26 +18,14 @@ const ( SentryFlowDefaultFilterServerPort = 8081 ) -type endpoint struct { - Url string `json:"url"` - Port uint16 `json:"port"` -} - -type base struct { - Name string `json:"name,omitempty"` - // Todo: Do we really need both gRPC and http variants? - Grpc *endpoint `json:"grpc,omitempty"` - Http *endpoint `json:"http,omitempty"` -} - -type serviceMesh struct { +type nameAndNamespace struct { Name string `json:"name"` - Namespace string `json:"namespace"` + Namespace string `json:"namespace,omitempty"` } type receivers struct { - ServiceMeshes []*serviceMesh `json:"serviceMeshes,omitempty"` - Others []*base `json:"others,omitempty"` + ServiceMeshes []*nameAndNamespace `json:"serviceMeshes,omitempty"` + Others []*nameAndNamespace `json:"other,omitempty"` } type envoyFilterConfig struct { @@ -46,15 +36,26 @@ type server struct { Port uint16 `json:"port"` } +type nginxIngressConfig struct { + DeploymentName string `json:"deploymentName"` + ConfigMapName string `json:"configMapName"` + SentryFlowNjsConfigMapName string `json:"sentryFlowNjsConfigMapName"` +} + type filters struct { - Envoy *envoyFilterConfig `json:"envoy,omitempty"` - Server *server `json:"server,omitempty"` + Envoy *envoyFilterConfig `json:"envoy,omitempty"` + NginxIngress *nginxIngressConfig `json:"nginxIngress,omitempty"` + Server *server `json:"server,omitempty"` +} + +type exporterConfig struct { + Grpc *server `json:"grpc"` } type Config struct { - Filters *filters `json:"filters"` - Receivers *receivers `json:"receivers"` - Exporter *base `json:"exporter"` + Filters *filters `json:"filters"` + Receivers *receivers `json:"receivers"` + Exporter *exporterConfig `json:"exporter"` } func (c *Config) validate() error { @@ -76,9 +77,6 @@ func (c *Config) validate() error { if c.Exporter.Grpc != nil && c.Exporter.Grpc.Port == 0 { return fmt.Errorf("no exporter's gRPC port provided") } - if c.Exporter.Http != nil { - return fmt.Errorf("http exporter is not supported") - } if c.Receivers == nil { return fmt.Errorf("no receiver configuration provided") @@ -93,6 +91,28 @@ func (c *Config) validate() error { } } + for _, other := range c.Receivers.Others { + if other.Name == "" { + return fmt.Errorf("no other receiver name provided") + } + if other.Name == util.NginxIncorporationIngressController { + if other.Namespace == "" { + return fmt.Errorf("no nginx-inc ingress controller namespace provided") + } + if c.Filters.NginxIngress == nil { + return fmt.Errorf("no nginx-inc ingress configuration provided") + } + if c.Filters.NginxIngress.DeploymentName == "" { + return fmt.Errorf("no nginx ingress deployment name provided") + } + if c.Filters.NginxIngress.ConfigMapName == "" { + return fmt.Errorf("no nginx ingress configmap name provided") + } + if c.Filters.NginxIngress.SentryFlowNjsConfigMapName == "" { + return fmt.Errorf("no sentryflow njs configmap name provided") + } + } + } return nil } diff --git a/sentryflow/pkg/config/config_test.go b/sentryflow/pkg/config/config_test.go index ccddc1f..f79c9ab 100644 --- a/sentryflow/pkg/config/config_test.go +++ b/sentryflow/pkg/config/config_test.go @@ -15,7 +15,7 @@ func TestConfig_validate(t *testing.T) { type fields struct { Filters *filters Receivers *receivers - Exporter *base + Exporter *exporterConfig } tests := []struct { name string @@ -28,16 +28,15 @@ func TestConfig_validate(t *testing.T) { fields: fields{ Filters: nil, Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ + ServiceMeshes: []*nameAndNamespace{ { Name: "istio-sidecar", Namespace: "istio-system", }, }, }, - Exporter: &base{ - Name: "default gRPC exporter", - Grpc: &endpoint{ + Exporter: &exporterConfig{ + Grpc: &server{ Port: 11111, }, }, @@ -54,16 +53,15 @@ func TestConfig_validate(t *testing.T) { }, }, Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ + ServiceMeshes: []*nameAndNamespace{ { Name: "istio-sidecar", Namespace: "istio-system", }, }, }, - Exporter: &base{ - Name: "default gRPC exporter", - Grpc: &endpoint{ + Exporter: &exporterConfig{ + Grpc: &server{ Port: 11111, }, }, @@ -83,7 +81,7 @@ func TestConfig_validate(t *testing.T) { }, }, Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ + ServiceMeshes: []*nameAndNamespace{ { Name: "istio-sidecar", Namespace: "istio-system", @@ -107,15 +105,14 @@ func TestConfig_validate(t *testing.T) { }, }, Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ + ServiceMeshes: []*nameAndNamespace{ { Name: "istio-sidecar", Namespace: "istio-system", }, }, }, - Exporter: &base{ - Name: "default gRPC exporter", + Exporter: &exporterConfig{ Grpc: nil, }, }, @@ -134,53 +131,20 @@ func TestConfig_validate(t *testing.T) { }, }, Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ + ServiceMeshes: []*nameAndNamespace{ { Name: "istio-sidecar", Namespace: "istio-system", }, }, }, - Exporter: &base{ - Name: "gRPC exporter without port", - Grpc: &endpoint{}, + Exporter: &exporterConfig{ + Grpc: &server{}, }, }, wantErr: true, expectedErrMessage: "no exporter's gRPC port provided", }, - { - name: "with HTTP exporter should return error", - fields: fields{ - Filters: &filters{ - Envoy: &envoyFilterConfig{ - Uri: "5gsec/http-filter:v0.1", - }, - Server: &server{ - Port: SentryFlowDefaultFilterServerPort, - }, - }, - Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ - { - Name: "istio-sidecar", - Namespace: "istio-system", - }, - }, - }, - Exporter: &base{ - Name: "unsupported HTTP exporter", - Grpc: &endpoint{ - Port: 11111, - }, - Http: &endpoint{ - Port: 65432, - }, - }, - }, - wantErr: true, - expectedErrMessage: "http exporter is not supported", - }, { name: "with nil receiver config should return error", fields: fields{ @@ -193,9 +157,8 @@ func TestConfig_validate(t *testing.T) { }, }, Receivers: nil, - Exporter: &base{ - Name: "default gRPC exporter", - Grpc: &endpoint{ + Exporter: &exporterConfig{ + Grpc: &server{ Port: 11111, }, }, @@ -215,15 +178,14 @@ func TestConfig_validate(t *testing.T) { }, }, Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ + ServiceMeshes: []*nameAndNamespace{ { Namespace: "istio-system", }, }, }, - Exporter: &base{ - Name: "default gRPC exporter", - Grpc: &endpoint{ + Exporter: &exporterConfig{ + Grpc: &server{ Port: 11111, }, }, @@ -243,15 +205,14 @@ func TestConfig_validate(t *testing.T) { }, }, Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ + ServiceMeshes: []*nameAndNamespace{ { Name: "istio-sidecar", }, }, }, - Exporter: &base{ - Name: "default gRPC exporter", - Grpc: &endpoint{ + Exporter: &exporterConfig{ + Grpc: &server{ Port: 11111, }, }, @@ -271,16 +232,15 @@ func TestConfig_validate(t *testing.T) { }, }, Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ + ServiceMeshes: []*nameAndNamespace{ { Name: "istio-sidecar", Namespace: "istio-system", }, }, }, - Exporter: &base{ - Name: "default gRPC exporter", - Grpc: &endpoint{ + Exporter: &exporterConfig{ + Grpc: &server{ Port: 11111, }, }, @@ -338,15 +298,15 @@ func TestNew(t *testing.T) { }, }, Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ + ServiceMeshes: []*nameAndNamespace{ { Name: "istio-sidecar", Namespace: "istio-system", }, }, }, - Exporter: &base{ - Grpc: &endpoint{ + Exporter: &exporterConfig{ + Grpc: &server{ Port: 8080, }, }, @@ -378,15 +338,15 @@ func TestNew(t *testing.T) { }, }, Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ + ServiceMeshes: []*nameAndNamespace{ { Name: "istio-sidecar", Namespace: "istio-system", }, }, }, - Exporter: &base{ - Grpc: &endpoint{ + Exporter: &exporterConfig{ + Grpc: &server{ Port: 8080, }, }, @@ -409,15 +369,15 @@ func TestNew(t *testing.T) { }, }, Receivers: &receivers{ - ServiceMeshes: []*serviceMesh{ + ServiceMeshes: []*nameAndNamespace{ { Name: "istio-sidecar", Namespace: "istio-system", }, }, }, - Exporter: &base{ - Grpc: &endpoint{ + Exporter: &exporterConfig{ + Grpc: &server{ Port: 8080, }, }, diff --git a/sentryflow/pkg/core/sentryflow.go b/sentryflow/pkg/core/sentryflow.go index abe1db4..5aafd5e 100644 --- a/sentryflow/pkg/core/sentryflow.go +++ b/sentryflow/pkg/core/sentryflow.go @@ -12,6 +12,8 @@ import ( "google.golang.org/grpc" "istio.io/client-go/pkg/apis/extensions/v1alpha1" networkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -34,6 +36,20 @@ type Manager struct { ApiEvents chan *protobuf.APIEvent } +func (m *Manager) areK8sReceivers(cfg *config.Config) bool { + if len(cfg.Receivers.ServiceMeshes) > 0 { + return true + } + + for _, other := range cfg.Receivers.Others { + if other.Name == util.NginxIncorporationIngressController { + return true + } + } + + return false +} + func Run(ctx context.Context, configFilePath string, kubeConfig string) { mgr := &Manager{ Ctx: ctx, @@ -50,12 +66,14 @@ func Run(ctx context.Context, configFilePath string, kubeConfig string) { return } - k8sClient, err := k8s.NewClient(registerAndGetScheme(), kubeConfig) - if err != nil { - mgr.Logger.Errorf("failed to create k8s client: %v", err) - return + if mgr.areK8sReceivers(cfg) { + k8sClient, err := k8s.NewClient(registerAndGetScheme(), kubeConfig) + if err != nil { + mgr.Logger.Errorf("failed to create k8s client: %v", err) + return + } + mgr.K8sClient = k8sClient } - mgr.K8sClient = k8sClient mgr.Wg.Add(1) go func() { @@ -95,6 +113,8 @@ func Run(ctx context.Context, configFilePath string, kubeConfig string) { func registerAndGetScheme() *runtime.Scheme { scheme := runtime.NewScheme() utilruntime.Must(networkingv1alpha3.AddToScheme(scheme)) + utilruntime.Must(corev1.AddToScheme(scheme)) + utilruntime.Must(appsv1.AddToScheme(scheme)) utilruntime.Must(v1alpha1.AddToScheme(scheme)) return scheme } diff --git a/sentryflow/pkg/receiver/other/nginx/nginxinc/nginx.go b/sentryflow/pkg/receiver/other/nginx/nginxinc/nginx.go new file mode 100644 index 0000000..89eb5f4 --- /dev/null +++ b/sentryflow/pkg/receiver/other/nginx/nginxinc/nginx.go @@ -0,0 +1,161 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2024 Authors of SentryFlow + +package nginxinc + +import ( + "context" + "fmt" + "strings" + + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/5GSEC/SentryFlow/pkg/config" + "github.com/5GSEC/SentryFlow/pkg/util" +) + +func Start(ctx context.Context, cfg *config.Config, k8sClient client.Client) { + logger := util.LoggerFromCtx(ctx) + + logger.Info("Starting nginx-incorporation ingress controller receiver") + if err := validateResources(ctx, cfg, k8sClient); err != nil { + // Todo(@anurag-rajawat): Log docs link for reference on how to configure this receiver properly. + logger.Errorf("%v. Stopped nginx-incorporation ingress controller receiver", err) + return + } + logger.Info("Started nginx-incorporation ingress controller receiver") + + <-ctx.Done() + logger.Info("Shutting down nginx-incorporation ingress controller receiver") + logger.Info("Stopped nginx-incorporation ingress controller receiver") +} + +func validateResources(ctx context.Context, cfg *config.Config, k8sClient client.Client) error { + ingressDeployNamespace := getIngressControllerDeploymentNamespace(cfg) + sentryFlowNjsCm := &corev1.ConfigMap{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "ConfigMap", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: cfg.Filters.NginxIngress.SentryFlowNjsConfigMapName, + Namespace: ingressDeployNamespace, + }, + } + + if err := k8sClient.Get(ctx, client.ObjectKeyFromObject(sentryFlowNjsCm), sentryFlowNjsCm); err != nil { + return fmt.Errorf("failed to get sentryflow configmap: %w", err) + } + + if err := validateIngressDeployAndConfigMap(ctx, cfg, k8sClient, ingressDeployNamespace); err != nil { + return err + } + + return nil +} + +func validateIngressDeployAndConfigMap(ctx context.Context, cfg *config.Config, k8sClient client.Client, ingressNamespace string) error { + ingressDeploy := &appsv1.Deployment{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "apps/v1", + Kind: "Deployment", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: cfg.Filters.NginxIngress.DeploymentName, + Namespace: ingressNamespace, + }, + } + if err := k8sClient.Get(ctx, client.ObjectKeyFromObject(ingressDeploy), ingressDeploy); err != nil { + return fmt.Errorf("failed to get nginx-incorporation ingress controller deployment: %w", err) + } + + // Just check ingress controller deployment volume mount because if volume + // itself doesn't exist, the container will not start. + volumeMountFound := false + for _, container := range ingressDeploy.Spec.Template.Spec.Containers { + for _, volumeMount := range container.VolumeMounts { + // Volume-mount name could be different so only check mount-path. + if volumeMount.MountPath == "/etc/nginx/njs/sentryflow.js" { + volumeMountFound = true + } + } + } + if !volumeMountFound { + return fmt.Errorf("sentryflow-njs volume-mount not found") + } + + ingressCm := &corev1.ConfigMap{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "ConfigMap", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: cfg.Filters.NginxIngress.ConfigMapName, + Namespace: ingressNamespace, + }, + } + if err := k8sClient.Get(ctx, client.ObjectKeyFromObject(ingressCm), ingressCm); err != nil { + return fmt.Errorf("failed to get nginx-incorporation ingress controller configmap: %w", err) + } + + httpSnippets, exists := ingressCm.Data["http-snippets"] + if !exists { + return fmt.Errorf("sentryflow http-snippets not found in nginx-incorporation ingress configmap") + } + expectedHttpSnippets := `js_path "/etc/nginx/njs/"; +subrequest_output_buffer_size 8k; +js_shared_dict_zone zone=apievents:1M timeout=300s evict; +js_import main from sentryflow.js; +` + if !strings.Contains(httpSnippets, expectedHttpSnippets) { + return fmt.Errorf("sentryflow http-snippets were not properly configured in nginx-incorporation ingress configmap") + } + + locationSnippets, exists := ingressCm.Data["location-snippets"] + if !exists { + return fmt.Errorf("sentryflow location-snippets not found in nginx-incorporation ingress configmap") + } + expectedLocationSnippets := `js_body_filter main.requestHandler buffer_type=buffer; +mirror /mirror_request; +mirror_request_body on; +` + if !strings.Contains(locationSnippets, expectedLocationSnippets) { + return fmt.Errorf("sentryflow location-snippets were not properly configured in nginx-incorporation ingress configmap") + } + + serverSnippets, exists := ingressCm.Data["server-snippets"] + if !exists { + return fmt.Errorf("sentryflow server-snippets not found in nginx-incorporation ingress configmap") + } + expectedServerSnippets := `location /mirror_request { + internal; + js_content main.dispatchHttpCall; +} +location /sentryflow { + internal; + proxy_method POST; + proxy_set_header accept "application/json"; + proxy_set_header Content-Type "application/json"; +} +` + // The server snippet might have different SentryFlow URL in `proxy_pass` + // directive. To avoid potential conflicts, check without that directive. + if !strings.ContainsAny(serverSnippets, expectedServerSnippets) { + return fmt.Errorf("sentryflow server-snippets were not properly configured in nginx-incorporation ingress configmap") + } + + return nil +} + +func getIngressControllerDeploymentNamespace(cfg *config.Config) string { + for _, other := range cfg.Receivers.Others { + switch other.Name { + case util.NginxIncorporationIngressController: + return other.Namespace + } + } + return "" +} diff --git a/sentryflow/pkg/receiver/receiver.go b/sentryflow/pkg/receiver/receiver.go index 7de829b..e57f7a8 100644 --- a/sentryflow/pkg/receiver/receiver.go +++ b/sentryflow/pkg/receiver/receiver.go @@ -12,6 +12,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/5GSEC/SentryFlow/pkg/config" + "github.com/5GSEC/SentryFlow/pkg/receiver/other/nginx/nginxinc" istiosidecar "github.com/5GSEC/SentryFlow/pkg/receiver/svcmesh/istio/sidecar" "github.com/5GSEC/SentryFlow/pkg/util" protobuf "github.com/5GSEC/SentryFlow/protobuf/golang" @@ -21,7 +22,7 @@ import ( // starts monitoring from configured sources and supports adding other sources in // the future. func Init(ctx context.Context, k8sClient client.Client, cfg *config.Config, apiEvents chan *protobuf.APIEvent, server *grpc.Server, wg *sync.WaitGroup) error { - //logger := util.LoggerFromCtx(ctx).Named("receiver") + logger := util.LoggerFromCtx(ctx).Named("receiver") for _, serviceMesh := range cfg.Receivers.ServiceMeshes { if serviceMesh.Name != "" { @@ -38,12 +39,22 @@ func Init(ctx context.Context, k8sClient client.Client, cfg *config.Config, apiE } } - // Placeholder for other sources (To be implemented based on requirements) - // TODO: Implement initialization for other telemetry sources based on the - // `cfg.Others` configuration. - // This would involve handling gRPC or HTTP configs - // for each supported source type and potentially adding new subdirectories in - // `pkg/receiver/other` for each source. + for _, other := range cfg.Receivers.Others { + if other.Name != "" { + switch other.Name { + case util.NginxWebServer: + logger.Info("Started nginx webserver receiver") + case util.NginxIncorporationIngressController: + wg.Add(1) + go func() { + defer wg.Done() + nginxinc.Start(ctx, cfg, k8sClient) + }() + default: + return fmt.Errorf("unsupported receiver, %v", other.Name) + } + } + } return nil } diff --git a/sentryflow/pkg/util/util.go b/sentryflow/pkg/util/util.go index 50e838b..44e1c83 100644 --- a/sentryflow/pkg/util/util.go +++ b/sentryflow/pkg/util/util.go @@ -12,12 +12,14 @@ import ( type LoggerContextKey struct{} const ( - ServiceMeshIstioSidecar = "istio-sidecar" - ServiceMeshIstioAmbient = "istio-ambient" - ServiceMeshKong = "kong" - ServiceMeshConsul = "consul" - ServiceMeshLinkerd = "linkerd" - OpenTelemetry = "otel" + ServiceMeshIstioSidecar = "istio-sidecar" + ServiceMeshIstioAmbient = "istio-ambient" + ServiceMeshKong = "kong" + ServiceMeshConsul = "consul" + ServiceMeshLinkerd = "linkerd" + OpenTelemetry = "otel" + NginxWebServer = "nginx-webserver" + NginxIncorporationIngressController = "nginx-inc-ingress-controller" // https://github.com/nginxinc/kubernetes-ingress/ ) func LoggerFromCtx(ctx context.Context) *zap.SugaredLogger {