Observables

The Observables Filter configures the Proxy to emit a JSON payload with every request made to the microservice. This JSON payload contains a variety of different information about the request being made, as well as the user/system issuing the request. These Observables can then be aggregated to perform analysis like: audits, user-experience tracking, etc.

Observable publishing defaults to stdout but can also be published to a Kafka topic or location on disk.

Filter Configuration Options

Name

Type

Default

Description

logLevel

String

Info

Verbosity of logging: Warn, Info, Debug

fileName

String

blank

Name of file to write events to. (stdout if blank)

emitFullResponse

Boolean

false

*Show response body in the observable object

topic

String

""

Sets the eventType field of the observable; used to sort and group messages by service/region/environment/etc in later analysis.

useKafka

Boolean

false

Publish observable message to a Kafka topic

enforceAudit

Boolean

false

Block requests until an observable has been successfully published to Kafka (Only applies if useKafka=true)

encryptionAlgorithm

String

""

Type of encryption. Must be 'aes' or blank

encryptionKey

String

""

Must be blank or base 64 encoded string of 16, 24, or 32 bytes. We recommend 32.

encryptionKeyID

uint32

0

User supplied number to identify the key used in encryption

eventTopic

String

""

The Kafka topic that will hold the published observable messages

kafkaZKDiscover

Boolean

false

Kafka will be discovered through a zookeeper node

kafkaServerConnection

String

""

Comma delimited list of Kafka addresses, or if kafkaZKDiscover is true, a list of ZooKeeper addresses

useKafkaTLS

Boolean

false

Enable TLS communication to the supplied kafka brokers

kafkaCAs

String

""

List of file URLs that point to trusts to be used when connecting to kafka

kafkaCertificate

String

""

File URL pointing to certificate to use when connecting to kafka over TLS

kafkaCertificateKey

String

""

File URL pointing to certificate key to use when connecting to kafka

kafkaServerName

String

""

Certificate server name to use when connecting to kafka

Payloads

Key ID and Dynamic Key Rollover

Users can roll over the encryption key dynamically by changing the Observables configuration in the Proxy.

To enable convenient decryption, each key should be assigned a unique key ID.

Example Configuration

Frames

About Frames

When published in a file (or stdout), the (possibly encrypted) JSON payload is packaged in Frames.

Version

Size

Key ID

Payload

1 byte

7 bytes

8 bytes

(Size) bytes

Example

  • Version = 1

  • Size = 0x00033e = 830

  • Key ID = 0x0000002a = 42

Kafka Headers

We normally write the key id to Kafka Record Headers. Such headers are only available after Kafka Version 0.11.

Have an older version of Kafka? Avoid errors by using a key id of zero. This means you cannot roll over keys dynamically.

Example Payload

Questions

Last updated

Was this helpful?