Skip to content

grafana_config_security property admin_user is not set in grafana.ini and admin_password is not setΒ #422

Open
@HP41

Description

πŸ‘» Brief Description

  • grafana_config_security property admin_user is not set in grafana.ini.
  • Additionally, admin_password is not set even if it is rendered out in grafana.ini.

πŸ₯ž Cookbook version

Latest as of writing this: 10.2.0

πŸ‘©β€πŸ³ Chef-Infra Version

cinc-client --version
Cinc Client: 16.18.0

🎩 Platform details

Standard Ubuntu 20.04 in test kitchen

Steps To Reproduce

# Resource declaration
grafana_config_security 'grafana' do
  admin_user 'test_admin'
  admin_password 'test_password'
  secret_key 'abcdefghijklmno'
  cookie_secure true
  cookie_samesite 'lax'
end
; In test kitchen /etc/grafana/grafana.ini
[security]
admin_password = changeme
cookie_samesite = lax
cookie_secure = true
secret_key = abcdefghijklmno

πŸš“ Expected behavior

  • /etc/grafana/grafana.ini should have line: admin_user = test_admin
  • When logging into grafana, should be able to login with test_admin:test_password

βž• Additional context

  • admin_user
    • Unsure where it could be getting omitted. For some reason it does not show up at all.
  • admin_password:
    • According to official docs, this is only set once (probably at first service start)
    • And the service does start when apt install.
    • Unsure how this can be fixed. Perhaps an apt option to not start the service
    • Or use grafana-cli admin reset-admin-password command conditionally (https://grafana.com/docs/grafana/v9.3/cli/#reset-admin-password)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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