I am using grafana v.9.0.2 since windows 10. I configured grafana with JWT, this is my custom.ini
Blockquote
[server]
protocol = http
http_port = 8089
domain = localhost:8089
root_url = http://localhost:8089/
[session]
cookie_name = grafana_session
cookie_secure = false
[security]
cookie_secure = false
cookie_samesite = disabled
allow_embedding = true
[auth]
login_cookie_name = grafana_session
;token_rotation_interval_minutes = 10
disable_login_form = true
disable_signout_menu = true
signout_redirect_url = http://localhost:8089/oauth2/sign_out
oauth_auto_login = false
oauth_skip_org_role_update_sync = false
[auth.jwt]
enabled = true
enable_login_token = true
header_name = Authorization
username_claim = name
jwk_set_file = C://Users/n.farhat/Desktop/Grafana/jwks.json
key_id =E7013B99FD34942F96FD6ED6BACF938E
cache_ttl = 60m
expect_claims = {“iss”: “http://env.grafana.local:8089/auth/realms/grafana”, “azp”: “grafana-oauth”}
auto_sign_up = true
url_login = true
auto_login = true
skip_org_role_sync = true
I used Iframe to authenticate to dashboard of grafana :
But always redirects me to http://localhost:8089/login
this Header of my token
{
“alg”: “RS256”,
“kid”: “E7013B99FD34942F96FD6ED6BACF938E”,
“typ”: “at+jwt”
}
and this DATA of my token
{
“iss”: “null”,
“nbf”: 1703155239,
“iat”: 1703155239,
“exp”: 1703169639,
“aud”: “null/resources”,
“client_id”: “ExtranetResellerSPA”,
“sub”: “41922e10-b309-46ef-b60b-4cade5b93446”,
“auth_time”: 1703155239,
“idp”: “local”,
“preferred_username”: “support”,
“unique_name”: “support”,
“function”: “NetcomRoot”,
“partnersAccessType”: “ALL”,
“name”: “support”,
“userMail”: “mhadhbitakwa1@gmail.com”,
“userTel”: “652525252”,
“PartenaireId”: “41922e10-b309-46ef-b60b-4cade5b93446”
}
What is my mistake, what can I do to continue working with JWT and work correctly ?
Thanks