-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add client metadata to PostgreSQL database session start event #50711
Add client metadata to PostgreSQL database session start event #50711
Conversation
lib/srv/db/common/test.go
Outdated
// Params contains parameters used during the session. This can hold, for | ||
// example, PostgreSQL runtime parameters. | ||
Params map[string]string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit generic for something that looks to only be for passing around an application name. Could we perhaps add a dedicated user agent field and punt runtime parameters to a future, more scoped PR that actually makes use of them in some meaningful way?
@gabrielcorado See the table below for backport results.
|
* feat: add client metadata to database session start event * refactor(test): update option to WithUserAgent
… (#50806) * feat: add client metadata to database session start event * refactor(test): update option to WithUserAgent
Related to #46810
Adds a new field to the database session start audit event to include client metadata (user agent). This is the field/flow used by other events, such as login and session recording access.
Motivation: Identify which client (user agent) was used to connect to the database in the audit. In addition, we'll also add this field to Prehog so we can track and analyze clients' usage, including the new Web UI client (
teleport-repl
).New event (some fields were omitted):
changelog: Add
user_agent
field todb.session.start
audit events.