#![allow(unused)]
//!
//! # Elastic Common Schema
//!
/// ECS version this event conforms to. `ecs.version` is a required field and must exist in all events.
/// When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events.
///
/// # Examples
///
/// - `1.0.0`
pub const ECS_VERSION: &str = "ecs.version";
/// The agent fields contain the data about the software entity, if any, that collects, detects, or observes events on a host, or takes measurements on a host.
/// Examples include Beats. Agents may also run on observers. ECS agent.* fields shall be populated with details of the agent running on the host or observer where the event happened or the measurement was taken.
pub mod agent {
/// Extended build information for the agent.
/// This field is intended to contain any build information that a data source may provide, no specific formatting is required.
///
/// # Examples
///
/// - `metricbeat version 7.6.0 (amd64), libbeat 7.6.0 [6a23e8f8f30f5001ba344e4e54d8d9cb82cb107c built 2020-02-05 23:10:10 +0000 UTC]`
pub const AGENT_BUILD_ORIGINAL: &str = "agent.build.original";
/// Ephemeral identifier of this agent (if one exists).
/// This id normally changes across restarts, but `agent.id` does not.
///
/// # Examples
///
/// - `8a4f500f`
pub const AGENT_EPHEMERAL_ID: &str = "agent.ephemeral_id";
/// Unique identifier of this agent (if one exists).
/// Example: For Beats this would be beat.id.
///
/// # Examples
///
/// - `8a4f500d`
pub const AGENT_ID: &str = "agent.id";
/// Custom name of the agent.
/// This is a name that can be given to an agent. This can be helpful if for example two Filebeat instances are running on the same host but a human readable separation is needed on which Filebeat instance data is coming from.
/// If no name is given, the name is often left empty.
///
/// # Examples
///
/// - `foo`
pub const AGENT_NAME: &str = "agent.name";
/// Type of the agent.
/// The agent type always stays the same and should be given by the agent used. In case of Filebeat the agent would always be Filebeat also if two Filebeat instances are run on the same machine.
///
/// # Examples
///
/// - `filebeat`
pub const AGENT_TYPE: &str = "agent.type";
/// Version of the agent.
///
/// # Examples
///
/// - `6.0.0-rc2`
pub const AGENT_VERSION: &str = "agent.version";
}
/// An autonomous system (AS) is a collection of connected Internet Protocol (IP) routing prefixes under the control of one or more network operators on behalf of a single administrative entity or domain that presents a common, clearly defined routing policy to the internet.
pub mod as_ {
/// Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
///
/// # Examples
///
/// - `15169`
pub const AS_NUMBER: &str = "as.number";
/// Organization name.
///
/// # Examples
///
/// - `Google LLC`
pub const AS_ORGANIZATION_NAME: &str = "as.organization.name";
}
/// The `base` field set contains all fields which are at the root of the events. These fields are common across all types of events.
pub mod base {
/// Date/time when the event originated.
/// This is the date/time extracted from the event, typically representing when the event was generated by the source.
/// If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline.
/// Required field for all events.
///
/// # Examples
///
/// - `2016-05-23T08:05:34.853Z`
pub const TIMESTAMP: &str = "@timestamp";
/// Custom key/value pairs.
/// Can be used to add meta information to events. Should not contain nested objects. All values are stored as keyword.
/// Example: `docker` and `k8s` labels.
///
/// # Examples
///
/// - `{"application": "foo-bar", "env": "production"}`
pub const LABELS: &str = "labels";
/// For log events the message field contains the log message, optimized for viewing in a log viewer.
/// For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event.
/// If multiple messages exist, they can be combined into one message.
///
/// # Examples
///
/// - `Hello World`
pub const MESSAGE: &str = "message";
/// List of keywords used to tag each event.
///
/// # Examples
///
/// - `["production", "env2"]`
pub const TAGS: &str = "tags";
}
/// A client is defined as the initiator of a network connection for events regarding sessions, connections, or bidirectional flow records.
/// For TCP events, the client is the initiator of the TCP connection that sends the SYN packet(s). For other protocols, the client is generally the initiator or requestor in the network transaction. Some systems use the term "originator" to refer the client in TCP connections. The client fields describe details about the system acting as the client in the network event. Client fields are usually populated in conjunction with server fields. Client fields are generally not populated for packet-level events.
/// Client / server representations can add semantic context to an exchange, which is helpful to visualize the data in certain situations. If your context falls in that category, you should still ensure that source and destination are filled appropriately.
pub mod client {
/// Some event client addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field.
/// Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
pub const CLIENT_ADDRESS: &str = "client.address";
/// Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
///
/// # Examples
///
/// - `15169`
pub const CLIENT_AS_NUMBER: &str = "client.as.number";
/// Organization name.
///
/// # Examples
///
/// - `Google LLC`
pub const CLIENT_AS_ORGANIZATION_NAME: &str = "client.as.organization.name";
/// Bytes sent from the client to the server.
///
/// # Examples
///
/// - `184`
pub const CLIENT_BYTES: &str = "client.bytes";
/// Client domain.
pub const CLIENT_DOMAIN: &str = "client.domain";
/// City name.
///
/// # Examples
///
/// - `Montreal`
pub const CLIENT_GEO_CITY_NAME: &str = "client.geo.city_name";
/// Two-letter code representing continent's name.
///
/// # Examples
///
/// - `NA`
pub const CLIENT_GEO_CONTINENT_CODE: &str = "client.geo.continent_code";
/// Name of the continent.
///
/// # Examples
///
/// - `North America`
pub const CLIENT_GEO_CONTINENT_NAME: &str = "client.geo.continent_name";
/// Country ISO code.
///
/// # Examples
///
/// - `CA`
pub const CLIENT_GEO_COUNTRY_ISO_CODE: &str = "client.geo.country_iso_code";
/// Country name.
///
/// # Examples
///
/// - `Canada`
pub const CLIENT_GEO_COUNTRY_NAME: &str = "client.geo.country_name";
/// Longitude and latitude.
///
/// # Examples
///
/// - `{ "lon": -73.614830, "lat": 45.505918 }`
pub const CLIENT_GEO_LOCATION: &str = "client.geo.location";
/// User-defined description of a location, at the level of granularity they care about.
/// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
/// Not typically used in automated geolocation.
///
/// # Examples
///
/// - `boston-dc`
pub const CLIENT_GEO_NAME: &str = "client.geo.name";
/// Postal code associated with the location.
/// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
///
/// # Examples
///
/// - `94040`
pub const CLIENT_GEO_POSTAL_CODE: &str = "client.geo.postal_code";
/// Region ISO code.
///
/// # Examples
///
/// - `CA-QC`
pub const CLIENT_GEO_REGION_ISO_CODE: &str = "client.geo.region_iso_code";
/// Region name.
///
/// # Examples
///
/// - `Quebec`
pub const CLIENT_GEO_REGION_NAME: &str = "client.geo.region_name";
/// The time zone of the location, such as IANA time zone name.
///
/// # Examples
///
/// - `America/Argentina/Buenos_Aires`
pub const CLIENT_GEO_TIMEZONE: &str = "client.geo.timezone";
/// IP address of the client (IPv4 or IPv6).
pub const CLIENT_IP: &str = "client.ip";
/// MAC address of the client.
/// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
///
/// # Examples
///
/// - `00-00-5E-00-53-23`
pub const CLIENT_MAC: &str = "client.mac";
/// Translated IP of source based NAT sessions (e.g. internal client to internet).
/// Typically connections traversing load balancers, firewalls, or routers.
pub const CLIENT_NAT_IP: &str = "client.nat.ip";
/// Translated port of source based NAT sessions (e.g. internal client to internet).
/// Typically connections traversing load balancers, firewalls, or routers.
pub const CLIENT_NAT_PORT: &str = "client.nat.port";
/// Packets sent from the client to the server.
///
/// # Examples
///
/// - `12`
pub const CLIENT_PACKETS: &str = "client.packets";
/// Port of the client.
pub const CLIENT_PORT: &str = "client.port";
/// The highest registered client domain, stripped of the subdomain.
/// For example, the registered domain for "foo.example.com" is "example.com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
///
/// # Examples
///
/// - `example.com`
pub const CLIENT_REGISTERED_DOMAIN: &str = "client.registered_domain";
/// The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
/// For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
///
/// # Examples
///
/// - `east`
pub const CLIENT_SUBDOMAIN: &str = "client.subdomain";
/// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
///
/// # Examples
///
/// - `co.uk`
pub const CLIENT_TOP_LEVEL_DOMAIN: &str = "client.top_level_domain";
/// Name of the directory the user is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const CLIENT_USER_DOMAIN: &str = "client.user.domain";
/// User email address.
pub const CLIENT_USER_EMAIL: &str = "client.user.email";
/// User's full name, if available.
///
/// # Examples
///
/// - `Albert Einstein`
pub const CLIENT_USER_FULL_NAME: &str = "client.user.full_name";
/// Name of the directory the group is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const CLIENT_USER_GROUP_DOMAIN: &str = "client.user.group.domain";
/// Unique identifier for the group on the system/platform.
pub const CLIENT_USER_GROUP_ID: &str = "client.user.group.id";
/// Name of the group.
pub const CLIENT_USER_GROUP_NAME: &str = "client.user.group.name";
/// Unique user hash to correlate information for a user in anonymized form.
/// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
pub const CLIENT_USER_HASH: &str = "client.user.hash";
/// Unique identifier of the user.
pub const CLIENT_USER_ID: &str = "client.user.id";
/// Short name or login of the user.
///
/// # Examples
///
/// - `albert`
pub const CLIENT_USER_NAME: &str = "client.user.name";
/// Array of user roles at the time of the event.
///
/// # Examples
///
/// - `["kibana_admin", "reporting_user"]`
pub const CLIENT_USER_ROLES: &str = "client.user.roles";
}
/// Fields related to the cloud or infrastructure the events are coming from.
pub mod cloud {
/// The cloud account or organization id used to identify different entities in a multi-tenant environment.
/// Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.
///
/// # Examples
///
/// - `666777888999`
pub const CLOUD_ACCOUNT_ID: &str = "cloud.account.id";
/// The cloud account name or alias used to identify different entities in a multi-tenant environment.
/// Examples: AWS account name, Google Cloud ORG display name.
///
/// # Examples
///
/// - `elastic-dev`
pub const CLOUD_ACCOUNT_NAME: &str = "cloud.account.name";
/// Availability zone in which this host is running.
///
/// # Examples
///
/// - `us-east-1c`
pub const CLOUD_AVAILABILITY_ZONE: &str = "cloud.availability_zone";
/// Instance ID of the host machine.
///
/// # Examples
///
/// - `i-1234567890abcdef0`
pub const CLOUD_INSTANCE_ID: &str = "cloud.instance.id";
/// Instance name of the host machine.
pub const CLOUD_INSTANCE_NAME: &str = "cloud.instance.name";
/// Machine type of the host machine.
///
/// # Examples
///
/// - `t2.medium`
pub const CLOUD_MACHINE_TYPE: &str = "cloud.machine.type";
/// The cloud project identifier.
/// Examples: Google Cloud Project id, Azure Project id.
///
/// # Examples
///
/// - `my-project`
pub const CLOUD_PROJECT_ID: &str = "cloud.project.id";
/// The cloud project name.
/// Examples: Google Cloud Project name, Azure Project name.
///
/// # Examples
///
/// - `my project`
pub const CLOUD_PROJECT_NAME: &str = "cloud.project.name";
/// Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.
///
/// # Examples
///
/// - `aws`
pub const CLOUD_PROVIDER: &str = "cloud.provider";
/// Region in which this host is running.
///
/// # Examples
///
/// - `us-east-1`
pub const CLOUD_REGION: &str = "cloud.region";
/// The cloud service name is intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server.
/// Examples: app engine, app service, cloud run, fargate, lambda.
///
/// # Examples
///
/// - `lambda`
pub const CLOUD_SERVICE_NAME: &str = "cloud.service.name";
}
/// These fields contain information about binary code signatures.
pub mod code_signature {
/// Boolean to capture if a signature is present.
///
/// # Examples
///
/// - `true`
pub const CODE_SIGNATURE_EXISTS: &str = "code_signature.exists";
/// The identifier used to sign the process.
/// This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
///
/// # Examples
///
/// - `com.apple.xpc.proxy`
pub const CODE_SIGNATURE_SIGNING_ID: &str = "code_signature.signing_id";
/// Additional information about the certificate status.
/// This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
///
/// # Examples
///
/// - `ERROR_UNTRUSTED_ROOT`
pub const CODE_SIGNATURE_STATUS: &str = "code_signature.status";
/// Subject name of the code signer
///
/// # Examples
///
/// - `Microsoft Corporation`
pub const CODE_SIGNATURE_SUBJECT_NAME: &str = "code_signature.subject_name";
/// The team identifier used to sign the process.
/// This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
///
/// # Examples
///
/// - `EQHXZ8M8AV`
pub const CODE_SIGNATURE_TEAM_ID: &str = "code_signature.team_id";
/// Stores the trust status of the certificate chain.
/// Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
///
/// # Examples
///
/// - `true`
pub const CODE_SIGNATURE_TRUSTED: &str = "code_signature.trusted";
/// Boolean to capture if the digital signature is verified against the binary content.
/// Leave unpopulated if a certificate was unchecked.
///
/// # Examples
///
/// - `true`
pub const CODE_SIGNATURE_VALID: &str = "code_signature.valid";
}
/// Container fields are used for meta information about the specific container that is the source of information.
/// These fields help correlate data based containers from any runtime.
pub mod container {
/// Unique container id.
pub const CONTAINER_ID: &str = "container.id";
/// Name of the image the container was built on.
pub const CONTAINER_IMAGE_NAME: &str = "container.image.name";
/// Container image tags.
pub const CONTAINER_IMAGE_TAG: &str = "container.image.tag";
/// Image labels.
pub const CONTAINER_LABELS: &str = "container.labels";
/// Container name.
pub const CONTAINER_NAME: &str = "container.name";
/// Runtime managing this container.
///
/// # Examples
///
/// - `docker`
pub const CONTAINER_RUNTIME: &str = "container.runtime";
}
/// The data_stream fields take part in defining the new data stream naming scheme.
/// In the new data stream naming scheme the value of the data stream fields combine to the name of the actual data stream in the following manner: `{data_stream.type}-{data_stream.dataset}-{data_stream.namespace}`. This means the fields can only contain characters that are valid as part of names of data streams. More details about this can be found in this https://www.elastic.co/blog/an-introduction-to-the-elastic-data-stream-naming-scheme[blog post].
/// An Elasticsearch data stream consists of one or more backing indices, and a data stream name forms part of the backing indices names. Due to this convention, data streams must also follow index naming restrictions. For example, data stream names cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#`. Please see the Elasticsearch reference for additional https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params[restrictions].
pub mod data_stream {
/// The field can contain anything that makes sense to signify the source of the data.
/// Examples include `nginx.access`, `prometheus`, `endpoint` etc. For data streams that otherwise fit, but that do not have dataset set we use the value "generic" for the dataset value. `event.dataset` should have the same value as `data_stream.dataset`.
/// Beyond the Elasticsearch data stream naming criteria noted above, the `dataset` value has additional restrictions:
/// * Must not contain `-`
/// * No longer than 100 characters
///
/// # Examples
///
/// - `nginx.access`
pub const DATA_STREAM_DATASET: &str = "data_stream.dataset";
/// A user defined namespace. Namespaces are useful to allow grouping of data.
/// Many users already organize their indices this way, and the data stream naming scheme now provides this best practice as a default. Many users will populate this field with `default`. If no value is used, it falls back to `default`.
/// Beyond the Elasticsearch index naming criteria noted above, `namespace` value has the additional restrictions:
/// * Must not contain `-`
/// * No longer than 100 characters
///
/// # Examples
///
/// - `production`
pub const DATA_STREAM_NAMESPACE: &str = "data_stream.namespace";
/// An overarching type for the data stream.
/// Currently allowed values are "logs" and "metrics". We expect to also add "traces" and "synthetics" in the near future.
///
/// # Examples
///
/// - `logs`
pub const DATA_STREAM_TYPE: &str = "data_stream.type";
}
/// Destination fields capture details about the receiver of a network exchange/packet. These fields are populated from a network event, packet, or other event containing details of a network transaction.
/// Destination fields are usually populated in conjunction with source fields. The source and destination fields are considered the baseline and should always be filled if an event contains source and destination details from a network transaction. If the event also contains identification of the client and server roles, then the client and server fields should also be populated.
pub mod destination {
/// Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field.
/// Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
pub const DESTINATION_ADDRESS: &str = "destination.address";
/// Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
///
/// # Examples
///
/// - `15169`
pub const DESTINATION_AS_NUMBER: &str = "destination.as.number";
/// Organization name.
///
/// # Examples
///
/// - `Google LLC`
pub const DESTINATION_AS_ORGANIZATION_NAME: &str = "destination.as.organization.name";
/// Bytes sent from the destination to the source.
///
/// # Examples
///
/// - `184`
pub const DESTINATION_BYTES: &str = "destination.bytes";
/// Destination domain.
pub const DESTINATION_DOMAIN: &str = "destination.domain";
/// City name.
///
/// # Examples
///
/// - `Montreal`
pub const DESTINATION_GEO_CITY_NAME: &str = "destination.geo.city_name";
/// Two-letter code representing continent's name.
///
/// # Examples
///
/// - `NA`
pub const DESTINATION_GEO_CONTINENT_CODE: &str = "destination.geo.continent_code";
/// Name of the continent.
///
/// # Examples
///
/// - `North America`
pub const DESTINATION_GEO_CONTINENT_NAME: &str = "destination.geo.continent_name";
/// Country ISO code.
///
/// # Examples
///
/// - `CA`
pub const DESTINATION_GEO_COUNTRY_ISO_CODE: &str = "destination.geo.country_iso_code";
/// Country name.
///
/// # Examples
///
/// - `Canada`
pub const DESTINATION_GEO_COUNTRY_NAME: &str = "destination.geo.country_name";
/// Longitude and latitude.
///
/// # Examples
///
/// - `{ "lon": -73.614830, "lat": 45.505918 }`
pub const DESTINATION_GEO_LOCATION: &str = "destination.geo.location";
/// User-defined description of a location, at the level of granularity they care about.
/// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
/// Not typically used in automated geolocation.
///
/// # Examples
///
/// - `boston-dc`
pub const DESTINATION_GEO_NAME: &str = "destination.geo.name";
/// Postal code associated with the location.
/// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
///
/// # Examples
///
/// - `94040`
pub const DESTINATION_GEO_POSTAL_CODE: &str = "destination.geo.postal_code";
/// Region ISO code.
///
/// # Examples
///
/// - `CA-QC`
pub const DESTINATION_GEO_REGION_ISO_CODE: &str = "destination.geo.region_iso_code";
/// Region name.
///
/// # Examples
///
/// - `Quebec`
pub const DESTINATION_GEO_REGION_NAME: &str = "destination.geo.region_name";
/// The time zone of the location, such as IANA time zone name.
///
/// # Examples
///
/// - `America/Argentina/Buenos_Aires`
pub const DESTINATION_GEO_TIMEZONE: &str = "destination.geo.timezone";
/// IP address of the destination (IPv4 or IPv6).
pub const DESTINATION_IP: &str = "destination.ip";
/// MAC address of the destination.
/// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
///
/// # Examples
///
/// - `00-00-5E-00-53-23`
pub const DESTINATION_MAC: &str = "destination.mac";
/// Translated ip of destination based NAT sessions (e.g. internet to private DMZ)
/// Typically used with load balancers, firewalls, or routers.
pub const DESTINATION_NAT_IP: &str = "destination.nat.ip";
/// Port the source session is translated to by NAT Device.
/// Typically used with load balancers, firewalls, or routers.
pub const DESTINATION_NAT_PORT: &str = "destination.nat.port";
/// Packets sent from the destination to the source.
///
/// # Examples
///
/// - `12`
pub const DESTINATION_PACKETS: &str = "destination.packets";
/// Port of the destination.
pub const DESTINATION_PORT: &str = "destination.port";
/// The highest registered destination domain, stripped of the subdomain.
/// For example, the registered domain for "foo.example.com" is "example.com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
///
/// # Examples
///
/// - `example.com`
pub const DESTINATION_REGISTERED_DOMAIN: &str = "destination.registered_domain";
/// The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
/// For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
///
/// # Examples
///
/// - `east`
pub const DESTINATION_SUBDOMAIN: &str = "destination.subdomain";
/// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
///
/// # Examples
///
/// - `co.uk`
pub const DESTINATION_TOP_LEVEL_DOMAIN: &str = "destination.top_level_domain";
/// Name of the directory the user is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const DESTINATION_USER_DOMAIN: &str = "destination.user.domain";
/// User email address.
pub const DESTINATION_USER_EMAIL: &str = "destination.user.email";
/// User's full name, if available.
///
/// # Examples
///
/// - `Albert Einstein`
pub const DESTINATION_USER_FULL_NAME: &str = "destination.user.full_name";
/// Name of the directory the group is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const DESTINATION_USER_GROUP_DOMAIN: &str = "destination.user.group.domain";
/// Unique identifier for the group on the system/platform.
pub const DESTINATION_USER_GROUP_ID: &str = "destination.user.group.id";
/// Name of the group.
pub const DESTINATION_USER_GROUP_NAME: &str = "destination.user.group.name";
/// Unique user hash to correlate information for a user in anonymized form.
/// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
pub const DESTINATION_USER_HASH: &str = "destination.user.hash";
/// Unique identifier of the user.
pub const DESTINATION_USER_ID: &str = "destination.user.id";
/// Short name or login of the user.
///
/// # Examples
///
/// - `albert`
pub const DESTINATION_USER_NAME: &str = "destination.user.name";
/// Array of user roles at the time of the event.
///
/// # Examples
///
/// - `["kibana_admin", "reporting_user"]`
pub const DESTINATION_USER_ROLES: &str = "destination.user.roles";
}
/// These fields contain information about code libraries dynamically loaded into processes.
///
/// Many operating systems refer to "shared code libraries" with different names, but this field set refers to all of the following:
/// * Dynamic-link library (`.dll`) commonly used on Windows
/// * Shared Object (`.so`) commonly used on Unix-like operating systems
/// * Dynamic library (`.dylib`) commonly used on macOS
pub mod dll {
/// Boolean to capture if a signature is present.
///
/// # Examples
///
/// - `true`
pub const DLL_CODE_SIGNATURE_EXISTS: &str = "dll.code_signature.exists";
/// The identifier used to sign the process.
/// This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
///
/// # Examples
///
/// - `com.apple.xpc.proxy`
pub const DLL_CODE_SIGNATURE_SIGNING_ID: &str = "dll.code_signature.signing_id";
/// Additional information about the certificate status.
/// This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
///
/// # Examples
///
/// - `ERROR_UNTRUSTED_ROOT`
pub const DLL_CODE_SIGNATURE_STATUS: &str = "dll.code_signature.status";
/// Subject name of the code signer
///
/// # Examples
///
/// - `Microsoft Corporation`
pub const DLL_CODE_SIGNATURE_SUBJECT_NAME: &str = "dll.code_signature.subject_name";
/// The team identifier used to sign the process.
/// This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
///
/// # Examples
///
/// - `EQHXZ8M8AV`
pub const DLL_CODE_SIGNATURE_TEAM_ID: &str = "dll.code_signature.team_id";
/// Stores the trust status of the certificate chain.
/// Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
///
/// # Examples
///
/// - `true`
pub const DLL_CODE_SIGNATURE_TRUSTED: &str = "dll.code_signature.trusted";
/// Boolean to capture if the digital signature is verified against the binary content.
/// Leave unpopulated if a certificate was unchecked.
///
/// # Examples
///
/// - `true`
pub const DLL_CODE_SIGNATURE_VALID: &str = "dll.code_signature.valid";
/// MD5 hash.
pub const DLL_HASH_MD5: &str = "dll.hash.md5";
/// SHA1 hash.
pub const DLL_HASH_SHA1: &str = "dll.hash.sha1";
/// SHA256 hash.
pub const DLL_HASH_SHA256: &str = "dll.hash.sha256";
/// SHA512 hash.
pub const DLL_HASH_SHA512: &str = "dll.hash.sha512";
/// SSDEEP hash.
pub const DLL_HASH_SSDEEP: &str = "dll.hash.ssdeep";
/// Name of the library.
/// This generally maps to the name of the file on disk.
///
/// # Examples
///
/// - `kernel32.dll`
pub const DLL_NAME: &str = "dll.name";
/// Full file path of the library.
///
/// # Examples
///
/// - `C:\Windows\System32\kernel32.dll`
pub const DLL_PATH: &str = "dll.path";
/// CPU architecture target for the file.
///
/// # Examples
///
/// - `x64`
pub const DLL_PE_ARCHITECTURE: &str = "dll.pe.architecture";
/// Internal company name of the file, provided at compile-time.
///
/// # Examples
///
/// - `Microsoft Corporation`
pub const DLL_PE_COMPANY: &str = "dll.pe.company";
/// Internal description of the file, provided at compile-time.
///
/// # Examples
///
/// - `Paint`
pub const DLL_PE_DESCRIPTION: &str = "dll.pe.description";
/// Internal version of the file, provided at compile-time.
///
/// # Examples
///
/// - `6.3.9600.17415`
pub const DLL_PE_FILE_VERSION: &str = "dll.pe.file_version";
/// A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
/// Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
///
/// # Examples
///
/// - `0c6803c4e922103c4dca5963aad36ddf`
pub const DLL_PE_IMPHASH: &str = "dll.pe.imphash";
/// Internal name of the file, provided at compile-time.
///
/// # Examples
///
/// - `MSPAINT.EXE`
pub const DLL_PE_ORIGINAL_FILE_NAME: &str = "dll.pe.original_file_name";
/// Internal product name of the file, provided at compile-time.
///
/// # Examples
///
/// - `Microsoft® Windows® Operating System`
pub const DLL_PE_PRODUCT: &str = "dll.pe.product";
}
/// Fields describing DNS queries and answers.
/// DNS events should either represent a single DNS query prior to getting answers (`dns.type:query`) or they should represent a full exchange and contain the query details as well as all of the answers that were provided for this query (`dns.type:answer`).
pub mod dns {
/// An array containing an object for each answer section returned by the server.
/// The main keys that should be present in these objects are defined by ECS. Records that have more information may contain more keys than what ECS defines.
/// Not all DNS data sources give all details about DNS answers. At minimum, answer objects must contain the `data` key. If more information is available, map as much of it to ECS as possible, and add any additional fields to the answer objects as custom fields.
pub const DNS_ANSWERS: &str = "dns.answers";
/// The class of DNS data contained in this resource record.
///
/// # Examples
///
/// - `IN`
pub const DNS_ANSWERS_CLASS: &str = "dns.answers.class";
/// The data describing the resource.
/// The meaning of this data depends on the type and class of the resource record.
///
/// # Examples
///
/// - `10.10.10.10`
pub const DNS_ANSWERS_DATA: &str = "dns.answers.data";
/// The domain name to which this resource record pertains.
/// If a chain of CNAME is being resolved, each answer's `name` should be the one that corresponds with the answer's `data`. It should not simply be the original `question.name` repeated.
///
/// # Examples
///
/// - `www.example.com`
pub const DNS_ANSWERS_NAME: &str = "dns.answers.name";
/// The time interval in seconds that this resource record may be cached before it should be discarded. Zero values mean that the data should not be cached.
///
/// # Examples
///
/// - `180`
pub const DNS_ANSWERS_TTL: &str = "dns.answers.ttl";
/// The type of data contained in this resource record.
///
/// # Examples
///
/// - `CNAME`
pub const DNS_ANSWERS_TYPE: &str = "dns.answers.type";
/// Array of 2 letter DNS header flags.
/// Expected values are: AA, TC, RD, RA, AD, CD, DO.
///
/// # Examples
///
/// - `["RD", "RA"]`
pub const DNS_HEADER_FLAGS: &str = "dns.header_flags";
/// The DNS packet identifier assigned by the program that generated the query. The identifier is copied to the response.
///
/// # Examples
///
/// - `62111`
pub const DNS_ID: &str = "dns.id";
/// The DNS operation code that specifies the kind of query in the message. This value is set by the originator of a query and copied into the response.
///
/// # Examples
///
/// - `QUERY`
pub const DNS_OP_CODE: &str = "dns.op_code";
/// The class of records being queried.
///
/// # Examples
///
/// - `IN`
pub const DNS_QUESTION_CLASS: &str = "dns.question.class";
/// The name being queried.
/// If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n respectively.
///
/// # Examples
///
/// - `www.example.com`
pub const DNS_QUESTION_NAME: &str = "dns.question.name";
/// The highest registered domain, stripped of the subdomain.
/// For example, the registered domain for "foo.example.com" is "example.com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
///
/// # Examples
///
/// - `example.com`
pub const DNS_QUESTION_REGISTERED_DOMAIN: &str = "dns.question.registered_domain";
/// The subdomain is all of the labels under the registered_domain.
/// If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
///
/// # Examples
///
/// - `www`
pub const DNS_QUESTION_SUBDOMAIN: &str = "dns.question.subdomain";
/// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
///
/// # Examples
///
/// - `co.uk`
pub const DNS_QUESTION_TOP_LEVEL_DOMAIN: &str = "dns.question.top_level_domain";
/// The type of record being queried.
///
/// # Examples
///
/// - `AAAA`
pub const DNS_QUESTION_TYPE: &str = "dns.question.type";
/// Array containing all IPs seen in `answers.data`.
/// The `answers` array can be difficult to use, because of the variety of data formats it can contain. Extracting all IP addresses seen in there to `dns.resolved_ip` makes it possible to index them as IP addresses, and makes them easier to visualize and query for.
///
/// # Examples
///
/// - `["10.10.10.10", "10.10.10.11"]`
pub const DNS_RESOLVED_IP: &str = "dns.resolved_ip";
/// The DNS response code.
///
/// # Examples
///
/// - `NOERROR`
pub const DNS_RESPONSE_CODE: &str = "dns.response_code";
/// The type of DNS event captured, query or answer.
/// If your source of DNS events only gives you DNS queries, you should only create dns events of type `dns.type:query`.
/// If your source of DNS events gives you answers as well, you should create one event per query (optionally as soon as the query is seen). And a second event containing all query details as well as an array of answers.
///
/// # Examples
///
/// - `answer`
pub const DNS_TYPE: &str = "dns.type";
}
/// These fields can represent errors of any kind.
/// Use them for errors that happen while fetching events or in cases where the event itself contains an error.
pub mod error {
/// Error code describing the error.
pub const ERROR_CODE: &str = "error.code";
/// Unique identifier for the error.
pub const ERROR_ID: &str = "error.id";
/// Error message.
pub const ERROR_MESSAGE: &str = "error.message";
/// The stack trace of this error in plain text.
pub const ERROR_STACK_TRACE: &str = "error.stack_trace";
/// The type of the error, for example the class name of the exception.
///
/// # Examples
///
/// - `java.lang.NullPointerException`
pub const ERROR_TYPE: &str = "error.type";
}
/// The event fields are used for context information about the log or metric event itself.
/// A log is defined as an event containing details of something that happened. Log events must include the time at which the thing happened. Examples of log events include a process starting on a host, a network packet being sent from a source to a destination, or a network connection between a client and a server being initiated or closed. A metric is defined as an event containing one or more numerical measurements and the time at which the measurement was taken. Examples of metric events include memory pressure measured on a host and device temperature. See the `event.kind` definition in this section for additional details about metric and state events.
pub mod event {
/// The action captured by the event.
/// This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer.
///
/// # Examples
///
/// - `user-password-change`
pub const EVENT_ACTION: &str = "event.action";
/// This is one of four ECS Categorization Fields, and indicates the second level in the ECS category hierarchy.
/// `event.category` represents the "big buckets" of ECS categories. For example, filtering on `event.category:process` yields all events relating to process activity. This field is closely related to `event.type`, which is used as a subcategory.
/// This field is an array. This will allow proper categorization of some events that fall in multiple categories.
///
/// # Examples
///
/// - `authentication`
pub const EVENT_CATEGORY: &str = "event.category";
/// Identification code for this event, if one exists.
/// Some event sources use event codes to identify messages unambiguously, regardless of message language or wording adjustments over time. An example of this is the Windows Event ID.
///
/// # Examples
///
/// - `4648`
pub const EVENT_CODE: &str = "event.code";
/// event.created contains the date/time when the event was first read by an agent, or by your pipeline.
/// This field is distinct from @timestamp in that @timestamp typically contain the time extracted from the original event.
/// In most situations, these two timestamps will be slightly different. The difference can be used to calculate the delay between your source generating an event, and the time when your agent first processed it. This can be used to monitor your agent's or pipeline's ability to keep up with your event source.
/// In case the two timestamps are identical, @timestamp should be used.
///
/// # Examples
///
/// - `2016-05-23T08:05:34.857Z`
pub const EVENT_CREATED: &str = "event.created";
/// Name of the dataset.
/// If an event source publishes more than one type of log or events (e.g. access log, error log), the dataset is used to specify which one the event comes from.
/// It's recommended but not required to start the dataset name with the module name, followed by a dot, then the dataset name.
///
/// # Examples
///
/// - `apache.access`
pub const EVENT_DATASET: &str = "event.dataset";
/// Duration of the event in nanoseconds.
/// If event.start and event.end are known this value should be the difference between the end and start time.
pub const EVENT_DURATION: &str = "event.duration";
/// event.end contains the date when the event ended or when the activity was last observed.
pub const EVENT_END: &str = "event.end";
/// Hash (perhaps logstash fingerprint) of raw field to be able to demonstrate log integrity.
///
/// # Examples
///
/// - `123456789012345678901234567890ABCD`
pub const EVENT_HASH: &str = "event.hash";
/// Unique ID to describe the event.
///
/// # Examples
///
/// - `8a4f500d`
pub const EVENT_ID: &str = "event.id";
/// Timestamp when an event arrived in the central data store.
/// This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event.
/// In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` < `event.created` < `event.ingested`.
///
/// # Examples
///
/// - `2016-05-23T08:05:35.101Z`
pub const EVENT_INGESTED: &str = "event.ingested";
/// This is one of four ECS Categorization Fields, and indicates the highest level in the ECS category hierarchy.
/// `event.kind` gives high-level information about what type of information the event contains, without being specific to the contents of the event. For example, values of this field distinguish alert events from metric events.
/// The value of this field can be used to inform how these kinds of events should be handled. They may warrant different retention, different access control, it may also help understand whether the data coming in at a regular interval or not.
///
/// # Examples
///
/// - `alert`
pub const EVENT_KIND: &str = "event.kind";
/// Name of the module this data is coming from.
/// If your monitoring agent supports the concept of modules or plugins to process events of a given source (e.g. Apache logs), `event.module` should contain the name of this module.
///
/// # Examples
///
/// - `apache`
pub const EVENT_MODULE: &str = "event.module";
/// Raw text message of entire event. Used to demonstrate log integrity.
/// This field is not indexed and doc_values are disabled. It cannot be searched, but it can be retrieved from `_source`. If users wish to override this and index this field, consider using the wildcard data type.
///
/// # Examples
///
/// - `Sep 19 08:26:10 host CEF:0|Security| threatmanager|1.0|100| worm successfully stopped|10|src=10.0.0.1 dst=2.1.2.2spt=1232`
pub const EVENT_ORIGINAL: &str = "event.original";
/// This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy.
/// `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event.
/// Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective.
/// Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer.
/// Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense.
///
/// # Examples
///
/// - `success`
pub const EVENT_OUTCOME: &str = "event.outcome";
/// Source of the event.
/// Event transports such as Syslog or the Windows Event Log typically mention the source of an event. It can be the name of the software that generated the event (e.g. Sysmon, httpd), or of a subsystem of the operating system (kernel, Microsoft-Windows-Security-Auditing).
///
/// # Examples
///
/// - `kernel`
pub const EVENT_PROVIDER: &str = "event.provider";
/// Reason why this event happened, according to the source.
/// This describes the why of a particular action or outcome captured in the event. Where `event.action` captures the action from the event, `event.reason` describes why that action was taken. For example, a web proxy with an `event.action` which denied the request may also populate `event.reason` with the reason why (e.g. `blocked site`).
///
/// # Examples
///
/// - `Terminated an unexpected process`
pub const EVENT_REASON: &str = "event.reason";
/// Reference URL linking to additional information about this event.
/// This URL links to a static definition of this event. Alert events, indicated by `event.kind:alert`, are a common use case for this field.
///
/// # Examples
///
/// - `https://system.example.com/event/#0001234`
pub const EVENT_REFERENCE: &str = "event.reference";
/// Risk score or priority of the event (e.g. security solutions). Use your system's original value here.
pub const EVENT_RISK_SCORE: &str = "event.risk_score";
/// Normalized risk score or priority of the event, on a scale of 0 to 100.
/// This is mainly useful if you use more than one system that assigns risk scores, and you want to see a normalized value across all systems.
pub const EVENT_RISK_SCORE_NORM: &str = "event.risk_score_norm";
/// Sequence number of the event.
/// The sequence number is a value published by some event sources, to make the exact ordering of events unambiguous, regardless of the timestamp precision.
pub const EVENT_SEQUENCE: &str = "event.sequence";
/// The numeric severity of the event according to your event source.
/// What the different severity values mean can be different between sources and use cases. It's up to the implementer to make sure severities are consistent across events from the same source.
/// The Syslog severity belongs in `log.syslog.severity.code`. `event.severity` is meant to represent the severity according to the event source (e.g. firewall, IDS). If the event source does not publish its own severity, you may optionally copy the `log.syslog.severity.code` to `event.severity`.
///
/// # Examples
///
/// - `7`
pub const EVENT_SEVERITY: &str = "event.severity";
/// event.start contains the date when the event started or when the activity was first observed.
pub const EVENT_START: &str = "event.start";
/// This field should be populated when the event's timestamp does not include timezone information already (e.g. default Syslog timestamps). It's optional otherwise.
/// Acceptable timezone formats are: a canonical ID (e.g. "Europe/Amsterdam"), abbreviated (e.g. "EST") or an HH:mm differential (e.g. "-05:00").
pub const EVENT_TIMEZONE: &str = "event.timezone";
/// This is one of four ECS Categorization Fields, and indicates the third level in the ECS category hierarchy.
/// `event.type` represents a categorization "sub-bucket" that, when used along with the `event.category` field values, enables filtering events down to a level appropriate for single visualization.
/// This field is an array. This will allow proper categorization of some events that fall in multiple event types.
pub const EVENT_TYPE: &str = "event.type";
/// URL linking to an external system to continue investigation of this event.
/// This URL links to another system where in-depth investigation of the specific occurrence of this event can take place. Alert events, indicated by `event.kind:alert`, are a common use case for this field.
///
/// # Examples
///
/// - `https://mysystem.example.com/alert/5271dedb-f5b0-4218-87f0-4ac4870a38fe`
pub const EVENT_URL: &str = "event.url";
}
/// A file is defined as a set of information that has been created on, or has existed on a filesystem.
/// File objects can be associated with host events, network events, and/or file events (e.g., those produced by File Integrity Monitoring [FIM] products or services). File fields provide details about the affected file associated with the event or metric.
pub mod file {
/// Last time the file was accessed.
/// Note that not all filesystems keep track of access time.
pub const FILE_ACCESSED: &str = "file.accessed";
/// Array of file attributes.
/// Attributes names will vary by platform. Here's a non-exhaustive list of values that are expected in this field: archive, compressed, directory, encrypted, execute, hidden, read, readonly, system, write.
///
/// # Examples
///
/// - `["readonly", "system"]`
pub const FILE_ATTRIBUTES: &str = "file.attributes";
/// Boolean to capture if a signature is present.
///
/// # Examples
///
/// - `true`
pub const FILE_CODE_SIGNATURE_EXISTS: &str = "file.code_signature.exists";
/// The identifier used to sign the process.
/// This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
///
/// # Examples
///
/// - `com.apple.xpc.proxy`
pub const FILE_CODE_SIGNATURE_SIGNING_ID: &str = "file.code_signature.signing_id";
/// Additional information about the certificate status.
/// This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
///
/// # Examples
///
/// - `ERROR_UNTRUSTED_ROOT`
pub const FILE_CODE_SIGNATURE_STATUS: &str = "file.code_signature.status";
/// Subject name of the code signer
///
/// # Examples
///
/// - `Microsoft Corporation`
pub const FILE_CODE_SIGNATURE_SUBJECT_NAME: &str = "file.code_signature.subject_name";
/// The team identifier used to sign the process.
/// This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
///
/// # Examples
///
/// - `EQHXZ8M8AV`
pub const FILE_CODE_SIGNATURE_TEAM_ID: &str = "file.code_signature.team_id";
/// Stores the trust status of the certificate chain.
/// Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
///
/// # Examples
///
/// - `true`
pub const FILE_CODE_SIGNATURE_TRUSTED: &str = "file.code_signature.trusted";
/// Boolean to capture if the digital signature is verified against the binary content.
/// Leave unpopulated if a certificate was unchecked.
///
/// # Examples
///
/// - `true`
pub const FILE_CODE_SIGNATURE_VALID: &str = "file.code_signature.valid";
/// File creation time.
/// Note that not all filesystems store the creation time.
pub const FILE_CREATED: &str = "file.created";
/// Last time the file attributes or metadata changed.
/// Note that changes to the file content will update `mtime`. This implies `ctime` will be adjusted at the same time, since `mtime` is an attribute of the file.
pub const FILE_CTIME: &str = "file.ctime";
/// Device that is the source of the file.
///
/// # Examples
///
/// - `sda`
pub const FILE_DEVICE: &str = "file.device";
/// Directory where the file is located. It should include the drive letter, when appropriate.
///
/// # Examples
///
/// - `/home/alice`
pub const FILE_DIRECTORY: &str = "file.directory";
/// Drive letter where the file is located. This field is only relevant on Windows.
/// The value should be uppercase, and not include the colon.
///
/// # Examples
///
/// - `C`
pub const FILE_DRIVE_LETTER: &str = "file.drive_letter";
/// File extension, excluding the leading dot.
/// Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
///
/// # Examples
///
/// - `png`
pub const FILE_EXTENSION: &str = "file.extension";
/// Primary group ID (GID) of the file.
///
/// # Examples
///
/// - `1001`
pub const FILE_GID: &str = "file.gid";
/// Primary group name of the file.
///
/// # Examples
///
/// - `alice`
pub const FILE_GROUP: &str = "file.group";
/// MD5 hash.
pub const FILE_HASH_MD5: &str = "file.hash.md5";
/// SHA1 hash.
pub const FILE_HASH_SHA1: &str = "file.hash.sha1";
/// SHA256 hash.
pub const FILE_HASH_SHA256: &str = "file.hash.sha256";
/// SHA512 hash.
pub const FILE_HASH_SHA512: &str = "file.hash.sha512";
/// SSDEEP hash.
pub const FILE_HASH_SSDEEP: &str = "file.hash.ssdeep";
/// Inode representing the file in the filesystem.
///
/// # Examples
///
/// - `256383`
pub const FILE_INODE: &str = "file.inode";
/// MIME type should identify the format of the file or stream of bytes using https://www.iana.org/assignments/media-types/media-types.xhtml[IANA official types], where possible. When more than one type is applicable, the most specific type should be used.
pub const FILE_MIME_TYPE: &str = "file.mime_type";
/// Mode of the file in octal representation.
///
/// # Examples
///
/// - `0640`
pub const FILE_MODE: &str = "file.mode";
/// Last time the file content was modified.
pub const FILE_MTIME: &str = "file.mtime";
/// Name of the file including the extension, without the directory.
///
/// # Examples
///
/// - `example.png`
pub const FILE_NAME: &str = "file.name";
/// File owner's username.
///
/// # Examples
///
/// - `alice`
pub const FILE_OWNER: &str = "file.owner";
/// Full path to the file, including the file name. It should include the drive letter, when appropriate.
///
/// # Examples
///
/// - `/home/alice/example.png`
pub const FILE_PATH: &str = "file.path";
/// CPU architecture target for the file.
///
/// # Examples
///
/// - `x64`
pub const FILE_PE_ARCHITECTURE: &str = "file.pe.architecture";
/// Internal company name of the file, provided at compile-time.
///
/// # Examples
///
/// - `Microsoft Corporation`
pub const FILE_PE_COMPANY: &str = "file.pe.company";
/// Internal description of the file, provided at compile-time.
///
/// # Examples
///
/// - `Paint`
pub const FILE_PE_DESCRIPTION: &str = "file.pe.description";
/// Internal version of the file, provided at compile-time.
///
/// # Examples
///
/// - `6.3.9600.17415`
pub const FILE_PE_FILE_VERSION: &str = "file.pe.file_version";
/// A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
/// Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
///
/// # Examples
///
/// - `0c6803c4e922103c4dca5963aad36ddf`
pub const FILE_PE_IMPHASH: &str = "file.pe.imphash";
/// Internal name of the file, provided at compile-time.
///
/// # Examples
///
/// - `MSPAINT.EXE`
pub const FILE_PE_ORIGINAL_FILE_NAME: &str = "file.pe.original_file_name";
/// Internal product name of the file, provided at compile-time.
///
/// # Examples
///
/// - `Microsoft® Windows® Operating System`
pub const FILE_PE_PRODUCT: &str = "file.pe.product";
/// File size in bytes.
/// Only relevant when `file.type` is "file".
///
/// # Examples
///
/// - `16384`
pub const FILE_SIZE: &str = "file.size";
/// Target path for symlinks.
pub const FILE_TARGET_PATH: &str = "file.target_path";
/// File type (file, dir, or symlink).
///
/// # Examples
///
/// - `file`
pub const FILE_TYPE: &str = "file.type";
/// The user ID (UID) or security identifier (SID) of the file owner.
///
/// # Examples
///
/// - `1001`
pub const FILE_UID: &str = "file.uid";
/// List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
///
/// # Examples
///
/// - `*.elastic.co`
pub const FILE_X509_ALTERNATIVE_NAMES: &str = "file.x509.alternative_names";
/// List of common name (CN) of issuing certificate authority.
///
/// # Examples
///
/// - `Example SHA2 High Assurance Server CA`
pub const FILE_X509_ISSUER_COMMON_NAME: &str = "file.x509.issuer.common_name";
/// List of country (C) codes
///
/// # Examples
///
/// - `US`
pub const FILE_X509_ISSUER_COUNTRY: &str = "file.x509.issuer.country";
/// Distinguished name (DN) of issuing certificate authority.
///
/// # Examples
///
/// - `C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA`
pub const FILE_X509_ISSUER_DISTINGUISHED_NAME: &str = "file.x509.issuer.distinguished_name";
/// List of locality names (L)
///
/// # Examples
///
/// - `Mountain View`
pub const FILE_X509_ISSUER_LOCALITY: &str = "file.x509.issuer.locality";
/// List of organizations (O) of issuing certificate authority.
///
/// # Examples
///
/// - `Example Inc`
pub const FILE_X509_ISSUER_ORGANIZATION: &str = "file.x509.issuer.organization";
/// List of organizational units (OU) of issuing certificate authority.
///
/// # Examples
///
/// - `www.example.com`
pub const FILE_X509_ISSUER_ORGANIZATIONAL_UNIT: &str = "file.x509.issuer.organizational_unit";
/// List of state or province names (ST, S, or P)
///
/// # Examples
///
/// - `California`
pub const FILE_X509_ISSUER_STATE_OR_PROVINCE: &str = "file.x509.issuer.state_or_province";
/// Time at which the certificate is no longer considered valid.
///
/// # Examples
///
/// - `2020-07-16 03:15:39+00:00`
pub const FILE_X509_NOT_AFTER: &str = "file.x509.not_after";
/// Time at which the certificate is first considered valid.
///
/// # Examples
///
/// - `2019-08-16 01:40:25+00:00`
pub const FILE_X509_NOT_BEFORE: &str = "file.x509.not_before";
/// Algorithm used to generate the public key.
///
/// # Examples
///
/// - `RSA`
pub const FILE_X509_PUBLIC_KEY_ALGORITHM: &str = "file.x509.public_key_algorithm";
/// The curve used by the elliptic curve public key algorithm. This is algorithm specific.
///
/// # Examples
///
/// - `nistp521`
pub const FILE_X509_PUBLIC_KEY_CURVE: &str = "file.x509.public_key_curve";
/// Exponent used to derive the public key. This is algorithm specific.
///
/// # Examples
///
/// - `65537`
pub const FILE_X509_PUBLIC_KEY_EXPONENT: &str = "file.x509.public_key_exponent";
/// The size of the public key space in bits.
///
/// # Examples
///
/// - `2048`
pub const FILE_X509_PUBLIC_KEY_SIZE: &str = "file.x509.public_key_size";
/// Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
///
/// # Examples
///
/// - `55FBB9C7DEBF09809D12CCAA`
pub const FILE_X509_SERIAL_NUMBER: &str = "file.x509.serial_number";
/// Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
///
/// # Examples
///
/// - `SHA256-RSA`
pub const FILE_X509_SIGNATURE_ALGORITHM: &str = "file.x509.signature_algorithm";
/// List of common names (CN) of subject.
///
/// # Examples
///
/// - `shared.global.example.net`
pub const FILE_X509_SUBJECT_COMMON_NAME: &str = "file.x509.subject.common_name";
/// List of country (C) code
///
/// # Examples
///
/// - `US`
pub const FILE_X509_SUBJECT_COUNTRY: &str = "file.x509.subject.country";
/// Distinguished name (DN) of the certificate subject entity.
///
/// # Examples
///
/// - `C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net`
pub const FILE_X509_SUBJECT_DISTINGUISHED_NAME: &str = "file.x509.subject.distinguished_name";
/// List of locality names (L)
///
/// # Examples
///
/// - `San Francisco`
pub const FILE_X509_SUBJECT_LOCALITY: &str = "file.x509.subject.locality";
/// List of organizations (O) of subject.
///
/// # Examples
///
/// - `Example, Inc.`
pub const FILE_X509_SUBJECT_ORGANIZATION: &str = "file.x509.subject.organization";
/// List of organizational units (OU) of subject.
pub const FILE_X509_SUBJECT_ORGANIZATIONAL_UNIT: &str = "file.x509.subject.organizational_unit";
/// List of state or province names (ST, S, or P)
///
/// # Examples
///
/// - `California`
pub const FILE_X509_SUBJECT_STATE_OR_PROVINCE: &str = "file.x509.subject.state_or_province";
/// Version of x509 format.
///
/// # Examples
///
/// - `3`
pub const FILE_X509_VERSION_NUMBER: &str = "file.x509.version_number";
}
/// Geo fields can carry data about a specific location related to an event.
/// This geolocation information can be derived from techniques such as Geo IP, or be user-supplied.
pub mod geo {
/// City name.
///
/// # Examples
///
/// - `Montreal`
pub const GEO_CITY_NAME: &str = "geo.city_name";
/// Two-letter code representing continent's name.
///
/// # Examples
///
/// - `NA`
pub const GEO_CONTINENT_CODE: &str = "geo.continent_code";
/// Name of the continent.
///
/// # Examples
///
/// - `North America`
pub const GEO_CONTINENT_NAME: &str = "geo.continent_name";
/// Country ISO code.
///
/// # Examples
///
/// - `CA`
pub const GEO_COUNTRY_ISO_CODE: &str = "geo.country_iso_code";
/// Country name.
///
/// # Examples
///
/// - `Canada`
pub const GEO_COUNTRY_NAME: &str = "geo.country_name";
/// Longitude and latitude.
///
/// # Examples
///
/// - `{ "lon": -73.614830, "lat": 45.505918 }`
pub const GEO_LOCATION: &str = "geo.location";
/// User-defined description of a location, at the level of granularity they care about.
/// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
/// Not typically used in automated geolocation.
///
/// # Examples
///
/// - `boston-dc`
pub const GEO_NAME: &str = "geo.name";
/// Postal code associated with the location.
/// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
///
/// # Examples
///
/// - `94040`
pub const GEO_POSTAL_CODE: &str = "geo.postal_code";
/// Region ISO code.
///
/// # Examples
///
/// - `CA-QC`
pub const GEO_REGION_ISO_CODE: &str = "geo.region_iso_code";
/// Region name.
///
/// # Examples
///
/// - `Quebec`
pub const GEO_REGION_NAME: &str = "geo.region_name";
/// The time zone of the location, such as IANA time zone name.
///
/// # Examples
///
/// - `America/Argentina/Buenos_Aires`
pub const GEO_TIMEZONE: &str = "geo.timezone";
}
/// The group fields are meant to represent groups that are relevant to the event.
pub mod group {
/// Name of the directory the group is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const GROUP_DOMAIN: &str = "group.domain";
/// Unique identifier for the group on the system/platform.
pub const GROUP_ID: &str = "group.id";
/// Name of the group.
pub const GROUP_NAME: &str = "group.name";
}
/// The hash fields represent different bitwise hash algorithms and their values.
/// Field names for common hashes (e.g. MD5, SHA1) are predefined. Add fields for other hashes by lowercasing the hash algorithm name and using underscore separators as appropriate (snake case, e.g. sha3_512).
/// Note that this fieldset is used for common hashes that may be computed over a range of generic bytes. Entity-specific hashes such as ja3 or imphash are placed in the fieldsets to which they relate (tls and pe, respectively).
pub mod hash {
/// MD5 hash.
pub const HASH_MD5: &str = "hash.md5";
/// SHA1 hash.
pub const HASH_SHA1: &str = "hash.sha1";
/// SHA256 hash.
pub const HASH_SHA256: &str = "hash.sha256";
/// SHA512 hash.
pub const HASH_SHA512: &str = "hash.sha512";
/// SSDEEP hash.
pub const HASH_SSDEEP: &str = "hash.ssdeep";
}
/// A host is defined as a general computing instance.
/// ECS host.* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes.
pub mod host {
/// Operating system architecture.
///
/// # Examples
///
/// - `x86_64`
pub const HOST_ARCHITECTURE: &str = "host.architecture";
/// Percent CPU used which is normalized by the number of CPU cores and it ranges from 0 to 1.
/// Scaling factor: 1000.
/// For example: For a two core host, this value should be the average of the two cores, between 0 and 1.
pub const HOST_CPU_USAGE: &str = "host.cpu.usage";
/// The total number of bytes (gauge) read successfully (aggregated from all disks) since the last metric collection.
pub const HOST_DISK_READ_BYTES: &str = "host.disk.read.bytes";
/// The total number of bytes (gauge) written successfully (aggregated from all disks) since the last metric collection.
pub const HOST_DISK_WRITE_BYTES: &str = "host.disk.write.bytes";
/// Name of the domain of which the host is a member.
/// For example, on Windows this could be the host's Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host's LDAP provider.
///
/// # Examples
///
/// - `CONTOSO`
pub const HOST_DOMAIN: &str = "host.domain";
/// City name.
///
/// # Examples
///
/// - `Montreal`
pub const HOST_GEO_CITY_NAME: &str = "host.geo.city_name";
/// Two-letter code representing continent's name.
///
/// # Examples
///
/// - `NA`
pub const HOST_GEO_CONTINENT_CODE: &str = "host.geo.continent_code";
/// Name of the continent.
///
/// # Examples
///
/// - `North America`
pub const HOST_GEO_CONTINENT_NAME: &str = "host.geo.continent_name";
/// Country ISO code.
///
/// # Examples
///
/// - `CA`
pub const HOST_GEO_COUNTRY_ISO_CODE: &str = "host.geo.country_iso_code";
/// Country name.
///
/// # Examples
///
/// - `Canada`
pub const HOST_GEO_COUNTRY_NAME: &str = "host.geo.country_name";
/// Longitude and latitude.
///
/// # Examples
///
/// - `{ "lon": -73.614830, "lat": 45.505918 }`
pub const HOST_GEO_LOCATION: &str = "host.geo.location";
/// User-defined description of a location, at the level of granularity they care about.
/// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
/// Not typically used in automated geolocation.
///
/// # Examples
///
/// - `boston-dc`
pub const HOST_GEO_NAME: &str = "host.geo.name";
/// Postal code associated with the location.
/// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
///
/// # Examples
///
/// - `94040`
pub const HOST_GEO_POSTAL_CODE: &str = "host.geo.postal_code";
/// Region ISO code.
///
/// # Examples
///
/// - `CA-QC`
pub const HOST_GEO_REGION_ISO_CODE: &str = "host.geo.region_iso_code";
/// Region name.
///
/// # Examples
///
/// - `Quebec`
pub const HOST_GEO_REGION_NAME: &str = "host.geo.region_name";
/// The time zone of the location, such as IANA time zone name.
///
/// # Examples
///
/// - `America/Argentina/Buenos_Aires`
pub const HOST_GEO_TIMEZONE: &str = "host.geo.timezone";
/// Hostname of the host.
/// It normally contains what the `hostname` command returns on the host machine.
pub const HOST_HOSTNAME: &str = "host.hostname";
/// Unique host id.
/// As hostname is not always unique, use values that are meaningful in your environment.
/// Example: The current usage of `beat.name`.
pub const HOST_ID: &str = "host.id";
/// Host ip addresses.
pub const HOST_IP: &str = "host.ip";
/// Host MAC addresses.
/// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
///
/// # Examples
///
/// - `["00-00-5E-00-53-23", "00-00-5E-00-53-24"]`
pub const HOST_MAC: &str = "host.mac";
/// Name of the host.
/// It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.
pub const HOST_NAME: &str = "host.name";
/// The number of bytes (gauge) sent out on all network interfaces by the host since the last metric collection.
pub const HOST_NETWORK_EGRESS_BYTES: &str = "host.network.egress.bytes";
/// The number of packets (gauge) sent out on all network interfaces by the host since the last metric collection.
pub const HOST_NETWORK_EGRESS_PACKETS: &str = "host.network.egress.packets";
/// The number of bytes received (gauge) on all network interfaces by the host since the last metric collection.
pub const HOST_NETWORK_INGRESS_BYTES: &str = "host.network.ingress.bytes";
/// The number of packets (gauge) received on all network interfaces by the host since the last metric collection.
pub const HOST_NETWORK_INGRESS_PACKETS: &str = "host.network.ingress.packets";
/// OS family (such as redhat, debian, freebsd, windows).
///
/// # Examples
///
/// - `debian`
pub const HOST_OS_FAMILY: &str = "host.os.family";
/// Operating system name, including the version or code name.
///
/// # Examples
///
/// - `Mac OS Mojave`
pub const HOST_OS_FULL: &str = "host.os.full";
/// Operating system kernel version as a raw string.
///
/// # Examples
///
/// - `4.4.0-112-generic`
pub const HOST_OS_KERNEL: &str = "host.os.kernel";
/// Operating system name, without the version.
///
/// # Examples
///
/// - `Mac OS X`
pub const HOST_OS_NAME: &str = "host.os.name";
/// Operating system platform (such centos, ubuntu, windows).
///
/// # Examples
///
/// - `darwin`
pub const HOST_OS_PLATFORM: &str = "host.os.platform";
/// Use the `os.type` field to categorize the operating system into one of the broad commercial families.
/// One of these following values should be used (lowercase): linux, macos, unix, windows.
/// If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
///
/// # Examples
///
/// - `macos`
pub const HOST_OS_TYPE: &str = "host.os.type";
/// Operating system version as a raw string.
///
/// # Examples
///
/// - `10.14.1`
pub const HOST_OS_VERSION: &str = "host.os.version";
/// Type of host.
/// For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment.
pub const HOST_TYPE: &str = "host.type";
/// Seconds the host has been up.
///
/// # Examples
///
/// - `1325`
pub const HOST_UPTIME: &str = "host.uptime";
/// Name of the directory the user is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const HOST_USER_DOMAIN: &str = "host.user.domain";
/// User email address.
pub const HOST_USER_EMAIL: &str = "host.user.email";
/// User's full name, if available.
///
/// # Examples
///
/// - `Albert Einstein`
pub const HOST_USER_FULL_NAME: &str = "host.user.full_name";
/// Name of the directory the group is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const HOST_USER_GROUP_DOMAIN: &str = "host.user.group.domain";
/// Unique identifier for the group on the system/platform.
pub const HOST_USER_GROUP_ID: &str = "host.user.group.id";
/// Name of the group.
pub const HOST_USER_GROUP_NAME: &str = "host.user.group.name";
/// Unique user hash to correlate information for a user in anonymized form.
/// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
pub const HOST_USER_HASH: &str = "host.user.hash";
/// Unique identifier of the user.
pub const HOST_USER_ID: &str = "host.user.id";
/// Short name or login of the user.
///
/// # Examples
///
/// - `albert`
pub const HOST_USER_NAME: &str = "host.user.name";
/// Array of user roles at the time of the event.
///
/// # Examples
///
/// - `["kibana_admin", "reporting_user"]`
pub const HOST_USER_ROLES: &str = "host.user.roles";
}
/// Fields related to HTTP activity. Use the `url` field set to store the url of the request.
pub mod http {
/// Size in bytes of the request body.
///
/// # Examples
///
/// - `887`
pub const HTTP_REQUEST_BODY_BYTES: &str = "http.request.body.bytes";
/// The full HTTP request body.
///
/// # Examples
///
/// - `Hello world`
pub const HTTP_REQUEST_BODY_CONTENT: &str = "http.request.body.content";
/// Total size in bytes of the request (body and headers).
///
/// # Examples
///
/// - `1437`
pub const HTTP_REQUEST_BYTES: &str = "http.request.bytes";
/// A unique identifier for each HTTP request to correlate logs between clients and servers in transactions.
/// The id may be contained in a non-standard HTTP header, such as `X-Request-ID` or `X-Correlation-ID`.
///
/// # Examples
///
/// - `123e4567-e89b-12d3-a456-426614174000`
pub const HTTP_REQUEST_ID: &str = "http.request.id";
/// HTTP request method.
/// Prior to ECS 1.6.0 the following guidance was provided:
/// "The field value must be normalized to lowercase for querying."
/// As of ECS 1.6.0, the guidance is deprecated because the original case of the method may be useful in anomaly detection. Original case will be mandated in ECS 2.0.0
///
/// # Examples
///
/// - `GET, POST, PUT, PoST`
pub const HTTP_REQUEST_METHOD: &str = "http.request.method";
/// Mime type of the body of the request.
/// This value must only be populated based on the content of the request body, not on the `Content-Type` header. Comparing the mime type of a request with the request's Content-Type header can be helpful in detecting threats or misconfigured clients.
///
/// # Examples
///
/// - `image/gif`
pub const HTTP_REQUEST_MIME_TYPE: &str = "http.request.mime_type";
/// Referrer for this HTTP request.
///
/// # Examples
///
/// - `https://blog.example.com/`
pub const HTTP_REQUEST_REFERRER: &str = "http.request.referrer";
/// Size in bytes of the response body.
///
/// # Examples
///
/// - `887`
pub const HTTP_RESPONSE_BODY_BYTES: &str = "http.response.body.bytes";
/// The full HTTP response body.
///
/// # Examples
///
/// - `Hello world`
pub const HTTP_RESPONSE_BODY_CONTENT: &str = "http.response.body.content";
/// Total size in bytes of the response (body and headers).
///
/// # Examples
///
/// - `1437`
pub const HTTP_RESPONSE_BYTES: &str = "http.response.bytes";
/// Mime type of the body of the response.
/// This value must only be populated based on the content of the response body, not on the `Content-Type` header. Comparing the mime type of a response with the response's Content-Type header can be helpful in detecting misconfigured servers.
///
/// # Examples
///
/// - `image/gif`
pub const HTTP_RESPONSE_MIME_TYPE: &str = "http.response.mime_type";
/// HTTP response status code.
///
/// # Examples
///
/// - `404`
pub const HTTP_RESPONSE_STATUS_CODE: &str = "http.response.status_code";
/// HTTP version.
///
/// # Examples
///
/// - `1.1`
pub const HTTP_VERSION: &str = "http.version";
}
/// The interface fields are used to record ingress and egress interface information when reported by an observer (e.g. firewall, router, load balancer) in the context of the observer handling a network connection. In the case of a single observer interface (e.g. network sensor on a span port) only the observer.ingress information should be populated.
pub mod interface {
/// Interface alias as reported by the system, typically used in firewall implementations for e.g. inside, outside, or dmz logical interface naming.
///
/// # Examples
///
/// - `outside`
pub const INTERFACE_ALIAS: &str = "interface.alias";
/// Interface ID as reported by an observer (typically SNMP interface ID).
///
/// # Examples
///
/// - `10`
pub const INTERFACE_ID: &str = "interface.id";
/// Interface name as reported by the system.
///
/// # Examples
///
/// - `eth0`
pub const INTERFACE_NAME: &str = "interface.name";
}
/// Details about the event's logging mechanism or logging transport.
/// The log.* fields are typically populated with details about the logging mechanism used to create and/or transport the event. For example, syslog details belong under `log.syslog.*`.
/// The details specific to your event source are typically not logged under `log.*`, but rather in `event.*` or in other ECS fields.
pub mod log {
/// Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate.
/// If the event wasn't read from a log file, do not populate this field.
///
/// # Examples
///
/// - `/var/log/fun-times.log`
pub const LOG_FILE_PATH: &str = "log.file.path";
/// Original log level of the log event.
/// If the source of the event provides a log level or textual severity, this is the one that goes in `log.level`. If your source doesn't specify one, you may put your event transport's severity here (e.g. Syslog severity).
/// Some examples are `warn`, `err`, `i`, `informational`.
///
/// # Examples
///
/// - `error`
pub const LOG_LEVEL: &str = "log.level";
/// The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name.
///
/// # Examples
///
/// - `org.elasticsearch.bootstrap.Bootstrap`
pub const LOG_LOGGER: &str = "log.logger";
/// The line number of the file containing the source code which originated the log event.
///
/// # Examples
///
/// - `42`
pub const LOG_ORIGIN_FILE_LINE: &str = "log.origin.file.line";
/// The name of the file containing the source code which originated the log event.
/// Note that this field is not meant to capture the log file. The correct field to capture the log file is `log.file.path`.
///
/// # Examples
///
/// - `Bootstrap.java`
pub const LOG_ORIGIN_FILE_NAME: &str = "log.origin.file.name";
/// The name of the function or method which originated the log event.
///
/// # Examples
///
/// - `init`
pub const LOG_ORIGIN_FUNCTION: &str = "log.origin.function";
/// This is the original log message and contains the full log message before splitting it up in multiple parts.
/// In contrast to the `message` field which can contain an extracted part of the log message, this field contains the original, full log message. It can have already some modifications applied like encoding or new lines removed to clean up the log message.
/// This field is not indexed and doc_values are disabled so it can't be queried but the value can be retrieved from `_source`.
///
/// # Examples
///
/// - `Sep 19 08:26:10 localhost My log`
pub const LOG_ORIGINAL: &str = "log.original";
/// The Syslog metadata of the event, if the event was transmitted via Syslog. Please see RFCs 5424 or 3164.
pub const LOG_SYSLOG: &str = "log.syslog";
/// The Syslog numeric facility of the log event, if available.
/// According to RFCs 5424 and 3164, this value should be an integer between 0 and 23.
///
/// # Examples
///
/// - `23`
pub const LOG_SYSLOG_FACILITY_CODE: &str = "log.syslog.facility.code";
/// The Syslog text-based facility of the log event, if available.
///
/// # Examples
///
/// - `local7`
pub const LOG_SYSLOG_FACILITY_NAME: &str = "log.syslog.facility.name";
/// Syslog numeric priority of the event, if available.
/// According to RFCs 5424 and 3164, the priority is 8 * facility + severity. This number is therefore expected to contain a value between 0 and 191.
///
/// # Examples
///
/// - `135`
pub const LOG_SYSLOG_PRIORITY: &str = "log.syslog.priority";
/// The Syslog numeric severity of the log event, if available.
/// If the event source publishing via Syslog provides a different numeric severity value (e.g. firewall, IDS), your source's numeric severity should go to `event.severity`. If the event source does not specify a distinct severity, you can optionally copy the Syslog severity to `event.severity`.
///
/// # Examples
///
/// - `3`
pub const LOG_SYSLOG_SEVERITY_CODE: &str = "log.syslog.severity.code";
/// The Syslog numeric severity of the log event, if available.
/// If the event source publishing via Syslog provides a different severity value (e.g. firewall, IDS), your source's text severity should go to `log.level`. If the event source does not specify a distinct severity, you can optionally copy the Syslog severity to `log.level`.
///
/// # Examples
///
/// - `Error`
pub const LOG_SYSLOG_SEVERITY_NAME: &str = "log.syslog.severity.name";
}
/// The network is defined as the communication path over which a host or network event happens.
/// The network.* fields should be populated with details about the network activity associated with an event.
pub mod network {
/// A name given to an application level protocol. This can be arbitrarily assigned for things like microservices, but also apply to things like skype, icq, facebook, twitter. This would be used in situations where the vendor or service can be decoded such as from the source/dest IP owners, ports, or wire format.
/// The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS".
///
/// # Examples
///
/// - `aim`
pub const NETWORK_APPLICATION: &str = "network.application";
/// Total bytes transferred in both directions.
/// If `source.bytes` and `destination.bytes` are known, `network.bytes` is their sum.
///
/// # Examples
///
/// - `368`
pub const NETWORK_BYTES: &str = "network.bytes";
/// A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows.
/// Learn more at https://github.com/corelight/community-id-spec.
///
/// # Examples
///
/// - `1:hO+sN4H+MG5MY/8hIrXPqc4ZQz0=`
pub const NETWORK_COMMUNITY_ID: &str = "network.community_id";
/// Direction of the network traffic.
/// Recommended values are:
/// * ingress
/// * egress
/// * inbound
/// * outbound
/// * internal
/// * external
/// * unknown
///
/// When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress".
/// When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external".
/// Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers.
///
/// # Examples
///
/// - `inbound`
pub const NETWORK_DIRECTION: &str = "network.direction";
/// Host IP address when the source IP address is the proxy.
///
/// # Examples
///
/// - `192.1.1.2`
pub const NETWORK_FORWARDED_IP: &str = "network.forwarded_ip";
/// IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number.
///
/// # Examples
///
/// - `6`
pub const NETWORK_IANA_NUMBER: &str = "network.iana_number";
/// Network.inner fields are added in addition to network.vlan fields to describe the innermost VLAN when q-in-q VLAN tagging is present. Allowed fields include vlan.id and vlan.name. Inner vlan fields are typically used when sending traffic with multiple 802.1q encapsulations to a network sensor (e.g. Zeek, Wireshark.)
pub const NETWORK_INNER: &str = "network.inner";
/// VLAN ID as reported by the observer.
///
/// # Examples
///
/// - `10`
pub const NETWORK_INNER_VLAN_ID: &str = "network.inner.vlan.id";
/// Optional VLAN name as reported by the observer.
///
/// # Examples
///
/// - `outside`
pub const NETWORK_INNER_VLAN_NAME: &str = "network.inner.vlan.name";
/// Name given by operators to sections of their network.
///
/// # Examples
///
/// - `Guest Wifi`
pub const NETWORK_NAME: &str = "network.name";
/// Total packets transferred in both directions.
/// If `source.packets` and `destination.packets` are known, `network.packets` is their sum.
///
/// # Examples
///
/// - `24`
pub const NETWORK_PACKETS: &str = "network.packets";
/// L7 Network protocol name. ex. http, lumberjack, transport protocol.
/// The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS".
///
/// # Examples
///
/// - `http`
pub const NETWORK_PROTOCOL: &str = "network.protocol";
/// Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.)
/// The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS".
///
/// # Examples
///
/// - `tcp`
pub const NETWORK_TRANSPORT: &str = "network.transport";
/// In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc
/// The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS".
///
/// # Examples
///
/// - `ipv4`
pub const NETWORK_TYPE: &str = "network.type";
/// VLAN ID as reported by the observer.
///
/// # Examples
///
/// - `10`
pub const NETWORK_VLAN_ID: &str = "network.vlan.id";
/// Optional VLAN name as reported by the observer.
///
/// # Examples
///
/// - `outside`
pub const NETWORK_VLAN_NAME: &str = "network.vlan.name";
}
/// An observer is defined as a special network, security, or application device used to detect, observe, or create network, security, or application-related events and metrics.
/// This could be a custom hardware appliance or a server that has been configured to run special network, security, or application software. Examples include firewalls, web proxies, intrusion detection/prevention systems, network monitoring sensors, web application firewalls, data loss prevention systems, and APM servers. The observer.* fields shall be populated with details of the system, if any, that detects, observes and/or creates a network, security, or application event or metric. Message queues and ETL components used in processing events or metrics are not considered observers in ECS.
pub mod observer {
/// Observer.egress holds information like interface number and name, vlan, and zone information to classify egress traffic. Single armed monitoring such as a network sensor on a span port should only use observer.ingress to categorize traffic.
pub const OBSERVER_EGRESS: &str = "observer.egress";
/// Interface alias as reported by the system, typically used in firewall implementations for e.g. inside, outside, or dmz logical interface naming.
///
/// # Examples
///
/// - `outside`
pub const OBSERVER_EGRESS_INTERFACE_ALIAS: &str = "observer.egress.interface.alias";
/// Interface ID as reported by an observer (typically SNMP interface ID).
///
/// # Examples
///
/// - `10`
pub const OBSERVER_EGRESS_INTERFACE_ID: &str = "observer.egress.interface.id";
/// Interface name as reported by the system.
///
/// # Examples
///
/// - `eth0`
pub const OBSERVER_EGRESS_INTERFACE_NAME: &str = "observer.egress.interface.name";
/// VLAN ID as reported by the observer.
///
/// # Examples
///
/// - `10`
pub const OBSERVER_EGRESS_VLAN_ID: &str = "observer.egress.vlan.id";
/// Optional VLAN name as reported by the observer.
///
/// # Examples
///
/// - `outside`
pub const OBSERVER_EGRESS_VLAN_NAME: &str = "observer.egress.vlan.name";
/// Network zone of outbound traffic as reported by the observer to categorize the destination area of egress traffic, e.g. Internal, External, DMZ, HR, Legal, etc.
///
/// # Examples
///
/// - `Public_Internet`
pub const OBSERVER_EGRESS_ZONE: &str = "observer.egress.zone";
/// City name.
///
/// # Examples
///
/// - `Montreal`
pub const OBSERVER_GEO_CITY_NAME: &str = "observer.geo.city_name";
/// Two-letter code representing continent's name.
///
/// # Examples
///
/// - `NA`
pub const OBSERVER_GEO_CONTINENT_CODE: &str = "observer.geo.continent_code";
/// Name of the continent.
///
/// # Examples
///
/// - `North America`
pub const OBSERVER_GEO_CONTINENT_NAME: &str = "observer.geo.continent_name";
/// Country ISO code.
///
/// # Examples
///
/// - `CA`
pub const OBSERVER_GEO_COUNTRY_ISO_CODE: &str = "observer.geo.country_iso_code";
/// Country name.
///
/// # Examples
///
/// - `Canada`
pub const OBSERVER_GEO_COUNTRY_NAME: &str = "observer.geo.country_name";
/// Longitude and latitude.
///
/// # Examples
///
/// - `{ "lon": -73.614830, "lat": 45.505918 }`
pub const OBSERVER_GEO_LOCATION: &str = "observer.geo.location";
/// User-defined description of a location, at the level of granularity they care about.
/// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
/// Not typically used in automated geolocation.
///
/// # Examples
///
/// - `boston-dc`
pub const OBSERVER_GEO_NAME: &str = "observer.geo.name";
/// Postal code associated with the location.
/// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
///
/// # Examples
///
/// - `94040`
pub const OBSERVER_GEO_POSTAL_CODE: &str = "observer.geo.postal_code";
/// Region ISO code.
///
/// # Examples
///
/// - `CA-QC`
pub const OBSERVER_GEO_REGION_ISO_CODE: &str = "observer.geo.region_iso_code";
/// Region name.
///
/// # Examples
///
/// - `Quebec`
pub const OBSERVER_GEO_REGION_NAME: &str = "observer.geo.region_name";
/// The time zone of the location, such as IANA time zone name.
///
/// # Examples
///
/// - `America/Argentina/Buenos_Aires`
pub const OBSERVER_GEO_TIMEZONE: &str = "observer.geo.timezone";
/// Hostname of the observer.
pub const OBSERVER_HOSTNAME: &str = "observer.hostname";
/// Observer.ingress holds information like interface number and name, vlan, and zone information to classify ingress traffic. Single armed monitoring such as a network sensor on a span port should only use observer.ingress to categorize traffic.
pub const OBSERVER_INGRESS: &str = "observer.ingress";
/// Interface alias as reported by the system, typically used in firewall implementations for e.g. inside, outside, or dmz logical interface naming.
///
/// # Examples
///
/// - `outside`
pub const OBSERVER_INGRESS_INTERFACE_ALIAS: &str = "observer.ingress.interface.alias";
/// Interface ID as reported by an observer (typically SNMP interface ID).
///
/// # Examples
///
/// - `10`
pub const OBSERVER_INGRESS_INTERFACE_ID: &str = "observer.ingress.interface.id";
/// Interface name as reported by the system.
///
/// # Examples
///
/// - `eth0`
pub const OBSERVER_INGRESS_INTERFACE_NAME: &str = "observer.ingress.interface.name";
/// VLAN ID as reported by the observer.
///
/// # Examples
///
/// - `10`
pub const OBSERVER_INGRESS_VLAN_ID: &str = "observer.ingress.vlan.id";
/// Optional VLAN name as reported by the observer.
///
/// # Examples
///
/// - `outside`
pub const OBSERVER_INGRESS_VLAN_NAME: &str = "observer.ingress.vlan.name";
/// Network zone of incoming traffic as reported by the observer to categorize the source area of ingress traffic. e.g. internal, External, DMZ, HR, Legal, etc.
///
/// # Examples
///
/// - `DMZ`
pub const OBSERVER_INGRESS_ZONE: &str = "observer.ingress.zone";
/// IP addresses of the observer.
pub const OBSERVER_IP: &str = "observer.ip";
/// MAC addresses of the observer.
/// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
///
/// # Examples
///
/// - `["00-00-5E-00-53-23", "00-00-5E-00-53-24"]`
pub const OBSERVER_MAC: &str = "observer.mac";
/// Custom name of the observer.
/// This is a name that can be given to an observer. This can be helpful for example if multiple firewalls of the same model are used in an organization.
/// If no custom name is needed, the field can be left empty.
///
/// # Examples
///
/// - `1_proxySG`
pub const OBSERVER_NAME: &str = "observer.name";
/// OS family (such as redhat, debian, freebsd, windows).
///
/// # Examples
///
/// - `debian`
pub const OBSERVER_OS_FAMILY: &str = "observer.os.family";
/// Operating system name, including the version or code name.
///
/// # Examples
///
/// - `Mac OS Mojave`
pub const OBSERVER_OS_FULL: &str = "observer.os.full";
/// Operating system kernel version as a raw string.
///
/// # Examples
///
/// - `4.4.0-112-generic`
pub const OBSERVER_OS_KERNEL: &str = "observer.os.kernel";
/// Operating system name, without the version.
///
/// # Examples
///
/// - `Mac OS X`
pub const OBSERVER_OS_NAME: &str = "observer.os.name";
/// Operating system platform (such centos, ubuntu, windows).
///
/// # Examples
///
/// - `darwin`
pub const OBSERVER_OS_PLATFORM: &str = "observer.os.platform";
/// Use the `os.type` field to categorize the operating system into one of the broad commercial families.
/// One of these following values should be used (lowercase): linux, macos, unix, windows.
/// If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
///
/// # Examples
///
/// - `macos`
pub const OBSERVER_OS_TYPE: &str = "observer.os.type";
/// Operating system version as a raw string.
///
/// # Examples
///
/// - `10.14.1`
pub const OBSERVER_OS_VERSION: &str = "observer.os.version";
/// The product name of the observer.
///
/// # Examples
///
/// - `s200`
pub const OBSERVER_PRODUCT: &str = "observer.product";
/// Observer serial number.
pub const OBSERVER_SERIAL_NUMBER: &str = "observer.serial_number";
/// The type of the observer the data is coming from.
/// There is no predefined list of observer types. Some examples are `forwarder`, `firewall`, `ids`, `ips`, `proxy`, `poller`, `sensor`, `APM server`.
///
/// # Examples
///
/// - `firewall`
pub const OBSERVER_TYPE: &str = "observer.type";
/// Vendor name of the observer.
///
/// # Examples
///
/// - `Symantec`
pub const OBSERVER_VENDOR: &str = "observer.vendor";
/// Observer version.
pub const OBSERVER_VERSION: &str = "observer.version";
}
/// Fields that describe the resources which container orchestrators manage or act upon.
pub mod orchestrator {
/// API version being used to carry out the action
///
/// # Examples
///
/// - `v1beta1`
pub const ORCHESTRATOR_API_VERSION: &str = "orchestrator.api_version";
/// Name of the cluster.
pub const ORCHESTRATOR_CLUSTER_NAME: &str = "orchestrator.cluster.name";
/// URL of the API used to manage the cluster.
pub const ORCHESTRATOR_CLUSTER_URL: &str = "orchestrator.cluster.url";
/// The version of the cluster.
pub const ORCHESTRATOR_CLUSTER_VERSION: &str = "orchestrator.cluster.version";
/// Namespace in which the action is taking place.
///
/// # Examples
///
/// - `kube-system`
pub const ORCHESTRATOR_NAMESPACE: &str = "orchestrator.namespace";
/// Organization affected by the event (for multi-tenant orchestrator setups).
///
/// # Examples
///
/// - `elastic`
pub const ORCHESTRATOR_ORGANIZATION: &str = "orchestrator.organization";
/// Name of the resource being acted upon.
///
/// # Examples
///
/// - `test-pod-cdcws`
pub const ORCHESTRATOR_RESOURCE_NAME: &str = "orchestrator.resource.name";
/// Type of resource being acted upon.
///
/// # Examples
///
/// - `service`
pub const ORCHESTRATOR_RESOURCE_TYPE: &str = "orchestrator.resource.type";
/// Orchestrator cluster type (e.g. kubernetes, nomad or cloudfoundry).
///
/// # Examples
///
/// - `kubernetes`
pub const ORCHESTRATOR_TYPE: &str = "orchestrator.type";
}
/// The organization fields enrich data with information about the company or entity the data is associated with.
/// These fields help you arrange or filter data stored in an index by one or multiple organizations.
pub mod organization {
/// Unique identifier for the organization.
pub const ORGANIZATION_ID: &str = "organization.id";
/// Organization name.
pub const ORGANIZATION_NAME: &str = "organization.name";
}
/// The OS fields contain information about the operating system.
pub mod os {
/// OS family (such as redhat, debian, freebsd, windows).
///
/// # Examples
///
/// - `debian`
pub const OS_FAMILY: &str = "os.family";
/// Operating system name, including the version or code name.
///
/// # Examples
///
/// - `Mac OS Mojave`
pub const OS_FULL: &str = "os.full";
/// Operating system kernel version as a raw string.
///
/// # Examples
///
/// - `4.4.0-112-generic`
pub const OS_KERNEL: &str = "os.kernel";
/// Operating system name, without the version.
///
/// # Examples
///
/// - `Mac OS X`
pub const OS_NAME: &str = "os.name";
/// Operating system platform (such centos, ubuntu, windows).
///
/// # Examples
///
/// - `darwin`
pub const OS_PLATFORM: &str = "os.platform";
/// Use the `os.type` field to categorize the operating system into one of the broad commercial families.
/// One of these following values should be used (lowercase): linux, macos, unix, windows.
/// If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
///
/// # Examples
///
/// - `macos`
pub const OS_TYPE: &str = "os.type";
/// Operating system version as a raw string.
///
/// # Examples
///
/// - `10.14.1`
pub const OS_VERSION: &str = "os.version";
}
/// These fields contain information about an installed software package. It contains general information about a package, such as name, version or size. It also contains installation details, such as time or location.
pub mod package {
/// Package architecture.
///
/// # Examples
///
/// - `x86_64`
pub const PACKAGE_ARCHITECTURE: &str = "package.architecture";
/// Additional information about the build version of the installed package.
/// For example use the commit SHA of a non-released package.
///
/// # Examples
///
/// - `36f4f7e89dd61b0988b12ee000b98966867710cd`
pub const PACKAGE_BUILD_VERSION: &str = "package.build_version";
/// Checksum of the installed package for verification.
///
/// # Examples
///
/// - `68b329da9893e34099c7d8ad5cb9c940`
pub const PACKAGE_CHECKSUM: &str = "package.checksum";
/// Description of the package.
///
/// # Examples
///
/// - `Open source programming language to build simple/reliable/efficient software.`
pub const PACKAGE_DESCRIPTION: &str = "package.description";
/// Indicating how the package was installed, e.g. user-local, global.
///
/// # Examples
///
/// - `global`
pub const PACKAGE_INSTALL_SCOPE: &str = "package.install_scope";
/// Time when package was installed.
pub const PACKAGE_INSTALLED: &str = "package.installed";
/// License under which the package was released.
/// Use a short name, e.g. the license identifier from SPDX License List where possible (https://spdx.org/licenses/).
///
/// # Examples
///
/// - `Apache License 2.0`
pub const PACKAGE_LICENSE: &str = "package.license";
/// Package name
///
/// # Examples
///
/// - `go`
pub const PACKAGE_NAME: &str = "package.name";
/// Path where the package is installed.
///
/// # Examples
///
/// - `/usr/local/Cellar/go/1.12.9/`
pub const PACKAGE_PATH: &str = "package.path";
/// Home page or reference URL of the software in this package, if available.
///
/// # Examples
///
/// - `https://golang.org`
pub const PACKAGE_REFERENCE: &str = "package.reference";
/// Package size in bytes.
///
/// # Examples
///
/// - `62231`
pub const PACKAGE_SIZE: &str = "package.size";
/// Type of package.
/// This should contain the package file type, rather than the package manager name. Examples: rpm, dpkg, brew, npm, gem, nupkg, jar.
///
/// # Examples
///
/// - `rpm`
pub const PACKAGE_TYPE: &str = "package.type";
/// Package version
///
/// # Examples
///
/// - `1.12.9`
pub const PACKAGE_VERSION: &str = "package.version";
}
/// These fields contain Windows Portable Executable (PE) metadata.
pub mod pe {
/// CPU architecture target for the file.
///
/// # Examples
///
/// - `x64`
pub const PE_ARCHITECTURE: &str = "pe.architecture";
/// Internal company name of the file, provided at compile-time.
///
/// # Examples
///
/// - `Microsoft Corporation`
pub const PE_COMPANY: &str = "pe.company";
/// Internal description of the file, provided at compile-time.
///
/// # Examples
///
/// - `Paint`
pub const PE_DESCRIPTION: &str = "pe.description";
/// Internal version of the file, provided at compile-time.
///
/// # Examples
///
/// - `6.3.9600.17415`
pub const PE_FILE_VERSION: &str = "pe.file_version";
/// A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
/// Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
///
/// # Examples
///
/// - `0c6803c4e922103c4dca5963aad36ddf`
pub const PE_IMPHASH: &str = "pe.imphash";
/// Internal name of the file, provided at compile-time.
///
/// # Examples
///
/// - `MSPAINT.EXE`
pub const PE_ORIGINAL_FILE_NAME: &str = "pe.original_file_name";
/// Internal product name of the file, provided at compile-time.
///
/// # Examples
///
/// - `Microsoft® Windows® Operating System`
pub const PE_PRODUCT: &str = "pe.product";
}
/// These fields contain information about a process.
/// These fields can help you correlate metrics information with a process id/name from a log message. The `process.pid` often stays in the metric itself and is copied to the global field for correlation.
pub mod process {
/// Array of process arguments, starting with the absolute path to the executable.
/// May be filtered to protect sensitive information.
///
/// # Examples
///
/// - `["/usr/bin/ssh", "-l", "user", "10.0.0.16"]`
pub const PROCESS_ARGS: &str = "process.args";
/// Length of the process.args array.
/// This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity.
///
/// # Examples
///
/// - `4`
pub const PROCESS_ARGS_COUNT: &str = "process.args_count";
/// Boolean to capture if a signature is present.
///
/// # Examples
///
/// - `true`
pub const PROCESS_CODE_SIGNATURE_EXISTS: &str = "process.code_signature.exists";
/// The identifier used to sign the process.
/// This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
///
/// # Examples
///
/// - `com.apple.xpc.proxy`
pub const PROCESS_CODE_SIGNATURE_SIGNING_ID: &str = "process.code_signature.signing_id";
/// Additional information about the certificate status.
/// This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
///
/// # Examples
///
/// - `ERROR_UNTRUSTED_ROOT`
pub const PROCESS_CODE_SIGNATURE_STATUS: &str = "process.code_signature.status";
/// Subject name of the code signer
///
/// # Examples
///
/// - `Microsoft Corporation`
pub const PROCESS_CODE_SIGNATURE_SUBJECT_NAME: &str = "process.code_signature.subject_name";
/// The team identifier used to sign the process.
/// This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
///
/// # Examples
///
/// - `EQHXZ8M8AV`
pub const PROCESS_CODE_SIGNATURE_TEAM_ID: &str = "process.code_signature.team_id";
/// Stores the trust status of the certificate chain.
/// Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
///
/// # Examples
///
/// - `true`
pub const PROCESS_CODE_SIGNATURE_TRUSTED: &str = "process.code_signature.trusted";
/// Boolean to capture if the digital signature is verified against the binary content.
/// Leave unpopulated if a certificate was unchecked.
///
/// # Examples
///
/// - `true`
pub const PROCESS_CODE_SIGNATURE_VALID: &str = "process.code_signature.valid";
/// Full command line that started the process, including the absolute path to the executable, and all arguments.
/// Some arguments may be filtered to protect sensitive information.
///
/// # Examples
///
/// - `/usr/bin/ssh -l user 10.0.0.16`
pub const PROCESS_COMMAND_LINE: &str = "process.command_line";
/// Unique identifier for the process.
/// The implementation of this is specified by the data source, but some examples of what could be used here are a process-generated UUID, Sysmon Process GUIDs, or a hash of some uniquely identifying components of a process.
/// Constructing a globally unique identifier is a common practice to mitigate PID reuse as well as to identify a specific process over time, across multiple monitored hosts.
///
/// # Examples
///
/// - `c2c455d9f99375d`
pub const PROCESS_ENTITY_ID: &str = "process.entity_id";
/// Absolute path to the process executable.
///
/// # Examples
///
/// - `/usr/bin/ssh`
pub const PROCESS_EXECUTABLE: &str = "process.executable";
/// The exit code of the process, if this is a termination event.
/// The field should be absent if there is no exit code for the event (e.g. process start).
///
/// # Examples
///
/// - `137`
pub const PROCESS_EXIT_CODE: &str = "process.exit_code";
/// MD5 hash.
pub const PROCESS_HASH_MD5: &str = "process.hash.md5";
/// SHA1 hash.
pub const PROCESS_HASH_SHA1: &str = "process.hash.sha1";
/// SHA256 hash.
pub const PROCESS_HASH_SHA256: &str = "process.hash.sha256";
/// SHA512 hash.
pub const PROCESS_HASH_SHA512: &str = "process.hash.sha512";
/// SSDEEP hash.
pub const PROCESS_HASH_SSDEEP: &str = "process.hash.ssdeep";
/// Process name.
/// Sometimes called program name or similar.
///
/// # Examples
///
/// - `ssh`
pub const PROCESS_NAME: &str = "process.name";
/// Array of process arguments, starting with the absolute path to the executable.
/// May be filtered to protect sensitive information.
///
/// # Examples
///
/// - `["/usr/bin/ssh", "-l", "user", "10.0.0.16"]`
pub const PROCESS_PARENT_ARGS: &str = "process.parent.args";
/// Length of the process.args array.
/// This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity.
///
/// # Examples
///
/// - `4`
pub const PROCESS_PARENT_ARGS_COUNT: &str = "process.parent.args_count";
/// Boolean to capture if a signature is present.
///
/// # Examples
///
/// - `true`
pub const PROCESS_PARENT_CODE_SIGNATURE_EXISTS: &str = "process.parent.code_signature.exists";
/// The identifier used to sign the process.
/// This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
///
/// # Examples
///
/// - `com.apple.xpc.proxy`
pub const PROCESS_PARENT_CODE_SIGNATURE_SIGNING_ID: &str =
"process.parent.code_signature.signing_id";
/// Additional information about the certificate status.
/// This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
///
/// # Examples
///
/// - `ERROR_UNTRUSTED_ROOT`
pub const PROCESS_PARENT_CODE_SIGNATURE_STATUS: &str = "process.parent.code_signature.status";
/// Subject name of the code signer
///
/// # Examples
///
/// - `Microsoft Corporation`
pub const PROCESS_PARENT_CODE_SIGNATURE_SUBJECT_NAME: &str =
"process.parent.code_signature.subject_name";
/// The team identifier used to sign the process.
/// This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
///
/// # Examples
///
/// - `EQHXZ8M8AV`
pub const PROCESS_PARENT_CODE_SIGNATURE_TEAM_ID: &str = "process.parent.code_signature.team_id";
/// Stores the trust status of the certificate chain.
/// Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
///
/// # Examples
///
/// - `true`
pub const PROCESS_PARENT_CODE_SIGNATURE_TRUSTED: &str = "process.parent.code_signature.trusted";
/// Boolean to capture if the digital signature is verified against the binary content.
/// Leave unpopulated if a certificate was unchecked.
///
/// # Examples
///
/// - `true`
pub const PROCESS_PARENT_CODE_SIGNATURE_VALID: &str = "process.parent.code_signature.valid";
/// Full command line that started the process, including the absolute path to the executable, and all arguments.
/// Some arguments may be filtered to protect sensitive information.
///
/// # Examples
///
/// - `/usr/bin/ssh -l user 10.0.0.16`
pub const PROCESS_PARENT_COMMAND_LINE: &str = "process.parent.command_line";
/// Unique identifier for the process.
/// The implementation of this is specified by the data source, but some examples of what could be used here are a process-generated UUID, Sysmon Process GUIDs, or a hash of some uniquely identifying components of a process.
/// Constructing a globally unique identifier is a common practice to mitigate PID reuse as well as to identify a specific process over time, across multiple monitored hosts.
///
/// # Examples
///
/// - `c2c455d9f99375d`
pub const PROCESS_PARENT_ENTITY_ID: &str = "process.parent.entity_id";
/// Absolute path to the process executable.
///
/// # Examples
///
/// - `/usr/bin/ssh`
pub const PROCESS_PARENT_EXECUTABLE: &str = "process.parent.executable";
/// The exit code of the process, if this is a termination event.
/// The field should be absent if there is no exit code for the event (e.g. process start).
///
/// # Examples
///
/// - `137`
pub const PROCESS_PARENT_EXIT_CODE: &str = "process.parent.exit_code";
/// MD5 hash.
pub const PROCESS_PARENT_HASH_MD5: &str = "process.parent.hash.md5";
/// SHA1 hash.
pub const PROCESS_PARENT_HASH_SHA1: &str = "process.parent.hash.sha1";
/// SHA256 hash.
pub const PROCESS_PARENT_HASH_SHA256: &str = "process.parent.hash.sha256";
/// SHA512 hash.
pub const PROCESS_PARENT_HASH_SHA512: &str = "process.parent.hash.sha512";
/// SSDEEP hash.
pub const PROCESS_PARENT_HASH_SSDEEP: &str = "process.parent.hash.ssdeep";
/// Process name.
/// Sometimes called program name or similar.
///
/// # Examples
///
/// - `ssh`
pub const PROCESS_PARENT_NAME: &str = "process.parent.name";
/// CPU architecture target for the file.
///
/// # Examples
///
/// - `x64`
pub const PROCESS_PARENT_PE_ARCHITECTURE: &str = "process.parent.pe.architecture";
/// Internal company name of the file, provided at compile-time.
///
/// # Examples
///
/// - `Microsoft Corporation`
pub const PROCESS_PARENT_PE_COMPANY: &str = "process.parent.pe.company";
/// Internal description of the file, provided at compile-time.
///
/// # Examples
///
/// - `Paint`
pub const PROCESS_PARENT_PE_DESCRIPTION: &str = "process.parent.pe.description";
/// Internal version of the file, provided at compile-time.
///
/// # Examples
///
/// - `6.3.9600.17415`
pub const PROCESS_PARENT_PE_FILE_VERSION: &str = "process.parent.pe.file_version";
/// A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
/// Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
///
/// # Examples
///
/// - `0c6803c4e922103c4dca5963aad36ddf`
pub const PROCESS_PARENT_PE_IMPHASH: &str = "process.parent.pe.imphash";
/// Internal name of the file, provided at compile-time.
///
/// # Examples
///
/// - `MSPAINT.EXE`
pub const PROCESS_PARENT_PE_ORIGINAL_FILE_NAME: &str = "process.parent.pe.original_file_name";
/// Internal product name of the file, provided at compile-time.
///
/// # Examples
///
/// - `Microsoft® Windows® Operating System`
pub const PROCESS_PARENT_PE_PRODUCT: &str = "process.parent.pe.product";
/// Identifier of the group of processes the process belongs to.
pub const PROCESS_PARENT_PGID: &str = "process.parent.pgid";
/// Process id.
///
/// # Examples
///
/// - `4242`
pub const PROCESS_PARENT_PID: &str = "process.parent.pid";
/// Parent process' pid.
///
/// # Examples
///
/// - `4241`
pub const PROCESS_PARENT_PPID: &str = "process.parent.ppid";
/// The time the process started.
///
/// # Examples
///
/// - `2016-05-23T08:05:34.853Z`
pub const PROCESS_PARENT_START: &str = "process.parent.start";
/// Thread ID.
///
/// # Examples
///
/// - `4242`
pub const PROCESS_PARENT_THREAD_ID: &str = "process.parent.thread.id";
/// Thread name.
///
/// # Examples
///
/// - `thread-0`
pub const PROCESS_PARENT_THREAD_NAME: &str = "process.parent.thread.name";
/// Process title.
/// The proctitle, some times the same as process name. Can also be different: for example a browser setting its title to the web page currently opened.
pub const PROCESS_PARENT_TITLE: &str = "process.parent.title";
/// Seconds the process has been up.
///
/// # Examples
///
/// - `1325`
pub const PROCESS_PARENT_UPTIME: &str = "process.parent.uptime";
/// The working directory of the process.
///
/// # Examples
///
/// - `/home/alice`
pub const PROCESS_PARENT_WORKING_DIRECTORY: &str = "process.parent.working_directory";
/// CPU architecture target for the file.
///
/// # Examples
///
/// - `x64`
pub const PROCESS_PE_ARCHITECTURE: &str = "process.pe.architecture";
/// Internal company name of the file, provided at compile-time.
///
/// # Examples
///
/// - `Microsoft Corporation`
pub const PROCESS_PE_COMPANY: &str = "process.pe.company";
/// Internal description of the file, provided at compile-time.
///
/// # Examples
///
/// - `Paint`
pub const PROCESS_PE_DESCRIPTION: &str = "process.pe.description";
/// Internal version of the file, provided at compile-time.
///
/// # Examples
///
/// - `6.3.9600.17415`
pub const PROCESS_PE_FILE_VERSION: &str = "process.pe.file_version";
/// A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
/// Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
///
/// # Examples
///
/// - `0c6803c4e922103c4dca5963aad36ddf`
pub const PROCESS_PE_IMPHASH: &str = "process.pe.imphash";
/// Internal name of the file, provided at compile-time.
///
/// # Examples
///
/// - `MSPAINT.EXE`
pub const PROCESS_PE_ORIGINAL_FILE_NAME: &str = "process.pe.original_file_name";
/// Internal product name of the file, provided at compile-time.
///
/// # Examples
///
/// - `Microsoft® Windows® Operating System`
pub const PROCESS_PE_PRODUCT: &str = "process.pe.product";
/// Identifier of the group of processes the process belongs to.
pub const PROCESS_PGID: &str = "process.pgid";
/// Process id.
///
/// # Examples
///
/// - `4242`
pub const PROCESS_PID: &str = "process.pid";
/// Parent process' pid.
///
/// # Examples
///
/// - `4241`
pub const PROCESS_PPID: &str = "process.ppid";
/// The time the process started.
///
/// # Examples
///
/// - `2016-05-23T08:05:34.853Z`
pub const PROCESS_START: &str = "process.start";
/// Thread ID.
///
/// # Examples
///
/// - `4242`
pub const PROCESS_THREAD_ID: &str = "process.thread.id";
/// Thread name.
///
/// # Examples
///
/// - `thread-0`
pub const PROCESS_THREAD_NAME: &str = "process.thread.name";
/// Process title.
/// The proctitle, some times the same as process name. Can also be different: for example a browser setting its title to the web page currently opened.
pub const PROCESS_TITLE: &str = "process.title";
/// Seconds the process has been up.
///
/// # Examples
///
/// - `1325`
pub const PROCESS_UPTIME: &str = "process.uptime";
/// The working directory of the process.
///
/// # Examples
///
/// - `/home/alice`
pub const PROCESS_WORKING_DIRECTORY: &str = "process.working_directory";
}
/// Fields related to Windows Registry operations.
pub mod registry {
/// Original bytes written with base64 encoding.
/// For Windows registry operations, such as SetValueEx and RegQueryValueEx, this corresponds to the data pointed by `lp_data`. This is optional but provides better recoverability and should be populated for REG_BINARY encoded values.
///
/// # Examples
///
/// - `ZQBuAC0AVQBTAAAAZQBuAAAAAAA=`
pub const REGISTRY_DATA_BYTES: &str = "registry.data.bytes";
/// Content when writing string types.
/// Populated as an array when writing string data to the registry. For single string registry types (REG_SZ, REG_EXPAND_SZ), this should be an array with one string. For sequences of string with REG_MULTI_SZ, this array will be variable length. For numeric data, such as REG_DWORD and REG_QWORD, this should be populated with the decimal representation (e.g `"1"`).
///
/// # Examples
///
/// - `["C:\rta\red_ttp\bin\myapp.exe"]`
pub const REGISTRY_DATA_STRINGS: &str = "registry.data.strings";
/// Standard registry type for encoding contents
///
/// # Examples
///
/// - `REG_SZ`
pub const REGISTRY_DATA_TYPE: &str = "registry.data.type";
/// Abbreviated name for the hive.
///
/// # Examples
///
/// - `HKLM`
pub const REGISTRY_HIVE: &str = "registry.hive";
/// Hive-relative path of keys.
///
/// # Examples
///
/// - `SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe`
pub const REGISTRY_KEY: &str = "registry.key";
/// Full path, including hive, key and value
///
/// # Examples
///
/// - `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe\Debugger`
pub const REGISTRY_PATH: &str = "registry.path";
/// Name of the value written.
///
/// # Examples
///
/// - `Debugger`
pub const REGISTRY_VALUE: &str = "registry.value";
}
/// This field set is meant to facilitate pivoting around a piece of data.
/// Some pieces of information can be seen in many places in an ECS event. To facilitate searching for them, store an array of all seen values to their corresponding field in `related.`.
/// A concrete example is IP addresses, which can be under host, observer, source, destination, client, server, and network.forwarded_ip. If you append all IPs to `related.ip`, you can then search for a given IP trivially, no matter where it appeared, by querying `related.ip:192.0.2.15`.
pub mod related {
/// All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search).
pub const RELATED_HASH: &str = "related.hash";
/// All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases.
pub const RELATED_HOSTS: &str = "related.hosts";
/// All of the IPs seen on your event.
pub const RELATED_IP: &str = "related.ip";
/// All the user names seen on your event.
pub const RELATED_USER: &str = "related.user";
}
/// Rule fields are used to capture the specifics of any observer or agent rules that generate alerts or other notable events.
/// Examples of data sources that would populate the rule fields include: network admission control platforms, network or host IDS/IPS, network firewalls, web application firewalls, url filters, endpoint detection and response (EDR) systems, etc.
pub mod rule {
/// Name, organization, or pseudonym of the author or authors who created the rule used to generate this event.
///
/// # Examples
///
/// - `["Star-Lord"]`
pub const RULE_AUTHOR: &str = "rule.author";
/// A categorization value keyword used by the entity using the rule for detection of this event.
///
/// # Examples
///
/// - `Attempted Information Leak`
pub const RULE_CATEGORY: &str = "rule.category";
/// The description of the rule generating the event.
///
/// # Examples
///
/// - `Block requests to public DNS over HTTPS / TLS protocols`
pub const RULE_DESCRIPTION: &str = "rule.description";
/// A rule ID that is unique within the scope of an agent, observer, or other entity using the rule for detection of this event.
///
/// # Examples
///
/// - `101`
pub const RULE_ID: &str = "rule.id";
/// Name of the license under which the rule used to generate this event is made available.
///
/// # Examples
///
/// - `Apache 2.0`
pub const RULE_LICENSE: &str = "rule.license";
/// The name of the rule or signature generating the event.
///
/// # Examples
///
/// - `BLOCK_DNS_over_TLS`
pub const RULE_NAME: &str = "rule.name";
/// Reference URL to additional information about the rule used to generate this event.
/// The URL can point to the vendor's documentation about the rule. If that's not available, it can also be a link to a more general page describing this type of alert.
///
/// # Examples
///
/// - `https://en.wikipedia.org/wiki/DNS_over_TLS`
pub const RULE_REFERENCE: &str = "rule.reference";
/// Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member.
///
/// # Examples
///
/// - `Standard_Protocol_Filters`
pub const RULE_RULESET: &str = "rule.ruleset";
/// A rule ID that is unique within the scope of a set or group of agents, observers, or other entities using the rule for detection of this event.
///
/// # Examples
///
/// - `1100110011`
pub const RULE_UUID: &str = "rule.uuid";
/// The version / revision of the rule being used for analysis.
///
/// # Examples
///
/// - `1.1`
pub const RULE_VERSION: &str = "rule.version";
}
/// A Server is defined as the responder in a network connection for events regarding sessions, connections, or bidirectional flow records.
/// For TCP events, the server is the receiver of the initial SYN packet(s) of the TCP connection. For other protocols, the server is generally the responder in the network transaction. Some systems actually use the term "responder" to refer the server in TCP connections. The server fields describe details about the system acting as the server in the network event. Server fields are usually populated in conjunction with client fields. Server fields are generally not populated for packet-level events.
/// Client / server representations can add semantic context to an exchange, which is helpful to visualize the data in certain situations. If your context falls in that category, you should still ensure that source and destination are filled appropriately.
pub mod server {
/// Some event server addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field.
/// Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
pub const SERVER_ADDRESS: &str = "server.address";
/// Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
///
/// # Examples
///
/// - `15169`
pub const SERVER_AS_NUMBER: &str = "server.as.number";
/// Organization name.
///
/// # Examples
///
/// - `Google LLC`
pub const SERVER_AS_ORGANIZATION_NAME: &str = "server.as.organization.name";
/// Bytes sent from the server to the client.
///
/// # Examples
///
/// - `184`
pub const SERVER_BYTES: &str = "server.bytes";
/// Server domain.
pub const SERVER_DOMAIN: &str = "server.domain";
/// City name.
///
/// # Examples
///
/// - `Montreal`
pub const SERVER_GEO_CITY_NAME: &str = "server.geo.city_name";
/// Two-letter code representing continent's name.
///
/// # Examples
///
/// - `NA`
pub const SERVER_GEO_CONTINENT_CODE: &str = "server.geo.continent_code";
/// Name of the continent.
///
/// # Examples
///
/// - `North America`
pub const SERVER_GEO_CONTINENT_NAME: &str = "server.geo.continent_name";
/// Country ISO code.
///
/// # Examples
///
/// - `CA`
pub const SERVER_GEO_COUNTRY_ISO_CODE: &str = "server.geo.country_iso_code";
/// Country name.
///
/// # Examples
///
/// - `Canada`
pub const SERVER_GEO_COUNTRY_NAME: &str = "server.geo.country_name";
/// Longitude and latitude.
///
/// # Examples
///
/// - `{ "lon": -73.614830, "lat": 45.505918 }`
pub const SERVER_GEO_LOCATION: &str = "server.geo.location";
/// User-defined description of a location, at the level of granularity they care about.
/// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
/// Not typically used in automated geolocation.
///
/// # Examples
///
/// - `boston-dc`
pub const SERVER_GEO_NAME: &str = "server.geo.name";
/// Postal code associated with the location.
/// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
///
/// # Examples
///
/// - `94040`
pub const SERVER_GEO_POSTAL_CODE: &str = "server.geo.postal_code";
/// Region ISO code.
///
/// # Examples
///
/// - `CA-QC`
pub const SERVER_GEO_REGION_ISO_CODE: &str = "server.geo.region_iso_code";
/// Region name.
///
/// # Examples
///
/// - `Quebec`
pub const SERVER_GEO_REGION_NAME: &str = "server.geo.region_name";
/// The time zone of the location, such as IANA time zone name.
///
/// # Examples
///
/// - `America/Argentina/Buenos_Aires`
pub const SERVER_GEO_TIMEZONE: &str = "server.geo.timezone";
/// IP address of the server (IPv4 or IPv6).
pub const SERVER_IP: &str = "server.ip";
/// MAC address of the server.
/// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
///
/// # Examples
///
/// - `00-00-5E-00-53-23`
pub const SERVER_MAC: &str = "server.mac";
/// Translated ip of destination based NAT sessions (e.g. internet to private DMZ)
/// Typically used with load balancers, firewalls, or routers.
pub const SERVER_NAT_IP: &str = "server.nat.ip";
/// Translated port of destination based NAT sessions (e.g. internet to private DMZ)
/// Typically used with load balancers, firewalls, or routers.
pub const SERVER_NAT_PORT: &str = "server.nat.port";
/// Packets sent from the server to the client.
///
/// # Examples
///
/// - `12`
pub const SERVER_PACKETS: &str = "server.packets";
/// Port of the server.
pub const SERVER_PORT: &str = "server.port";
/// The highest registered server domain, stripped of the subdomain.
/// For example, the registered domain for "foo.example.com" is "example.com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
///
/// # Examples
///
/// - `example.com`
pub const SERVER_REGISTERED_DOMAIN: &str = "server.registered_domain";
/// The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
/// For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
///
/// # Examples
///
/// - `east`
pub const SERVER_SUBDOMAIN: &str = "server.subdomain";
/// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
///
/// # Examples
///
/// - `co.uk`
pub const SERVER_TOP_LEVEL_DOMAIN: &str = "server.top_level_domain";
/// Name of the directory the user is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const SERVER_USER_DOMAIN: &str = "server.user.domain";
/// User email address.
pub const SERVER_USER_EMAIL: &str = "server.user.email";
/// User's full name, if available.
///
/// # Examples
///
/// - `Albert Einstein`
pub const SERVER_USER_FULL_NAME: &str = "server.user.full_name";
/// Name of the directory the group is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const SERVER_USER_GROUP_DOMAIN: &str = "server.user.group.domain";
/// Unique identifier for the group on the system/platform.
pub const SERVER_USER_GROUP_ID: &str = "server.user.group.id";
/// Name of the group.
pub const SERVER_USER_GROUP_NAME: &str = "server.user.group.name";
/// Unique user hash to correlate information for a user in anonymized form.
/// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
pub const SERVER_USER_HASH: &str = "server.user.hash";
/// Unique identifier of the user.
pub const SERVER_USER_ID: &str = "server.user.id";
/// Short name or login of the user.
///
/// # Examples
///
/// - `albert`
pub const SERVER_USER_NAME: &str = "server.user.name";
/// Array of user roles at the time of the event.
///
/// # Examples
///
/// - `["kibana_admin", "reporting_user"]`
pub const SERVER_USER_ROLES: &str = "server.user.roles";
}
/// The service fields describe the service for or from which the data was collected.
/// These fields help you find and correlate logs for a specific service and version.
pub mod service {
/// Ephemeral identifier of this service (if one exists).
/// This id normally changes across restarts, but `service.id` does not.
///
/// # Examples
///
/// - `8a4f500f`
pub const SERVICE_EPHEMERAL_ID: &str = "service.ephemeral_id";
/// Unique identifier of the running service. If the service is comprised of many nodes, the `service.id` should be the same for all nodes.
/// This id should uniquely identify the service. This makes it possible to correlate logs and metrics for one specific service, no matter which particular node emitted the event.
/// Note that if you need to see the events from one specific host of the service, you should filter on that `host.name` or `host.id` instead.
///
/// # Examples
///
/// - `d37e5ebfe0ae6c4972dbe9f0174a1637bb8247f6`
pub const SERVICE_ID: &str = "service.id";
/// Name of the service data is collected from.
/// The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name.
/// In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified.
///
/// # Examples
///
/// - `elasticsearch-metrics`
pub const SERVICE_NAME: &str = "service.name";
/// Name of a service node.
/// This allows for two nodes of the same service running on the same host to be differentiated. Therefore, `service.node.name` should typically be unique across nodes of a given service.
/// In the case of Elasticsearch, the `service.node.name` could contain the unique node name within the Elasticsearch cluster. In cases where the service doesn't have the concept of a node name, the host name or container name can be used to distinguish running instances that make up this service. If those do not provide uniqueness (e.g. multiple instances of the service running on the same host) - the node name can be manually set.
///
/// # Examples
///
/// - `instance-0000000016`
pub const SERVICE_NODE_NAME: &str = "service.node.name";
/// Current state of the service.
pub const SERVICE_STATE: &str = "service.state";
/// The type of the service data is collected from.
/// The type can be used to group and correlate logs and metrics from one service type.
/// Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`.
///
/// # Examples
///
/// - `elasticsearch`
pub const SERVICE_TYPE: &str = "service.type";
/// Version of the service the data was collected from.
/// This allows to look at a data set only for a specific version of a service.
///
/// # Examples
///
/// - `3.2.4`
pub const SERVICE_VERSION: &str = "service.version";
}
/// Source fields capture details about the sender of a network exchange/packet. These fields are populated from a network event, packet, or other event containing details of a network transaction.
/// Source fields are usually populated in conjunction with destination fields. The source and destination fields are considered the baseline and should always be filled if an event contains source and destination details from a network transaction. If the event also contains identification of the client and server roles, then the client and server fields should also be populated.
pub mod source {
/// Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field.
/// Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
pub const SOURCE_ADDRESS: &str = "source.address";
/// Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
///
/// # Examples
///
/// - `15169`
pub const SOURCE_AS_NUMBER: &str = "source.as.number";
/// Organization name.
///
/// # Examples
///
/// - `Google LLC`
pub const SOURCE_AS_ORGANIZATION_NAME: &str = "source.as.organization.name";
/// Bytes sent from the source to the destination.
///
/// # Examples
///
/// - `184`
pub const SOURCE_BYTES: &str = "source.bytes";
/// Source domain.
pub const SOURCE_DOMAIN: &str = "source.domain";
/// City name.
///
/// # Examples
///
/// - `Montreal`
pub const SOURCE_GEO_CITY_NAME: &str = "source.geo.city_name";
/// Two-letter code representing continent's name.
///
/// # Examples
///
/// - `NA`
pub const SOURCE_GEO_CONTINENT_CODE: &str = "source.geo.continent_code";
/// Name of the continent.
///
/// # Examples
///
/// - `North America`
pub const SOURCE_GEO_CONTINENT_NAME: &str = "source.geo.continent_name";
/// Country ISO code.
///
/// # Examples
///
/// - `CA`
pub const SOURCE_GEO_COUNTRY_ISO_CODE: &str = "source.geo.country_iso_code";
/// Country name.
///
/// # Examples
///
/// - `Canada`
pub const SOURCE_GEO_COUNTRY_NAME: &str = "source.geo.country_name";
/// Longitude and latitude.
///
/// # Examples
///
/// - `{ "lon": -73.614830, "lat": 45.505918 }`
pub const SOURCE_GEO_LOCATION: &str = "source.geo.location";
/// User-defined description of a location, at the level of granularity they care about.
/// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
/// Not typically used in automated geolocation.
///
/// # Examples
///
/// - `boston-dc`
pub const SOURCE_GEO_NAME: &str = "source.geo.name";
/// Postal code associated with the location.
/// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
///
/// # Examples
///
/// - `94040`
pub const SOURCE_GEO_POSTAL_CODE: &str = "source.geo.postal_code";
/// Region ISO code.
///
/// # Examples
///
/// - `CA-QC`
pub const SOURCE_GEO_REGION_ISO_CODE: &str = "source.geo.region_iso_code";
/// Region name.
///
/// # Examples
///
/// - `Quebec`
pub const SOURCE_GEO_REGION_NAME: &str = "source.geo.region_name";
/// The time zone of the location, such as IANA time zone name.
///
/// # Examples
///
/// - `America/Argentina/Buenos_Aires`
pub const SOURCE_GEO_TIMEZONE: &str = "source.geo.timezone";
/// IP address of the source (IPv4 or IPv6).
pub const SOURCE_IP: &str = "source.ip";
/// MAC address of the source.
/// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
///
/// # Examples
///
/// - `00-00-5E-00-53-23`
pub const SOURCE_MAC: &str = "source.mac";
/// Translated ip of source based NAT sessions (e.g. internal client to internet)
/// Typically connections traversing load balancers, firewalls, or routers.
pub const SOURCE_NAT_IP: &str = "source.nat.ip";
/// Translated port of source based NAT sessions. (e.g. internal client to internet)
/// Typically used with load balancers, firewalls, or routers.
pub const SOURCE_NAT_PORT: &str = "source.nat.port";
/// Packets sent from the source to the destination.
///
/// # Examples
///
/// - `12`
pub const SOURCE_PACKETS: &str = "source.packets";
/// Port of the source.
pub const SOURCE_PORT: &str = "source.port";
/// The highest registered source domain, stripped of the subdomain.
/// For example, the registered domain for "foo.example.com" is "example.com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
///
/// # Examples
///
/// - `example.com`
pub const SOURCE_REGISTERED_DOMAIN: &str = "source.registered_domain";
/// The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
/// For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
///
/// # Examples
///
/// - `east`
pub const SOURCE_SUBDOMAIN: &str = "source.subdomain";
/// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
///
/// # Examples
///
/// - `co.uk`
pub const SOURCE_TOP_LEVEL_DOMAIN: &str = "source.top_level_domain";
/// Name of the directory the user is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const SOURCE_USER_DOMAIN: &str = "source.user.domain";
/// User email address.
pub const SOURCE_USER_EMAIL: &str = "source.user.email";
/// User's full name, if available.
///
/// # Examples
///
/// - `Albert Einstein`
pub const SOURCE_USER_FULL_NAME: &str = "source.user.full_name";
/// Name of the directory the group is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const SOURCE_USER_GROUP_DOMAIN: &str = "source.user.group.domain";
/// Unique identifier for the group on the system/platform.
pub const SOURCE_USER_GROUP_ID: &str = "source.user.group.id";
/// Name of the group.
pub const SOURCE_USER_GROUP_NAME: &str = "source.user.group.name";
/// Unique user hash to correlate information for a user in anonymized form.
/// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
pub const SOURCE_USER_HASH: &str = "source.user.hash";
/// Unique identifier of the user.
pub const SOURCE_USER_ID: &str = "source.user.id";
/// Short name or login of the user.
///
/// # Examples
///
/// - `albert`
pub const SOURCE_USER_NAME: &str = "source.user.name";
/// Array of user roles at the time of the event.
///
/// # Examples
///
/// - `["kibana_admin", "reporting_user"]`
pub const SOURCE_USER_ROLES: &str = "source.user.roles";
}
/// Fields to classify events and alerts according to a threat taxonomy such as the MITRE ATT&CK® framework.
/// These fields are for users to classify alerts from all of their sources (e.g. IDS, NGFW, etc.) within a common taxonomy. The threat.tactic.* are meant to capture the high level category of the threat (e.g. "impact"). The threat.technique.* fields are meant to capture which kind of approach is used by this detected threat, to accomplish the goal (e.g. "endpoint denial of service").
pub mod threat {
/// Name of the threat framework used to further categorize and classify the tactic and technique of the reported threat. Framework classification can be provided by detecting systems, evaluated at ingest time, or retrospectively tagged to events.
///
/// # Examples
///
/// - `MITRE ATT&CK`
pub const THREAT_FRAMEWORK: &str = "threat.framework";
/// The id of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/ )
///
/// # Examples
///
/// - `TA0002`
pub const THREAT_TACTIC_ID: &str = "threat.tactic.id";
/// Name of the type of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/)
///
/// # Examples
///
/// - `Execution`
pub const THREAT_TACTIC_NAME: &str = "threat.tactic.name";
/// The reference url of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/ )
///
/// # Examples
///
/// - `https://attack.mitre.org/tactics/TA0002/`
pub const THREAT_TACTIC_REFERENCE: &str = "threat.tactic.reference";
/// The id of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/)
///
/// # Examples
///
/// - `T1059`
pub const THREAT_TECHNIQUE_ID: &str = "threat.technique.id";
/// The name of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/)
///
/// # Examples
///
/// - `Command and Scripting Interpreter`
pub const THREAT_TECHNIQUE_NAME: &str = "threat.technique.name";
/// The reference url of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/)
///
/// # Examples
///
/// - `https://attack.mitre.org/techniques/T1059/`
pub const THREAT_TECHNIQUE_REFERENCE: &str = "threat.technique.reference";
/// The full id of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/)
///
/// # Examples
///
/// - `T1059.001`
pub const THREAT_TECHNIQUE_SUBTECHNIQUE_ID: &str = "threat.technique.subtechnique.id";
/// The name of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/)
///
/// # Examples
///
/// - `PowerShell`
pub const THREAT_TECHNIQUE_SUBTECHNIQUE_NAME: &str = "threat.technique.subtechnique.name";
/// The reference url of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/)
///
/// # Examples
///
/// - `https://attack.mitre.org/techniques/T1059/001/`
pub const THREAT_TECHNIQUE_SUBTECHNIQUE_REFERENCE: &str =
"threat.technique.subtechnique.reference";
}
/// Fields related to a TLS connection. These fields focus on the TLS protocol itself and intentionally avoids in-depth analysis of the related x.509 certificate files.
pub mod tls {
/// String indicating the cipher used during the current connection.
///
/// # Examples
///
/// - `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256`
pub const TLS_CIPHER: &str = "tls.cipher";
/// PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of `client.certificate_chain` since this value also exists in that list.
///
/// # Examples
///
/// - `MII...`
pub const TLS_CLIENT_CERTIFICATE: &str = "tls.client.certificate";
/// Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of `client.certificate` since that value should be the first certificate in the chain.
///
/// # Examples
///
/// - `["MII...", "MII..."]`
pub const TLS_CLIENT_CERTIFICATE_CHAIN: &str = "tls.client.certificate_chain";
/// Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
///
/// # Examples
///
/// - `0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC`
pub const TLS_CLIENT_HASH_MD5: &str = "tls.client.hash.md5";
/// Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
///
/// # Examples
///
/// - `9E393D93138888D288266C2D915214D1D1CCEB2A`
pub const TLS_CLIENT_HASH_SHA1: &str = "tls.client.hash.sha1";
/// Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
///
/// # Examples
///
/// - `0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0`
pub const TLS_CLIENT_HASH_SHA256: &str = "tls.client.hash.sha256";
/// Distinguished name of subject of the issuer of the x.509 certificate presented by the client.
///
/// # Examples
///
/// - `CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com`
pub const TLS_CLIENT_ISSUER: &str = "tls.client.issuer";
/// A hash that identifies clients based on how they perform an SSL/TLS handshake.
///
/// # Examples
///
/// - `d4e5b18d6b55c71272893221c96ba240`
pub const TLS_CLIENT_JA3: &str = "tls.client.ja3";
/// Date/Time indicating when client certificate is no longer considered valid.
///
/// # Examples
///
/// - `2021-01-01T00:00:00.000Z`
pub const TLS_CLIENT_NOT_AFTER: &str = "tls.client.not_after";
/// Date/Time indicating when client certificate is first considered valid.
///
/// # Examples
///
/// - `1970-01-01T00:00:00.000Z`
pub const TLS_CLIENT_NOT_BEFORE: &str = "tls.client.not_before";
/// Also called an SNI, this tells the server which hostname to which the client is attempting to connect to. When this value is available, it should get copied to `destination.domain`.
///
/// # Examples
///
/// - `www.elastic.co`
pub const TLS_CLIENT_SERVER_NAME: &str = "tls.client.server_name";
/// Distinguished name of subject of the x.509 certificate presented by the client.
///
/// # Examples
///
/// - `CN=myclient, OU=Documentation Team, DC=example, DC=com`
pub const TLS_CLIENT_SUBJECT: &str = "tls.client.subject";
/// Array of ciphers offered by the client during the client hello.
///
/// # Examples
///
/// - `["TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."]`
pub const TLS_CLIENT_SUPPORTED_CIPHERS: &str = "tls.client.supported_ciphers";
/// List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
///
/// # Examples
///
/// - `*.elastic.co`
pub const TLS_CLIENT_X509_ALTERNATIVE_NAMES: &str = "tls.client.x509.alternative_names";
/// List of common name (CN) of issuing certificate authority.
///
/// # Examples
///
/// - `Example SHA2 High Assurance Server CA`
pub const TLS_CLIENT_X509_ISSUER_COMMON_NAME: &str = "tls.client.x509.issuer.common_name";
/// List of country (C) codes
///
/// # Examples
///
/// - `US`
pub const TLS_CLIENT_X509_ISSUER_COUNTRY: &str = "tls.client.x509.issuer.country";
/// Distinguished name (DN) of issuing certificate authority.
///
/// # Examples
///
/// - `C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA`
pub const TLS_CLIENT_X509_ISSUER_DISTINGUISHED_NAME: &str =
"tls.client.x509.issuer.distinguished_name";
/// List of locality names (L)
///
/// # Examples
///
/// - `Mountain View`
pub const TLS_CLIENT_X509_ISSUER_LOCALITY: &str = "tls.client.x509.issuer.locality";
/// List of organizations (O) of issuing certificate authority.
///
/// # Examples
///
/// - `Example Inc`
pub const TLS_CLIENT_X509_ISSUER_ORGANIZATION: &str = "tls.client.x509.issuer.organization";
/// List of organizational units (OU) of issuing certificate authority.
///
/// # Examples
///
/// - `www.example.com`
pub const TLS_CLIENT_X509_ISSUER_ORGANIZATIONAL_UNIT: &str =
"tls.client.x509.issuer.organizational_unit";
/// List of state or province names (ST, S, or P)
///
/// # Examples
///
/// - `California`
pub const TLS_CLIENT_X509_ISSUER_STATE_OR_PROVINCE: &str =
"tls.client.x509.issuer.state_or_province";
/// Time at which the certificate is no longer considered valid.
///
/// # Examples
///
/// - `2020-07-16 03:15:39+00:00`
pub const TLS_CLIENT_X509_NOT_AFTER: &str = "tls.client.x509.not_after";
/// Time at which the certificate is first considered valid.
///
/// # Examples
///
/// - `2019-08-16 01:40:25+00:00`
pub const TLS_CLIENT_X509_NOT_BEFORE: &str = "tls.client.x509.not_before";
/// Algorithm used to generate the public key.
///
/// # Examples
///
/// - `RSA`
pub const TLS_CLIENT_X509_PUBLIC_KEY_ALGORITHM: &str = "tls.client.x509.public_key_algorithm";
/// The curve used by the elliptic curve public key algorithm. This is algorithm specific.
///
/// # Examples
///
/// - `nistp521`
pub const TLS_CLIENT_X509_PUBLIC_KEY_CURVE: &str = "tls.client.x509.public_key_curve";
/// Exponent used to derive the public key. This is algorithm specific.
///
/// # Examples
///
/// - `65537`
pub const TLS_CLIENT_X509_PUBLIC_KEY_EXPONENT: &str = "tls.client.x509.public_key_exponent";
/// The size of the public key space in bits.
///
/// # Examples
///
/// - `2048`
pub const TLS_CLIENT_X509_PUBLIC_KEY_SIZE: &str = "tls.client.x509.public_key_size";
/// Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
///
/// # Examples
///
/// - `55FBB9C7DEBF09809D12CCAA`
pub const TLS_CLIENT_X509_SERIAL_NUMBER: &str = "tls.client.x509.serial_number";
/// Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
///
/// # Examples
///
/// - `SHA256-RSA`
pub const TLS_CLIENT_X509_SIGNATURE_ALGORITHM: &str = "tls.client.x509.signature_algorithm";
/// List of common names (CN) of subject.
///
/// # Examples
///
/// - `shared.global.example.net`
pub const TLS_CLIENT_X509_SUBJECT_COMMON_NAME: &str = "tls.client.x509.subject.common_name";
/// List of country (C) code
///
/// # Examples
///
/// - `US`
pub const TLS_CLIENT_X509_SUBJECT_COUNTRY: &str = "tls.client.x509.subject.country";
/// Distinguished name (DN) of the certificate subject entity.
///
/// # Examples
///
/// - `C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net`
pub const TLS_CLIENT_X509_SUBJECT_DISTINGUISHED_NAME: &str =
"tls.client.x509.subject.distinguished_name";
/// List of locality names (L)
///
/// # Examples
///
/// - `San Francisco`
pub const TLS_CLIENT_X509_SUBJECT_LOCALITY: &str = "tls.client.x509.subject.locality";
/// List of organizations (O) of subject.
///
/// # Examples
///
/// - `Example, Inc.`
pub const TLS_CLIENT_X509_SUBJECT_ORGANIZATION: &str = "tls.client.x509.subject.organization";
/// List of organizational units (OU) of subject.
pub const TLS_CLIENT_X509_SUBJECT_ORGANIZATIONAL_UNIT: &str =
"tls.client.x509.subject.organizational_unit";
/// List of state or province names (ST, S, or P)
///
/// # Examples
///
/// - `California`
pub const TLS_CLIENT_X509_SUBJECT_STATE_OR_PROVINCE: &str =
"tls.client.x509.subject.state_or_province";
/// Version of x509 format.
///
/// # Examples
///
/// - `3`
pub const TLS_CLIENT_X509_VERSION_NUMBER: &str = "tls.client.x509.version_number";
/// String indicating the curve used for the given cipher, when applicable.
///
/// # Examples
///
/// - `secp256r1`
pub const TLS_CURVE: &str = "tls.curve";
/// Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel.
pub const TLS_ESTABLISHED: &str = "tls.established";
/// String indicating the protocol being tunneled. Per the values in the IANA registry (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case.
///
/// # Examples
///
/// - `http/1.1`
pub const TLS_NEXT_PROTOCOL: &str = "tls.next_protocol";
/// Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation.
pub const TLS_RESUMED: &str = "tls.resumed";
/// PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of `server.certificate_chain` since this value also exists in that list.
///
/// # Examples
///
/// - `MII...`
pub const TLS_SERVER_CERTIFICATE: &str = "tls.server.certificate";
/// Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of `server.certificate` since that value should be the first certificate in the chain.
///
/// # Examples
///
/// - `["MII...", "MII..."]`
pub const TLS_SERVER_CERTIFICATE_CHAIN: &str = "tls.server.certificate_chain";
/// Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
///
/// # Examples
///
/// - `0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC`
pub const TLS_SERVER_HASH_MD5: &str = "tls.server.hash.md5";
/// Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
///
/// # Examples
///
/// - `9E393D93138888D288266C2D915214D1D1CCEB2A`
pub const TLS_SERVER_HASH_SHA1: &str = "tls.server.hash.sha1";
/// Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
///
/// # Examples
///
/// - `0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0`
pub const TLS_SERVER_HASH_SHA256: &str = "tls.server.hash.sha256";
/// Subject of the issuer of the x.509 certificate presented by the server.
///
/// # Examples
///
/// - `CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com`
pub const TLS_SERVER_ISSUER: &str = "tls.server.issuer";
/// A hash that identifies servers based on how they perform an SSL/TLS handshake.
///
/// # Examples
///
/// - `394441ab65754e2207b1e1b457b3641d`
pub const TLS_SERVER_JA3S: &str = "tls.server.ja3s";
/// Timestamp indicating when server certificate is no longer considered valid.
///
/// # Examples
///
/// - `2021-01-01T00:00:00.000Z`
pub const TLS_SERVER_NOT_AFTER: &str = "tls.server.not_after";
/// Timestamp indicating when server certificate is first considered valid.
///
/// # Examples
///
/// - `1970-01-01T00:00:00.000Z`
pub const TLS_SERVER_NOT_BEFORE: &str = "tls.server.not_before";
/// Subject of the x.509 certificate presented by the server.
///
/// # Examples
///
/// - `CN=www.example.com, OU=Infrastructure Team, DC=example, DC=com`
pub const TLS_SERVER_SUBJECT: &str = "tls.server.subject";
/// List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
///
/// # Examples
///
/// - `*.elastic.co`
pub const TLS_SERVER_X509_ALTERNATIVE_NAMES: &str = "tls.server.x509.alternative_names";
/// List of common name (CN) of issuing certificate authority.
///
/// # Examples
///
/// - `Example SHA2 High Assurance Server CA`
pub const TLS_SERVER_X509_ISSUER_COMMON_NAME: &str = "tls.server.x509.issuer.common_name";
/// List of country (C) codes
///
/// # Examples
///
/// - `US`
pub const TLS_SERVER_X509_ISSUER_COUNTRY: &str = "tls.server.x509.issuer.country";
/// Distinguished name (DN) of issuing certificate authority.
///
/// # Examples
///
/// - `C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA`
pub const TLS_SERVER_X509_ISSUER_DISTINGUISHED_NAME: &str =
"tls.server.x509.issuer.distinguished_name";
/// List of locality names (L)
///
/// # Examples
///
/// - `Mountain View`
pub const TLS_SERVER_X509_ISSUER_LOCALITY: &str = "tls.server.x509.issuer.locality";
/// List of organizations (O) of issuing certificate authority.
///
/// # Examples
///
/// - `Example Inc`
pub const TLS_SERVER_X509_ISSUER_ORGANIZATION: &str = "tls.server.x509.issuer.organization";
/// List of organizational units (OU) of issuing certificate authority.
///
/// # Examples
///
/// - `www.example.com`
pub const TLS_SERVER_X509_ISSUER_ORGANIZATIONAL_UNIT: &str =
"tls.server.x509.issuer.organizational_unit";
/// List of state or province names (ST, S, or P)
///
/// # Examples
///
/// - `California`
pub const TLS_SERVER_X509_ISSUER_STATE_OR_PROVINCE: &str =
"tls.server.x509.issuer.state_or_province";
/// Time at which the certificate is no longer considered valid.
///
/// # Examples
///
/// - `2020-07-16 03:15:39+00:00`
pub const TLS_SERVER_X509_NOT_AFTER: &str = "tls.server.x509.not_after";
/// Time at which the certificate is first considered valid.
///
/// # Examples
///
/// - `2019-08-16 01:40:25+00:00`
pub const TLS_SERVER_X509_NOT_BEFORE: &str = "tls.server.x509.not_before";
/// Algorithm used to generate the public key.
///
/// # Examples
///
/// - `RSA`
pub const TLS_SERVER_X509_PUBLIC_KEY_ALGORITHM: &str = "tls.server.x509.public_key_algorithm";
/// The curve used by the elliptic curve public key algorithm. This is algorithm specific.
///
/// # Examples
///
/// - `nistp521`
pub const TLS_SERVER_X509_PUBLIC_KEY_CURVE: &str = "tls.server.x509.public_key_curve";
/// Exponent used to derive the public key. This is algorithm specific.
///
/// # Examples
///
/// - `65537`
pub const TLS_SERVER_X509_PUBLIC_KEY_EXPONENT: &str = "tls.server.x509.public_key_exponent";
/// The size of the public key space in bits.
///
/// # Examples
///
/// - `2048`
pub const TLS_SERVER_X509_PUBLIC_KEY_SIZE: &str = "tls.server.x509.public_key_size";
/// Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
///
/// # Examples
///
/// - `55FBB9C7DEBF09809D12CCAA`
pub const TLS_SERVER_X509_SERIAL_NUMBER: &str = "tls.server.x509.serial_number";
/// Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
///
/// # Examples
///
/// - `SHA256-RSA`
pub const TLS_SERVER_X509_SIGNATURE_ALGORITHM: &str = "tls.server.x509.signature_algorithm";
/// List of common names (CN) of subject.
///
/// # Examples
///
/// - `shared.global.example.net`
pub const TLS_SERVER_X509_SUBJECT_COMMON_NAME: &str = "tls.server.x509.subject.common_name";
/// List of country (C) code
///
/// # Examples
///
/// - `US`
pub const TLS_SERVER_X509_SUBJECT_COUNTRY: &str = "tls.server.x509.subject.country";
/// Distinguished name (DN) of the certificate subject entity.
///
/// # Examples
///
/// - `C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net`
pub const TLS_SERVER_X509_SUBJECT_DISTINGUISHED_NAME: &str =
"tls.server.x509.subject.distinguished_name";
/// List of locality names (L)
///
/// # Examples
///
/// - `San Francisco`
pub const TLS_SERVER_X509_SUBJECT_LOCALITY: &str = "tls.server.x509.subject.locality";
/// List of organizations (O) of subject.
///
/// # Examples
///
/// - `Example, Inc.`
pub const TLS_SERVER_X509_SUBJECT_ORGANIZATION: &str = "tls.server.x509.subject.organization";
/// List of organizational units (OU) of subject.
pub const TLS_SERVER_X509_SUBJECT_ORGANIZATIONAL_UNIT: &str =
"tls.server.x509.subject.organizational_unit";
/// List of state or province names (ST, S, or P)
///
/// # Examples
///
/// - `California`
pub const TLS_SERVER_X509_SUBJECT_STATE_OR_PROVINCE: &str =
"tls.server.x509.subject.state_or_province";
/// Version of x509 format.
///
/// # Examples
///
/// - `3`
pub const TLS_SERVER_X509_VERSION_NUMBER: &str = "tls.server.x509.version_number";
/// Numeric part of the version parsed from the original string.
///
/// # Examples
///
/// - `1.2`
pub const TLS_VERSION: &str = "tls.version";
/// Normalized lowercase protocol name parsed from original string.
///
/// # Examples
///
/// - `tls`
pub const TLS_VERSION_PROTOCOL: &str = "tls.version_protocol";
}
/// Distributed tracing makes it possible to analyze performance throughout a microservice architecture all in one view. This is accomplished by tracing all of the requests - from the initial web request in the front-end service - to queries made through multiple back-end services.
/// Unlike most field sets in ECS, the tracing fields are *not* nested under the field set name. In other words, the correct field name is `trace.id`, not `tracing.trace.id`, and so on.
pub mod tracing {
/// Unique identifier of the span within the scope of its trace.
/// A span represents an operation within a transaction, such as a request to another service, or a database query.
///
/// # Examples
///
/// - `3ff9a8981b7ccd5a`
pub const SPAN_ID: &str = "span.id";
/// Unique identifier of the trace.
/// A trace groups multiple events like transactions that belong together. For example, a user request handled by multiple inter-connected services.
///
/// # Examples
///
/// - `4bf92f3577b34da6a3ce929d0e0e4736`
pub const TRACE_ID: &str = "trace.id";
/// Unique identifier of the transaction within the scope of its trace.
/// A transaction is the highest level of work measured within a service, such as a request to a server.
///
/// # Examples
///
/// - `00f067aa0ba902b7`
pub const TRANSACTION_ID: &str = "transaction.id";
}
/// URL fields provide support for complete or partial URLs, and supports the breaking down into scheme, domain, path, and so on.
pub mod url {
/// Domain of the url, such as "www.elastic.co".
/// In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the `domain` field.
/// If the URL contains a literal IPv6 address enclosed by `[` and `]` (IETF RFC 2732), the `[` and `]` characters should also be captured in the `domain` field.
///
/// # Examples
///
/// - `www.elastic.co`
pub const URL_DOMAIN: &str = "url.domain";
/// The field contains the file extension from the original request url, excluding the leading dot.
/// The file extension is only set if it exists, as not every url has a file extension.
/// The leading period must not be included. For example, the value must be "png", not ".png".
/// Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
///
/// # Examples
///
/// - `png`
pub const URL_EXTENSION: &str = "url.extension";
/// Portion of the url after the `#`, such as "top".
/// The `#` is not part of the fragment.
pub const URL_FRAGMENT: &str = "url.fragment";
/// If full URLs are important to your use case, they should be stored in `url.full`, whether this field is reconstructed or present in the event source.
///
/// # Examples
///
/// - `https://www.elastic.co:443/search?q=elasticsearch#top`
pub const URL_FULL: &str = "url.full";
/// Unmodified original url as seen in the event source.
/// Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path.
/// This field is meant to represent the URL as it was observed, complete or not.
///
/// # Examples
///
/// - `https://www.elastic.co:443/search?q=elasticsearch#top or /search?q=elasticsearch`
pub const URL_ORIGINAL: &str = "url.original";
/// Password of the request.
pub const URL_PASSWORD: &str = "url.password";
/// Path of the request, such as "/search".
pub const URL_PATH: &str = "url.path";
/// Port of the request, such as 443.
///
/// # Examples
///
/// - `443`
pub const URL_PORT: &str = "url.port";
/// The query field describes the query string of the request, such as "q=elasticsearch".
/// The `?` is excluded from the query string. If a URL contains no `?`, there is no query field. If there is a `?` but no query, the query field exists with an empty string. The `exists` query can be used to differentiate between the two cases.
pub const URL_QUERY: &str = "url.query";
/// The highest registered url domain, stripped of the subdomain.
/// For example, the registered domain for "foo.example.com" is "example.com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
///
/// # Examples
///
/// - `example.com`
pub const URL_REGISTERED_DOMAIN: &str = "url.registered_domain";
/// Scheme of the request, such as "https".
/// Note: The `:` is not part of the scheme.
///
/// # Examples
///
/// - `https`
pub const URL_SCHEME: &str = "url.scheme";
/// The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
/// For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
///
/// # Examples
///
/// - `east`
pub const URL_SUBDOMAIN: &str = "url.subdomain";
/// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
/// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
///
/// # Examples
///
/// - `co.uk`
pub const URL_TOP_LEVEL_DOMAIN: &str = "url.top_level_domain";
/// Username of the request.
pub const URL_USERNAME: &str = "url.username";
}
/// The user fields describe information about the user that is relevant to the event.
/// Fields can have one entry or multiple entries. If a user has more than one id, provide an array that includes all of them.
pub mod user {
/// Name of the directory the user is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const USER_CHANGES_DOMAIN: &str = "user.changes.domain";
/// User email address.
pub const USER_CHANGES_EMAIL: &str = "user.changes.email";
/// User's full name, if available.
///
/// # Examples
///
/// - `Albert Einstein`
pub const USER_CHANGES_FULL_NAME: &str = "user.changes.full_name";
/// Name of the directory the group is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const USER_CHANGES_GROUP_DOMAIN: &str = "user.changes.group.domain";
/// Unique identifier for the group on the system/platform.
pub const USER_CHANGES_GROUP_ID: &str = "user.changes.group.id";
/// Name of the group.
pub const USER_CHANGES_GROUP_NAME: &str = "user.changes.group.name";
/// Unique user hash to correlate information for a user in anonymized form.
/// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
pub const USER_CHANGES_HASH: &str = "user.changes.hash";
/// Unique identifier of the user.
pub const USER_CHANGES_ID: &str = "user.changes.id";
/// Short name or login of the user.
///
/// # Examples
///
/// - `albert`
pub const USER_CHANGES_NAME: &str = "user.changes.name";
/// Array of user roles at the time of the event.
///
/// # Examples
///
/// - `["kibana_admin", "reporting_user"]`
pub const USER_CHANGES_ROLES: &str = "user.changes.roles";
/// Name of the directory the user is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const USER_DOMAIN: &str = "user.domain";
/// Name of the directory the user is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const USER_EFFECTIVE_DOMAIN: &str = "user.effective.domain";
/// User email address.
pub const USER_EFFECTIVE_EMAIL: &str = "user.effective.email";
/// User's full name, if available.
///
/// # Examples
///
/// - `Albert Einstein`
pub const USER_EFFECTIVE_FULL_NAME: &str = "user.effective.full_name";
/// Name of the directory the group is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const USER_EFFECTIVE_GROUP_DOMAIN: &str = "user.effective.group.domain";
/// Unique identifier for the group on the system/platform.
pub const USER_EFFECTIVE_GROUP_ID: &str = "user.effective.group.id";
/// Name of the group.
pub const USER_EFFECTIVE_GROUP_NAME: &str = "user.effective.group.name";
/// Unique user hash to correlate information for a user in anonymized form.
/// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
pub const USER_EFFECTIVE_HASH: &str = "user.effective.hash";
/// Unique identifier of the user.
pub const USER_EFFECTIVE_ID: &str = "user.effective.id";
/// Short name or login of the user.
///
/// # Examples
///
/// - `albert`
pub const USER_EFFECTIVE_NAME: &str = "user.effective.name";
/// Array of user roles at the time of the event.
///
/// # Examples
///
/// - `["kibana_admin", "reporting_user"]`
pub const USER_EFFECTIVE_ROLES: &str = "user.effective.roles";
/// User email address.
pub const USER_EMAIL: &str = "user.email";
/// User's full name, if available.
///
/// # Examples
///
/// - `Albert Einstein`
pub const USER_FULL_NAME: &str = "user.full_name";
/// Name of the directory the group is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const USER_GROUP_DOMAIN: &str = "user.group.domain";
/// Unique identifier for the group on the system/platform.
pub const USER_GROUP_ID: &str = "user.group.id";
/// Name of the group.
pub const USER_GROUP_NAME: &str = "user.group.name";
/// Unique user hash to correlate information for a user in anonymized form.
/// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
pub const USER_HASH: &str = "user.hash";
/// Unique identifier of the user.
pub const USER_ID: &str = "user.id";
/// Short name or login of the user.
///
/// # Examples
///
/// - `albert`
pub const USER_NAME: &str = "user.name";
/// Array of user roles at the time of the event.
///
/// # Examples
///
/// - `["kibana_admin", "reporting_user"]`
pub const USER_ROLES: &str = "user.roles";
/// Name of the directory the user is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const USER_TARGET_DOMAIN: &str = "user.target.domain";
/// User email address.
pub const USER_TARGET_EMAIL: &str = "user.target.email";
/// User's full name, if available.
///
/// # Examples
///
/// - `Albert Einstein`
pub const USER_TARGET_FULL_NAME: &str = "user.target.full_name";
/// Name of the directory the group is a member of.
/// For example, an LDAP or Active Directory domain name.
pub const USER_TARGET_GROUP_DOMAIN: &str = "user.target.group.domain";
/// Unique identifier for the group on the system/platform.
pub const USER_TARGET_GROUP_ID: &str = "user.target.group.id";
/// Name of the group.
pub const USER_TARGET_GROUP_NAME: &str = "user.target.group.name";
/// Unique user hash to correlate information for a user in anonymized form.
/// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
pub const USER_TARGET_HASH: &str = "user.target.hash";
/// Unique identifier of the user.
pub const USER_TARGET_ID: &str = "user.target.id";
/// Short name or login of the user.
///
/// # Examples
///
/// - `albert`
pub const USER_TARGET_NAME: &str = "user.target.name";
/// Array of user roles at the time of the event.
///
/// # Examples
///
/// - `["kibana_admin", "reporting_user"]`
pub const USER_TARGET_ROLES: &str = "user.target.roles";
}
/// The user_agent fields normally come from a browser request.
/// They often show up in web service logs coming from the parsed user agent string.
pub mod user_agent {
/// Name of the device.
///
/// # Examples
///
/// - `iPhone`
pub const USER_AGENT_DEVICE_NAME: &str = "user_agent.device.name";
/// Name of the user agent.
///
/// # Examples
///
/// - `Safari`
pub const USER_AGENT_NAME: &str = "user_agent.name";
/// Unparsed user_agent string.
///
/// # Examples
///
/// - `Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1`
pub const USER_AGENT_ORIGINAL: &str = "user_agent.original";
/// OS family (such as redhat, debian, freebsd, windows).
///
/// # Examples
///
/// - `debian`
pub const USER_AGENT_OS_FAMILY: &str = "user_agent.os.family";
/// Operating system name, including the version or code name.
///
/// # Examples
///
/// - `Mac OS Mojave`
pub const USER_AGENT_OS_FULL: &str = "user_agent.os.full";
/// Operating system kernel version as a raw string.
///
/// # Examples
///
/// - `4.4.0-112-generic`
pub const USER_AGENT_OS_KERNEL: &str = "user_agent.os.kernel";
/// Operating system name, without the version.
///
/// # Examples
///
/// - `Mac OS X`
pub const USER_AGENT_OS_NAME: &str = "user_agent.os.name";
/// Operating system platform (such centos, ubuntu, windows).
///
/// # Examples
///
/// - `darwin`
pub const USER_AGENT_OS_PLATFORM: &str = "user_agent.os.platform";
/// Use the `os.type` field to categorize the operating system into one of the broad commercial families.
/// One of these following values should be used (lowercase): linux, macos, unix, windows.
/// If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
///
/// # Examples
///
/// - `macos`
pub const USER_AGENT_OS_TYPE: &str = "user_agent.os.type";
/// Operating system version as a raw string.
///
/// # Examples
///
/// - `10.14.1`
pub const USER_AGENT_OS_VERSION: &str = "user_agent.os.version";
/// Version of the user agent.
///
/// # Examples
///
/// - `12.0`
pub const USER_AGENT_VERSION: &str = "user_agent.version";
}
/// The VLAN fields are used to identify 802.1q tag(s) of a packet, as well as ingress and egress VLAN associations of an observer in relation to a specific packet or connection.
/// Network.vlan fields are used to record a single VLAN tag, or the outer tag in the case of q-in-q encapsulations, for a packet or connection as observed, typically provided by a network sensor (e.g. Zeek, Wireshark) passively reporting on traffic.
/// Network.inner VLAN fields are used to report inner q-in-q 802.1q tags (multiple 802.1q encapsulations) as observed, typically provided by a network sensor (e.g. Zeek, Wireshark) passively reporting on traffic. Network.inner VLAN fields should only be used in addition to network.vlan fields to indicate q-in-q tagging.
/// Observer.ingress and observer.egress VLAN values are used to record observer specific information when observer events contain discrete ingress and egress VLAN information, typically provided by firewalls, routers, or load balancers.
pub mod vlan {
/// VLAN ID as reported by the observer.
///
/// # Examples
///
/// - `10`
pub const VLAN_ID: &str = "vlan.id";
/// Optional VLAN name as reported by the observer.
///
/// # Examples
///
/// - `outside`
pub const VLAN_NAME: &str = "vlan.name";
}
/// The vulnerability fields describe information about a vulnerability that is relevant to an event.
pub mod vulnerability {
/// The type of system or architecture that the vulnerability affects. These may be platform-specific (for example, Debian or SUSE) or general (for example, Database or Firewall). For example (https://qualysguard.qualys.com/qwebhelp/fo_portal/knowledgebase/vulnerability_categories.htm[Qualys vulnerability categories])
/// This field must be an array.
///
/// # Examples
///
/// - `["Firewall"]`
pub const VULNERABILITY_CATEGORY: &str = "vulnerability.category";
/// The classification of the vulnerability scoring system. For example (https://www.first.org/cvss/)
///
/// # Examples
///
/// - `CVSS`
pub const VULNERABILITY_CLASSIFICATION: &str = "vulnerability.classification";
/// The description of the vulnerability that provides additional context of the vulnerability. For example (https://cve.mitre.org/about/faqs.html#cve_entry_descriptions_created[Common Vulnerabilities and Exposure CVE description])
///
/// # Examples
///
/// - `In macOS before 2.12.6, there is a vulnerability in the RPC...`
pub const VULNERABILITY_DESCRIPTION: &str = "vulnerability.description";
/// The type of identifier used for this vulnerability. For example (https://cve.mitre.org/about/)
///
/// # Examples
///
/// - `CVE`
pub const VULNERABILITY_ENUMERATION: &str = "vulnerability.enumeration";
/// The identification (ID) is the number portion of a vulnerability entry. It includes a unique identification number for the vulnerability. For example (https://cve.mitre.org/about/faqs.html#what_is_cve_id)[Common Vulnerabilities and Exposure CVE ID]
///
/// # Examples
///
/// - `CVE-2019-00001`
pub const VULNERABILITY_ID: &str = "vulnerability.id";
/// A resource that provides additional information, context, and mitigations for the identified vulnerability.
///
/// # Examples
///
/// - `https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6111`
pub const VULNERABILITY_REFERENCE: &str = "vulnerability.reference";
/// The report or scan identification number.
///
/// # Examples
///
/// - `20191018.0001`
pub const VULNERABILITY_REPORT_ID: &str = "vulnerability.report_id";
/// The name of the vulnerability scanner vendor.
///
/// # Examples
///
/// - `Tenable`
pub const VULNERABILITY_SCANNER_VENDOR: &str = "vulnerability.scanner.vendor";
/// Scores can range from 0.0 to 10.0, with 10.0 being the most severe.
/// Base scores cover an assessment for exploitability metrics (attack vector, complexity, privileges, and user interaction), impact metrics (confidentiality, integrity, and availability), and scope. For example (https://www.first.org/cvss/specification-document)
///
/// # Examples
///
/// - `5.5`
pub const VULNERABILITY_SCORE_BASE: &str = "vulnerability.score.base";
/// Scores can range from 0.0 to 10.0, with 10.0 being the most severe.
/// Environmental scores cover an assessment for any modified Base metrics, confidentiality, integrity, and availability requirements. For example (https://www.first.org/cvss/specification-document)
///
/// # Examples
///
/// - `5.5`
pub const VULNERABILITY_SCORE_ENVIRONMENTAL: &str = "vulnerability.score.environmental";
/// Scores can range from 0.0 to 10.0, with 10.0 being the most severe.
/// Temporal scores cover an assessment for code maturity, remediation level, and confidence. For example (https://www.first.org/cvss/specification-document)
pub const VULNERABILITY_SCORE_TEMPORAL: &str = "vulnerability.score.temporal";
/// The National Vulnerability Database (NVD) provides qualitative severity rankings of "Low", "Medium", and "High" for CVSS v2.0 base score ranges in addition to the severity ratings for CVSS v3.0 as they are defined in the CVSS v3.0 specification.
/// CVSS is owned and managed by FIRST.Org, Inc. (FIRST), a US-based non-profit organization, whose mission is to help computer security incident response teams across the world. For example (https://nvd.nist.gov/vuln-metrics/cvss)
///
/// # Examples
///
/// - `2.0`
pub const VULNERABILITY_SCORE_VERSION: &str = "vulnerability.score.version";
/// The severity of the vulnerability can help with metrics and internal prioritization regarding remediation. For example (https://nvd.nist.gov/vuln-metrics/cvss)
///
/// # Examples
///
/// - `Critical`
pub const VULNERABILITY_SEVERITY: &str = "vulnerability.severity";
}
/// This implements the common core fields for x509 certificates. This information is likely logged with TLS sessions, digital signatures found in executable binaries, S/MIME information in email bodies, or analysis of files on disk.
/// When the certificate relates to a file, use the fields at `file.x509`. When hashes of the DER-encoded certificate are available, the `hash` data set should be populated as well (e.g. `file.hash.sha256`).
/// Events that contain certificate information about network connections, should use the x509 fields under the relevant TLS fields: `tls.server.x509` and/or `tls.client.x509`.
pub mod x509 {
/// List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
///
/// # Examples
///
/// - `*.elastic.co`
pub const X509_ALTERNATIVE_NAMES: &str = "x509.alternative_names";
/// List of common name (CN) of issuing certificate authority.
///
/// # Examples
///
/// - `Example SHA2 High Assurance Server CA`
pub const X509_ISSUER_COMMON_NAME: &str = "x509.issuer.common_name";
/// List of country (C) codes
///
/// # Examples
///
/// - `US`
pub const X509_ISSUER_COUNTRY: &str = "x509.issuer.country";
/// Distinguished name (DN) of issuing certificate authority.
///
/// # Examples
///
/// - `C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA`
pub const X509_ISSUER_DISTINGUISHED_NAME: &str = "x509.issuer.distinguished_name";
/// List of locality names (L)
///
/// # Examples
///
/// - `Mountain View`
pub const X509_ISSUER_LOCALITY: &str = "x509.issuer.locality";
/// List of organizations (O) of issuing certificate authority.
///
/// # Examples
///
/// - `Example Inc`
pub const X509_ISSUER_ORGANIZATION: &str = "x509.issuer.organization";
/// List of organizational units (OU) of issuing certificate authority.
///
/// # Examples
///
/// - `www.example.com`
pub const X509_ISSUER_ORGANIZATIONAL_UNIT: &str = "x509.issuer.organizational_unit";
/// List of state or province names (ST, S, or P)
///
/// # Examples
///
/// - `California`
pub const X509_ISSUER_STATE_OR_PROVINCE: &str = "x509.issuer.state_or_province";
/// Time at which the certificate is no longer considered valid.
///
/// # Examples
///
/// - `2020-07-16 03:15:39+00:00`
pub const X509_NOT_AFTER: &str = "x509.not_after";
/// Time at which the certificate is first considered valid.
///
/// # Examples
///
/// - `2019-08-16 01:40:25+00:00`
pub const X509_NOT_BEFORE: &str = "x509.not_before";
/// Algorithm used to generate the public key.
///
/// # Examples
///
/// - `RSA`
pub const X509_PUBLIC_KEY_ALGORITHM: &str = "x509.public_key_algorithm";
/// The curve used by the elliptic curve public key algorithm. This is algorithm specific.
///
/// # Examples
///
/// - `nistp521`
pub const X509_PUBLIC_KEY_CURVE: &str = "x509.public_key_curve";
/// Exponent used to derive the public key. This is algorithm specific.
///
/// # Examples
///
/// - `65537`
pub const X509_PUBLIC_KEY_EXPONENT: &str = "x509.public_key_exponent";
/// The size of the public key space in bits.
///
/// # Examples
///
/// - `2048`
pub const X509_PUBLIC_KEY_SIZE: &str = "x509.public_key_size";
/// Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
///
/// # Examples
///
/// - `55FBB9C7DEBF09809D12CCAA`
pub const X509_SERIAL_NUMBER: &str = "x509.serial_number";
/// Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
///
/// # Examples
///
/// - `SHA256-RSA`
pub const X509_SIGNATURE_ALGORITHM: &str = "x509.signature_algorithm";
/// List of common names (CN) of subject.
///
/// # Examples
///
/// - `shared.global.example.net`
pub const X509_SUBJECT_COMMON_NAME: &str = "x509.subject.common_name";
/// List of country (C) code
///
/// # Examples
///
/// - `US`
pub const X509_SUBJECT_COUNTRY: &str = "x509.subject.country";
/// Distinguished name (DN) of the certificate subject entity.
///
/// # Examples
///
/// - `C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net`
pub const X509_SUBJECT_DISTINGUISHED_NAME: &str = "x509.subject.distinguished_name";
/// List of locality names (L)
///
/// # Examples
///
/// - `San Francisco`
pub const X509_SUBJECT_LOCALITY: &str = "x509.subject.locality";
/// List of organizations (O) of subject.
///
/// # Examples
///
/// - `Example, Inc.`
pub const X509_SUBJECT_ORGANIZATION: &str = "x509.subject.organization";
/// List of organizational units (OU) of subject.
pub const X509_SUBJECT_ORGANIZATIONAL_UNIT: &str = "x509.subject.organizational_unit";
/// List of state or province names (ST, S, or P)
///
/// # Examples
///
/// - `California`
pub const X509_SUBJECT_STATE_OR_PROVINCE: &str = "x509.subject.state_or_province";
/// Version of x509 format.
///
/// # Examples
///
/// - `3`
pub const X509_VERSION_NUMBER: &str = "x509.version_number";
}