Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: TLS related fields #6

Merged
merged 4 commits into from
Jun 18, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ ECS defines these fields.
* [Process fields](#process)
* [Service fields](#service)
* [Source fields](#source)
* [TLS fields](#tls)
* [URL fields](#url)
* [User fields](#user)
* [User agent fields](#user_agent)
Expand Down Expand Up @@ -358,6 +359,21 @@ Source fields describe details about the source of the event.
| <a name="source.subdomain"></a>`source.subdomain` | Source subdomain. | keyword | | |


## <a name="tls"></a> TLS fields

The tls fields contains the TLS related data about a specific connection.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/contains/contain/


As an example in the case of Filebeat and the TCP input, the `version` field would be the version of the TLS protocol in use, the `certificates` would be the chain of certificates provided by the client and the `ciphersuite` is the encryption algorithm used for the communication.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider tagging as footnote: >to push this example to after the table



| Field | Description | Type | Multi Field | Example |
|---|---|---|---|---|
| <a name="tls.version"></a>`tls.version` | TLS version | keyword | | `TLSv1.2` |
| <a name="tls.certificates"></a>`tls.certificates` | An array of certificates. | keyword | | |
| <a name="tls.servername"></a>`tls.servername` | Server name requested by the client. | keyword | | `localhost` |
| <a name="tls.ciphersuite"></a>`tls.ciphersuite` | Name of the cipher used for the communication. | keyword | | `ECDHE-ECDSA-AES-128-CBC-SHA` |


## <a name="url"></a> URL fields

URL fields provide a complete URL, with scheme, host, and path. The URL object can be reused in other prefixes, such as `host.url.*` for example. Keep the structure consistent whenever you use URL fields.
Expand Down
4 changes: 4 additions & 0 deletions schema.csv
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ source.ip,ip,0,
source.mac,keyword,1,
source.port,long,1,
source.subdomain,keyword,1,
tls.certificates,keyword,0,
tls.ciphersuite,keyword,0,ECDHE-ECDSA-AES-128-CBC-SHA
tls.servername,keyword,0,localhost
tls.version,keyword,0,TLSv1.2
url.fragment,keyword,0,
url.host.name,keyword,0,elastic.co
url.href,text,0,https://elastic.co:443/search?q=elasticsearch#top
Expand Down
36 changes: 36 additions & 0 deletions schemas/tls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
- name: tls
title: TLS
group: 2
description: >
The tls fields contain the TLS related data about a specific connection.

As an example in the case of Filebeat and the TCP input, the `version` field would be the
version of the TLS protocol in use, the `certificates` would be the chain of certificates
provided by the client and the `ciphersuite` is the encryption algorithm used for the
communication.
fields:
- name: version
type: keyword
description: >
TLS version.

example: TLSv1.2
- name: certificates
type: keyword
description: >
An array of certificates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the format of this field? If one were to use base64-encoded certificates, a keyword field would make more sense than text.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are absolutely right for the keyword, I’ll update the PR.

ignore_above: -1
doc_values: false
- name: servername
type: keyword
description: >
Server name requested by the client.

example: localhost
- name: ciphersuite
type: keyword
description: >
Name of the cipher used for the communication.

example: ECDHE-ECDSA-AES-128-CBC-SHA
20 changes: 20 additions & 0 deletions template.json
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,26 @@
"ignore_above": 1024,
"type": "keyword"
},
"tls": {
"properties": {
"certificates": {
"doc_values": false,
"type": "keyword"
},
"ciphersuite": {
"ignore_above": 1024,
"type": "keyword"
},
"servername": {
"ignore_above": 1024,
"type": "keyword"
},
"version": {
"ignore_above": 1024,
"type": "keyword"
}
}
},
"url": {
"properties": {
"fragment": {
Expand Down