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] Unable to set up JWT Oauth2 as Private Key format not recognised #954

Open
jammiemil opened this issue Aug 12, 2024 · 0 comments
Open

Comments

@jammiemil
Copy link

Describe the bug

Any attempt to use JWT Oauth2 results in the error

Steps to reproduce

Generate a private key eg.

openssl genrsa -out private-key.pem

Copy contents or private-key.pem into Private key field in infinity plugin

Hit Save & Test

Receive error:

private key should be a PEM or plain PKCS1 or PKCS8; parse error: asn1: structure error: tags don't match (16 vs {class:0 tag:13 length:45 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2

Screenshots

In this scenario i was trying to set up connectivity to a salesforce Sandbox environment (Environment will be trashed shortly so not concerned with sharing details)

image

Whilst the screenshot mentioned the health check url being polled its not actually getting that far as the error is occurring in generating the payload to send to the token URL and generate the JWT. Ive been able to connect to the same instance using client credentials but this is insufficient for the use case.

You can generate the same error with just the Private key, the allowed hosts and the health check fields configured. Everything else can be blank and the same private key error will appear

Version Details:

  • Grafana version : v11.2.0-74515 (cloud)
  • Plugin version : 2.9.5 (Updated whilst troubleshooting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants