mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
refactor(gateway): update flow-logs fields in subject (#10939)
Resolves: #10928
This commit is contained in:
@@ -343,8 +343,8 @@ impl GatewayState {
|
||||
device_uuid: client.device_uuid,
|
||||
identifier_for_vendor: client.identifier_for_vendor,
|
||||
firebase_installation_id: client.firebase_installation_id,
|
||||
identity_id: subject.identity_id,
|
||||
identity_name: subject.identity_name,
|
||||
auth_provider_id: subject.auth_provider_id,
|
||||
actor_name: subject.actor_name,
|
||||
actor_id: subject.actor_id,
|
||||
actor_email: subject.actor_email,
|
||||
},
|
||||
@@ -498,8 +498,8 @@ impl GatewayState {
|
||||
device_identifier_for_vendor = flow.device_identifier_for_vendor.map(tracing::field::display),
|
||||
device_firebase_installation_id = flow.device_firebase_installation_id.map(tracing::field::display),
|
||||
|
||||
identity_id = flow.identity_id.map(tracing::field::display),
|
||||
identity_name = flow.identity_name.map(tracing::field::display),
|
||||
auth_provider_id = flow.auth_provider_id.map(tracing::field::display),
|
||||
actor_name = flow.actor_name.map(tracing::field::display),
|
||||
actor_id = flow.actor_id.map(tracing::field::display),
|
||||
actor_email = flow.actor_email.map(tracing::field::display),
|
||||
|
||||
@@ -542,8 +542,8 @@ impl GatewayState {
|
||||
device_identifier_for_vendor = flow.device_identifier_for_vendor.map(tracing::field::display),
|
||||
device_firebase_installation_id = flow.device_firebase_installation_id.map(tracing::field::display),
|
||||
|
||||
identity_id = flow.identity_id.map(tracing::field::display),
|
||||
identity_name = flow.identity_name.map(tracing::field::display),
|
||||
auth_provider_id = flow.auth_provider_id.map(tracing::field::display),
|
||||
actor_name = flow.actor_name.map(tracing::field::display),
|
||||
actor_id = flow.actor_id.map(tracing::field::display),
|
||||
actor_email = flow.actor_email.map(tracing::field::display),
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ pub struct ClientProperties {
|
||||
pub device_os_version: Option<String>,
|
||||
pub identifier_for_vendor: Option<String>,
|
||||
pub firebase_installation_id: Option<String>,
|
||||
pub identity_id: Option<String>,
|
||||
pub identity_name: Option<String>,
|
||||
pub auth_provider_id: Option<String>,
|
||||
pub actor_name: Option<String>,
|
||||
pub actor_id: Option<String>,
|
||||
pub actor_email: Option<String>,
|
||||
}
|
||||
@@ -234,8 +234,8 @@ impl FlowTracker {
|
||||
firebase_installation_id: client.firebase_installation_id,
|
||||
actor_id: client.actor_id,
|
||||
actor_email: client.actor_email,
|
||||
identity_id: client.identity_id,
|
||||
identity_name: client.identity_name,
|
||||
auth_provider_id: client.auth_provider_id,
|
||||
actor_name: client.actor_name,
|
||||
});
|
||||
}
|
||||
hash_map::Entry::Occupied(occupied) if occupied.get().context != context => {
|
||||
@@ -273,8 +273,8 @@ impl FlowTracker {
|
||||
firebase_installation_id: client.firebase_installation_id,
|
||||
actor_id: client.actor_id,
|
||||
actor_email: client.actor_email,
|
||||
identity_id: client.identity_id,
|
||||
identity_name: client.identity_name,
|
||||
auth_provider_id: client.auth_provider_id,
|
||||
actor_name: client.actor_name,
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -308,8 +308,8 @@ impl FlowTracker {
|
||||
firebase_installation_id: client.firebase_installation_id,
|
||||
actor_id: client.actor_id,
|
||||
actor_email: client.actor_email,
|
||||
identity_id: client.identity_id,
|
||||
identity_name: client.identity_name,
|
||||
auth_provider_id: client.auth_provider_id,
|
||||
actor_name: client.actor_name,
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -364,8 +364,8 @@ impl FlowTracker {
|
||||
firebase_installation_id: client.firebase_installation_id,
|
||||
actor_id: client.actor_id,
|
||||
actor_email: client.actor_email,
|
||||
identity_id: client.identity_id,
|
||||
identity_name: client.identity_name,
|
||||
auth_provider_id: client.auth_provider_id,
|
||||
actor_name: client.actor_name,
|
||||
});
|
||||
}
|
||||
hash_map::Entry::Occupied(occupied) if occupied.get().context != context => {
|
||||
@@ -401,8 +401,8 @@ impl FlowTracker {
|
||||
firebase_installation_id: client.firebase_installation_id,
|
||||
actor_id: client.actor_id,
|
||||
actor_email: client.actor_email,
|
||||
identity_id: client.identity_id,
|
||||
identity_name: client.identity_name,
|
||||
auth_provider_id: client.auth_provider_id,
|
||||
actor_name: client.actor_name,
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -538,8 +538,8 @@ pub struct CompletedTcpFlow {
|
||||
pub device_identifier_for_vendor: Option<String>,
|
||||
pub device_firebase_installation_id: Option<String>,
|
||||
|
||||
pub identity_id: Option<String>,
|
||||
pub identity_name: Option<String>,
|
||||
pub auth_provider_id: Option<String>,
|
||||
pub actor_name: Option<String>,
|
||||
pub actor_id: Option<String>,
|
||||
pub actor_email: Option<String>,
|
||||
|
||||
@@ -580,8 +580,8 @@ pub struct CompletedUdpFlow {
|
||||
pub device_identifier_for_vendor: Option<String>,
|
||||
pub device_firebase_installation_id: Option<String>,
|
||||
|
||||
pub identity_id: Option<String>,
|
||||
pub identity_name: Option<String>,
|
||||
pub auth_provider_id: Option<String>,
|
||||
pub actor_name: Option<String>,
|
||||
pub actor_id: Option<String>,
|
||||
pub actor_email: Option<String>,
|
||||
|
||||
@@ -623,8 +623,8 @@ impl CompletedTcpFlow {
|
||||
device_firebase_installation_id: value.firebase_installation_id,
|
||||
actor_id: value.actor_id,
|
||||
actor_email: value.actor_email,
|
||||
identity_id: value.identity_id,
|
||||
identity_name: value.identity_name,
|
||||
auth_provider_id: value.auth_provider_id,
|
||||
actor_name: value.actor_name,
|
||||
resource_id: key.resource,
|
||||
resource_name: value.resource_name,
|
||||
resource_address: value.resource_address,
|
||||
@@ -661,8 +661,8 @@ impl CompletedUdpFlow {
|
||||
device_firebase_installation_id: value.firebase_installation_id,
|
||||
actor_id: value.actor_id,
|
||||
actor_email: value.actor_email,
|
||||
identity_id: value.identity_id,
|
||||
identity_name: value.identity_name,
|
||||
auth_provider_id: value.auth_provider_id,
|
||||
actor_name: value.actor_name,
|
||||
resource_id: key.resource,
|
||||
resource_name: value.resource_name,
|
||||
resource_address: value.resource_address,
|
||||
@@ -726,8 +726,8 @@ struct TcpFlowValue {
|
||||
identifier_for_vendor: Option<String>,
|
||||
firebase_installation_id: Option<String>,
|
||||
|
||||
identity_id: Option<String>,
|
||||
identity_name: Option<String>,
|
||||
auth_provider_id: Option<String>,
|
||||
actor_name: Option<String>,
|
||||
actor_id: Option<String>,
|
||||
actor_email: Option<String>,
|
||||
|
||||
@@ -755,8 +755,8 @@ struct UdpFlowValue {
|
||||
identifier_for_vendor: Option<String>,
|
||||
firebase_installation_id: Option<String>,
|
||||
|
||||
identity_id: Option<String>,
|
||||
identity_name: Option<String>,
|
||||
auth_provider_id: Option<String>,
|
||||
actor_name: Option<String>,
|
||||
actor_id: Option<String>,
|
||||
actor_email: Option<String>,
|
||||
}
|
||||
@@ -863,8 +863,8 @@ pub mod inbound_wg {
|
||||
device_serial: props.device_serial,
|
||||
actor_id: props.actor_id,
|
||||
actor_email: props.actor_email,
|
||||
identity_id: props.identity_id,
|
||||
identity_name: props.identity_name,
|
||||
auth_provider_id: props.auth_provider_id,
|
||||
actor_name: props.actor_name,
|
||||
device_uuid: props.device_uuid,
|
||||
identifier_for_vendor: props.identifier_for_vendor,
|
||||
firebase_installation_id: props.firebase_installation_id,
|
||||
@@ -1021,8 +1021,8 @@ struct Client {
|
||||
identifier_for_vendor: Option<String>,
|
||||
firebase_installation_id: Option<String>,
|
||||
|
||||
identity_id: Option<String>,
|
||||
identity_name: Option<String>,
|
||||
auth_provider_id: Option<String>,
|
||||
actor_name: Option<String>,
|
||||
actor_id: Option<String>,
|
||||
actor_email: Option<String>,
|
||||
}
|
||||
|
||||
@@ -229,9 +229,9 @@ pub struct Client {
|
||||
#[derive(Debug, Deserialize, Clone, Default)]
|
||||
pub struct Subject {
|
||||
#[serde(default)]
|
||||
pub identity_id: Option<String>,
|
||||
pub auth_provider_id: Option<String>,
|
||||
#[serde(default)]
|
||||
pub identity_name: Option<String>,
|
||||
pub actor_name: Option<String>,
|
||||
#[serde(default)]
|
||||
pub actor_id: Option<String>,
|
||||
#[serde(default)]
|
||||
|
||||
@@ -874,9 +874,9 @@ impl TunnelTest {
|
||||
device_os_version: None,
|
||||
},
|
||||
Subject {
|
||||
identity_name: None,
|
||||
actor_name: None,
|
||||
actor_email: None,
|
||||
identity_id: None,
|
||||
auth_provider_id: None,
|
||||
actor_id: None,
|
||||
},
|
||||
client_ice.clone(),
|
||||
|
||||
Reference in New Issue
Block a user