From a6d30000ab73bf7e7118baef4384992c53de2a77 Mon Sep 17 00:00:00 2001 From: Adrian Serrano Date: Thu, 16 Jan 2020 00:34:16 +0100 Subject: [PATCH] Packetbeat TLS: Replace array fields with keyword (#15601) Use of `type: array` in some fields (which was inconsistent) causes those fields to be excluded from the template. This prevents pointing aliases to those fields, which we need in 7.6+. Setting those fields to `keyword` explicitly so that they are included in the template. Fixes #15588 (cherry picked from commit 04a90585b0a47ec83e697046c91e9917e60c264c) --- packetbeat/docs/fields.asciidoc | 26 ++++---------------------- packetbeat/protos/tls/_meta/fields.yml | 16 ++++------------ packetbeat/protos/tls/fields.go | 2 +- 3 files changed, 9 insertions(+), 35 deletions(-) diff --git a/packetbeat/docs/fields.asciidoc b/packetbeat/docs/fields.asciidoc index 14dc17a74cd..7f90009da22 100644 --- a/packetbeat/docs/fields.asciidoc +++ b/packetbeat/docs/fields.asciidoc @@ -9407,7 +9407,7 @@ type: keyword The list of compression methods the client supports. See https://www.iana.org/assignments/comp-meth-ids/comp-meth-ids.xhtml -type: array +type: keyword -- @@ -9538,7 +9538,7 @@ The hello extensions provided by the server. -- Negotiated application layer protocol -type: array +type: keyword -- @@ -9658,7 +9658,7 @@ type: keyword -- Subject Alternative Names for this certificate. -type: array +type: keyword -- @@ -9858,7 +9858,7 @@ type: keyword -- Subject Alternative Names for this certificate. -type: array +type: keyword -- @@ -10595,24 +10595,6 @@ alias to: tls.detailed.server_certificate.issuer.locality -- -*`tls.server_certificate_chain`*:: -+ --- -type: alias - -alias to: tls.detailed.server_certificate_chain - --- - -*`tls.client_certificate_chain`*:: -+ --- -type: alias - -alias to: tls.detailed.client_certificate_chain - --- - *`tls.alert_types`*:: + -- diff --git a/packetbeat/protos/tls/_meta/fields.yml b/packetbeat/protos/tls/_meta/fields.yml index dbe3676e089..5c5734de015 100644 --- a/packetbeat/protos/tls/_meta/fields.yml +++ b/packetbeat/protos/tls/_meta/fields.yml @@ -44,7 +44,7 @@ connection with the client. - name: supported_compression_methods - type: array + type: keyword description: > The list of compression methods the client supports. See https://www.iana.org/assignments/comp-meth-ids/comp-meth-ids.xhtml @@ -123,7 +123,7 @@ description: The hello extensions provided by the server. fields: - name: application_layer_protocol_negotiation - type: array + type: keyword description: Negotiated application layer protocol - name: session_ticket @@ -185,7 +185,7 @@ The algorithm used for the certificate's signature. - name: alternative_names - type: array + type: keyword description: Subject Alternative Names for this certificate. - name: subject @@ -281,7 +281,7 @@ The algorithm used for the certificate's signature. - name: alternative_names - type: array + type: keyword description: Subject Alternative Names for this certificate. - name: subject @@ -621,14 +621,6 @@ type: alias path: tls.detailed.server_certificate.issuer.locality - - name: tls.server_certificate_chain - type: alias - path: tls.detailed.server_certificate_chain - - - name: tls.client_certificate_chain - type: alias - path: tls.detailed.client_certificate_chain - - name: tls.alert_types type: alias path: tls.detailed.alert_types diff --git a/packetbeat/protos/tls/fields.go b/packetbeat/protos/tls/fields.go index 656d40e6282..980f6b3a403 100644 --- a/packetbeat/protos/tls/fields.go +++ b/packetbeat/protos/tls/fields.go @@ -32,5 +32,5 @@ func init() { // AssetTls returns asset data. // This is the base64 encoded gzipped contents of protos/tls. func AssetTls() string { - return "eJzsW99v4zYSfs9fMUgfrgU23jsU93B5OCBw8rDAXls0Xdy9CbQ0tthQpEpSdrx//YGUZFMSJVM/kmt7zsNiY4vffDOc4XykmDt4weM9aKaiBDWhDJMbAE01w3u4faw+gl8+P9/eACSoYklzTQW/h3/eAAC4j9ypHGO6pTHgHrmGLUWWqNUNVP+7tyPugJMMrU37O4A+5ngPOymKvPrEfd4d43Csf7qDzU+CW1IwHVVAsCVMofN928DZxB6looI739Q2XvB4EDJpfOOJyPnnlxRrOBBb0CmaKEEuhRaxYFAoTFaNMfhKstyG3jz4t9X3tzceihJVkVmbUYY6FckSZD+VBBUqyzclCjaIvDSGyQf7bcETlOxI+Q5Ky6UP8CNHENsW4i1NbmErpHW6xv30CELCrabxC+rz1+XvgK8auXlu5fM7ZhS5jmKU2mQZ0RhJ/K1ApdEXgo0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