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

Deprecate Batman for Grafana in favor of OAuth2 #332

Open
2 of 3 tasks
byewokko opened this issue Dec 18, 2023 · 0 comments
Open
2 of 3 tasks

Deprecate Batman for Grafana in favor of OAuth2 #332

byewokko opened this issue Dec 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@byewokko
Copy link
Collaborator

byewokko commented Dec 18, 2023

Is your feature request related to a problem? Please describe.

Grafana docker container config example:

 grafana:
  # (...)
  environment:
    # (...)
    GF_AUTH_GENERIC_OAUTH_ENABLED: true
    GF_AUTH_GENERIC_OAUTH_TLS_SKIP_VERIFY_INSECURE: true
    GF_AUTH_GENERIC_OAUTH_AUTO_LOGIN: true
    GF_AUTH_GENERIC_OAUTH_USE_PKCE: false
    GF_AUTH_GENERIC_OAUTH_USE_REFRESH_TOKEN: false
    GF_AUTH_GENERIC_OAUTH_NAME: Seacat Auth
    GF_AUTH_GENERIC_OAUTH_CLIENT_ID: qwe123asd456
    GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET: abc123def546
    GF_AUTH_GENERIC_OAUTH_SCOPES: openid email profile
    GF_AUTH_GENERIC_OAUTH_AUTH_URL: "${PUBLIC_URL}/api/openidconnect/authorize"
    GF_AUTH_GENERIC_OAUTH_TOKEN_URL: "${PUBLIC_URL}/api/openidconnect/token"
    GF_AUTH_GENERIC_OAUTH_API_URL: "${PUBLIC_URL}/api/openidconnect/userinfo"
    GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_STRICT: true
    GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH: contains(resources."*"[*], 'authz:superuser') && 'Admin' || contains(resources."*"[*], 'grafana:edit') && 'Editor' || contains(resources."*"[*], 'grafana:access') && 'Viewer'

Caveats

  • Authorization endpoint is accessed by the user-agent, while the Token endpoint and the Userinfo endpoint are accessed directly by Grafana backend app. This back-channel communication is not always possible - PUBLIC_URL may require a special configuration to be reachable from within a Docker container running on the same server.

To do

  • Update the documentation
  • Update the nginx config examples
  • Add deprecation warning to Grafana Batman module
@byewokko byewokko added the enhancement New feature or request label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant