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

[Heartbeat] Searchable certs #17959

Closed
wants to merge 25 commits into from
Closed

Conversation

andrewvc
Copy link
Contributor

@andrewvc andrewvc commented Apr 24, 2020

An experiment

What does this PR do?

Why is it important?

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

This patch adds additional [ECS
fields](https://www.elastic.co/guide/en/ecs/current/ecs-tls.html).

Sample output of the `tls.*` fields with this patch is below. Note the
somewhat strange nesting of data in `issuer` and `subject`. This is per
the ECS spec, but a bit awkward. We may want to break this data out into
the more specific ECS `x509` type in the future. For UI work we are likely
fine to parse this on the client and display the CN section in most
cases.

```json
{
  "version": "1.2",
  "version_protocol": "tls"
  "cipher": "ECDHE-RSA-AES-128-GCM-SHA256",
  "server": {
    "subject": "CN=r2.shared.global.fastly.net,O=Fastly\\, Inc.,L=San Francisco,ST=California,C=US",
    "hash": {
      "sha1": "b7b4b89ef0d0caf39d223736f0fdbb03c7b426f1",
      "sha256": "12b00d04db0db8caa302bfde043e88f95baceb91e86ac143e93830b4bbec726d"
    },
    "not_before": "2019-08-16T01:40:25.000Z",
    "not_after": "2019-08-16T01:40:25.000Z",
    "issuer": "CN=GlobalSign CloudSSL CA - SHA256 - G3,O=GlobalSign nv-sa,C=BE"
  },
  "certificate_not_valid_before": "2019-08-16T01:40:25.000Z",
  "certificate_not_valid_after": "2020-07-16T03:15:39.000Z",
  "established": true,
  "rtt": {
    "handshake": {
      "us": 42491
    }
  },
}
```

Work goes towards elastic/uptime#161
@andrewvc andrewvc added Heartbeat Team:obs-ds-hosted-services Label for the Observability Hosted Services team labels Apr 24, 2020
@andrewvc andrewvc self-assigned this Apr 24, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/uptime (:uptime)

@andrewvc
Copy link
Contributor Author

Solved in #17687

@andrewvc andrewvc closed this Apr 29, 2020
@andrewvc andrewvc deleted the searchable-certs branch April 29, 2020 02:16
@zube zube bot added [zube]: Done and removed [zube]: Inbox labels Apr 29, 2020
@zube zube bot removed the [zube]: Done label May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Heartbeat Team:obs-ds-hosted-services Label for the Observability Hosted Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants