Skip to content

How to encrypt basic_auth password/password_file in prometheus.yml file? #5795

@sujuanliu

Description

@sujuanliu

Proposal

When scratching jenkins http api metrics using basic auth, prometheus is working fine when filling in plain password text using password/password_file, but it is not secure to use plain password text in a config file, so are there any good ways to encrypt passwd text in config file?

Bug Report

Environment

  • System information:
    CentOS 7.4 Linux 3.10.0-693.2.2.el7.x86_64 x86_64

  • Prometheus version:
    prometheus, version 2.11.1 (branch: HEAD, revision: e5b2249)
    build user: root@d94406f2bb6f
    build date: 20190710-13:51:17
    go version: go1.12.7

``
insert configuration here (if relevant to the issue)

  - job_name: 'jenkins'
    metrics_path: /prometheus
    scheme: https
    basic_auth:
      username: "xxxx"
      password_file: "/var/lib/passwd"
    static_configs:
    - targets: ['xxxxxx']

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