Skip to content
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

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

Open
HP41 opened this issue Dec 5, 2022 · 2 comments

Comments

@HP41
Copy link

HP41 commented Dec 5, 2022

πŸ‘» 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)
@HP41
Copy link
Author

HP41 commented Feb 7, 2023

@bmhughes , I was wondering if you've any thoughts on this? Thank you!

@ramereth
Copy link
Contributor

@HP41 this seems to work on the latest version of the cookbook. Can you please confirm this is still broken for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants