gocardless / theatre

GoCardless' collection of Kubernetes extensions
MIT License
23 stars 17 forks source link

Consoles: include authorisation rule name #269

Closed ttamimi closed 1 year ago

ttamimi commented 1 year ago

Include authorisation rule name in console creation events published to Pub/Sub.

Also include console event ID in logs. This can prove useful if we ever need to replay messages by reconstructing them from logs (which we've had to do once before).

ttamimi commented 1 year ago

This is currently deployed in compute-lab and has been tested with:

utopia consoles create -s taltamimi-playground -e playground --template auth --reason "Testing Theatre changes"

The new custom field is populated https://gocardless.atlassian.net/browse/TCSR-738

and console_event_id and request_time are now in the logs

ts=2022-11-21T20:19:30.827240448Z caller=logging/recorded.go:60 msg="Console ended" component=Console request=taltamimi/playground-console-auth-p4qhq console=taltamimi/playground-console-auth-p4qhq eventType=DontRecord console_template=auth console_app=taltamimi-playground console_component=auth console_environment=playground console_part-of=taltamimi-playground console_release=playground console_role=console console_service=taltamimi-playground kind=console console_name=playground-console-auth-p4qhq console_user=taltamimi@gocardless.com console_event_id=20221121201232/compute-lab/taltamimi/playground-console-auth-p4qhq request_time=2022-11-21T20:12:32Z console_requires_authorisation=true console_is_authorised=true command="[\"/bin/sh\"]" reason="Testing Theatre changes" console_pod_name=playground-console-auth-p4qhq-console-bvbt2 console_authorisation_rule_name=default console_authorisation_authorisers_required=1 console_authorisers="[\"benwheatley@gocardless.com\"]" event=ConsoleEnded duration=95
ttamimi commented 1 year ago

Deployed in all clusters