Skip to content

Commit

Permalink
Setup a 4096 bytes upper bound limit on certificate
Browse files Browse the repository at this point in the history
I wasn't not able to find an upper bound limit on a single PEM certificate, but looking at the
openssl source code and `OPENSSL_RSA_MAX_MODULUS_BITS` 2048 bytes, by doubling that number
information we should accomodate any certificate metadata.
  • Loading branch information
ph committed Jun 11, 2018
1 parent 2267e6f commit c2d1218
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ As an example in the case of Filebeat and the TCP input, the `version` field wou
| 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. | text | | |
| <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` |

Expand Down
2 changes: 1 addition & 1 deletion schema.csv
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ source.ip,ip,0,
source.mac,keyword,1,
source.port,long,1,
source.subdomain,keyword,1,
tls.certificates,text,0,
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
Expand Down
3 changes: 2 additions & 1 deletion schemas/tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
example: TLSv1.2
- name: certificates
type: text
type: keyword
description: >
An array of certificates.
ignore_above: 4096
- name: servername
type: keyword
description: >
Expand Down
4 changes: 2 additions & 2 deletions template.json
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,8 @@
"tls": {
"properties": {
"certificates": {
"norms": false,
"type": "text"
"ignore_above": 4096,
"type": "keyword"
},
"ciphersuite": {
"ignore_above": 1024,
Expand Down

0 comments on commit c2d1218

Please sign in to comment.