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

[BUG] Auth not being used - invalid settings. configure allowed hosts in the authentication section #901

Open
bunkiedc opened this issue Jun 30, 2024 · 1 comment

Comments

@bunkiedc
Copy link

Describe the Bug

The plugin is provisioned to not use any auth, but when tested, it complains that the config is invalid, and to configure the "allowed hosts" in the authentication section. When going to the Authentication section, it shows that no-auth is configured.

Steps to reproduce

Set up a provisioned plug-in that doesn't use auth.

Provide steps to reproduce the issue.

Note: bugs will be fixed only if enough information provided to reproduce the issue!

Sample Data

# config file version
apiVersion: 1
datasources:
  - id: 2
    uid: "redacted"
    orgId: 1
    name: "Infinity"
    type: "yesoreyeram-infinity-datasource"
    url: "http://redacted"
    basicAuth: false
    basicAuthUser: ""
    isDefault: false
    jsonData:
      httpHeaderName1: "redacted"
      global_queries: []
      secureQueryName1: ""
    readOnly: true
    secureJsonData:
      httpHeaderValue1: "redacted"

Provide a link for sample data, or provide sample data bellow

Screenshots

Infinity_Invalid_hosts

If applicable, add screenshots to help explain your problem.

Version Details:

  • Grafana version : Grafana v9.5.15 (5f5a096c79a0200a4a2cddbb499c50095edc3401)

  • Plugin version : 2.8.0 (keyId: 7e4d0c6a708866e7)

Additional context

I've also noticed that there is an additional note that the url is deprecated, but I was not able to find any specific information
about that.

Infinity_plugin_misc

@bunkiedc
Copy link
Author

bunkiedc commented Jul 1, 2024

I think perhaps I've misunderstood something with your documentation. I think I should have added the host:port to allowedHosts under jsonData:, instead of using the old method of using url: host:port. This appears to remove the error, and I was able to get it working. Please let me know if this is correct.
thanks!

apiVersion: 1

datasources:
  - id: 2
    uid: "redacted"
    orgId: 1
    name: "Infinity"
    type: "yesoreyeram-infinity-datasource"
    basicAuth: false
    basicAuthUser: ""
    isDefault: false
    jsonData:
      allowedHosts: 
       - "http://redactedHost:redactedPort"
      httpHeaderName1: "redacted"
      global_queries: []
      secureQueryName1: ""
    readOnly: true
    secureJsonData:
      httpHeaderValue1: "redacted"

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

No branches or pull requests

1 participant