Skip to content

oauth2. Hide secrets in endpoint_params. #1465

@dezzzm

Description

@dezzzm

When configuring oauth2 with endpoint_params.grant_type=password, you have to specify the login and password of the account.
This information is displayed in plain text and is not hidden in any way either in the configuration or when logging into the web interface (http://ip:9115/config or http://ip:9115/logs?id=1).

Example:

modules:
    http_2xx_oauth_dex:
        prober: http
        timeout: 5s
        http:
            valid_status_codes:
                - 200
            valid_http_versions:
                - HTTP/1.1
                - HTTP/2.0
            preferred_ip_protocol: ip4
            ip_protocol_fallback: true
            headers:
                user-agent: Blackbox Exporter/0.27.0, Chrome
            oauth2:
                client_id: test
                client_secret_file: /etc/blackbox_exporter/secrets/secret_http_2xx_oauth_dex
                token_url: https://keycloak.k8s.test.local/realms/test/protocol/openid-connect/token
                endpoint_params:
                    grant_type: password
                    password: <password in plain text>
                    username: <username in plain text>

Please add endpoint_params_file or password_file similar to client_secret_file to hide sensitive information.

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