Skip to content

Add IP addresses of clients to log messages #1788

@nabokihms

Description

@nabokihms

Sometimes it is helpful to see users' IP addresses in successful or failed authorization request log entries. This behavior can be achieved by using simple nginx in front of dex and looking into nginx logs, but it would be more convenient and simpler to see addresses in dex logs.

Maybe it's better to add this feature only for debug logging mode.
For example:

{"level":"info", "client_address":"192.168.0.1", "msg":"login successful: connector \"what-is-it\", username=\"Maksim Nabokikh\", preferred_username=\"maksim.nabokikh\", email=\"maksim.nabokikh@example.com\", groups=[]","time":"2020-08-31T14:41:31Z"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions