version: 2
title: Certstream Firehose
contributor: https://github.com/emanb29
summary: Log new SSL certificate registrations
description: |-
  Reproduces the behavior of the certstream website (https://certstream.calidog.io/) by
  connecting to the certstream firehose via SSL-encrypted websocket and printing to
  standard out each time a new certificate is detected

ingestStreams:
  - name: certstream-ingest
    source:
      type: WebsocketClient
      url: wss://certstream.calidog.io/
      format:
        type: Json
      initMessages: []
      characterEncoding: UTF-8
    query: |-
      CREATE ($that)

standingQueries:
  - name: log-new-certs
    pattern:
      type: Cypher
      query: MATCH (n) RETURN DISTINCT id(n) AS id
      mode: DistinctId
    outputs:
      - name: log-new-certs
        preEnrichmentTransformation:
          type: InlineData
        resultEnrichment:
          query: |-
            MATCH (n)
            WHERE id(n) = $that.id
            RETURN n.data AS data
          parameter: that
        destinations:
          - type: StandardOut

nodeAppearances: []
quickQueries: []
sampleQueries: []
