Guest User

Untitled

a guest
Dec 6th, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. msg=login.OAuthLogin(NewTransportWithCode) logger=context userId=0 orgId=0 uname= error="oauth2: server response missing access_token"
  2.  
  3. curl --request POST
  4. --url 'https://github.com/login/oauth/access_token'
  5. --header 'content-type: application/json'
  6. --data '{"grant_type":"authorization_code","client_id": "CLIENT_ID","client_secret": "CLIENT_SECRECT","code": "6ccfdded0ffe5518bc56","redirect_uri": "https://grafana.mydomain.com/login/github"}'
  7.  
  8. "GF_AUTH_GITHUB_ENABLED=True",
  9. "GF_LOG_LEVEL=debug",
  10. "GF_AUTH_GITHUB_AUTH_URL=https://github.com/login/oauth/authorize",
  11. "GF_SERVER_DOMAIN=mydomain.com",
  12. "GF_AUTH_GITHUB_ALLOW_SIGN_UP=False",
  13. "GF_SERVER_ROOT_URL=https://grafana.mydomain.com",
  14. "GF_SERVER_ROUTER_LOGGING=True",
  15. "GF_SECURITY_LOGIN_REMEMBER_DAYS=7",
  16. "GF_SECURITY_SECRECT_KEY=MY_SECRECT",
  17. "GF_SECURITY_ADMIN_USER=admin",
  18. "GF_SECURITY_ADMIN_PASSWORD=password",
  19. "GF_AUTH_GITHUB_SCOPES=user:email",
  20. "GF_AUTH_GITHUB_TOKEN_URL=https://github.com/login/oauth/access_token",
  21. "GF_AUTH_GITHUB_CLIENT_ID=CLIENT_ID",
  22. "GF_AUTH_GITHUB_API_URL=https://api.github.com/user",
  23. "GF_AUTH_GITHUB_CLIENT_SECRECT=CLIENT_SECRECT",
  24. "PATH=/usr/share/grafana/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
  25. "GF_PATHS_CONFIG=/etc/grafana/grafana.ini",
  26. "GF_PATHS_DATA=/var/lib/grafana",
  27. "GF_PATHS_HOME=/usr/share/grafana",
  28. "GF_PATHS_LOGS=/var/log/grafana",
  29. "GF_PATHS_PLUGINS=/var/lib/grafana/plugins",
  30. "GF_PATHS_PROVISIONING=/etc/grafana/provisioning"
  31.  
  32. defaults
  33. log global
  34. mode http
  35. option httplog
  36. option dontlognull
  37. timeout connect 10000
  38. timeout client 180000
  39. timeout server 180000
  40. errorfile 400 /etc/haproxy/errors/400.http
  41. errorfile 502 /etc/haproxy/errors/502.http
  42. errorfile 503 /etc/haproxy/errors/503.http
  43. errorfile 504 /etc/haproxy/errors/504.http
  44.  
  45. frontend ft_http
  46. bind 0.0.0.0:80
  47. bind 0.0.0.0:443 ssl crt /etc/ssl/cert.pem crt /etc/ssl/cert2.pem
  48. redirect scheme https if !{ ssl_fc }
  49. mode http
  50. option http-server-close
  51. option forwardfor
  52. acl host_grafana hdr(host) -i grafana.mydomain.com
  53. use_backend bk_grafana if host_grafana
  54. default_backend no_match
  55.  
  56. backend bk_grafana
  57. mode http
  58. option forwardfor
  59. option httpchk HEAD / HTTP/1.1rnHost:localhost
  60. server grafana 172.31.28.99:3000 check
  61. http-request set-header X-Forwarded-Port %[dst_port]
  62. http-request add-header X-Forwarded-Proto https if { ssl_fc }
  63.  
  64. backend no_match
  65. http-request deny deny_status 400
Add Comment
Please, Sign In to add comment