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

Unable to setup datasource with basic auth #298

Closed
AxelAli opened this issue Jul 22, 2022 · 2 comments
Closed

Unable to setup datasource with basic auth #298

AxelAli opened this issue Jul 22, 2022 · 2 comments

Comments

@AxelAli
Copy link

AxelAli commented Jul 22, 2022

I have a grafana instance in docker, i will for datasources to be added from a yml file.
All my other datasources work but i am unable to provide credentials

My datasource

  - access: "proxy"
    name: "rabbitmq"
    org_id: 1
    type: "marcusolsson-json-datasource"
    url: "rabbitmq:15672"
    version: 1

    basicAuth: true
    withCredentials: true #Tried without and still have an issue
    basicAuthUser: myuser
    basicAuthPassword: andpassword.$STAGE
    editable: true

also attempted

    secureJsonData:
      basicAuthPassword: andpassword.$STAGE

But after creation auth is still disabled

Screen Shot 0004-07-22 at 16 16 31

@jnunezgts
Copy link

Hello,

The bug is still around, I have the following YAML file and it doesn't work either after following the general provision guidelines:

---
apiversion: 2
datasources:
  - name: "My JSON datasource"
    type: marcusolsson-json-datasource
    url: https://example.com:443/api/endpoint
    basicAuth: true
    basicAuthUser: "user"
    isDefault: false
    editable: true
    version: 9
    secureJsonData:
      basicAuthPassword: "password"

So the datasource gets provisioned and the only way to fix it is to make it editable so you can change the credentials after it gets created.

I was looking at the code but could not find anything that hints how to hint the provisioning about the right credentials.

@gabor
Copy link
Contributor

gabor commented May 24, 2024

#338 deals with the same problem (with adding the uid-issue), i'll close this one and will continue handling it in #338

@gabor gabor closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

No branches or pull requests

3 participants