Code Monkey home page Code Monkey logo

Grafana-generic_OAuth-NodeJS

authentication grafana with generic oauth

Step 1:

-Clone this repository git clone https://github.com/sadokbani/Grafana-generic_OAuth-NodeJS.git

-npm install

-node server.js

Step 2:

Edit Grafana configuration file that is located at /etc/grafana/grafana.ini on Ubuntu / Debian, /usr/local/etc/grafana/grafana.ini on MAC, <GRAFANA_PROJECT_FOLDER>/conf/custom.ini on Windows.

Uncomment these lines and enter your client_id, client_secret, auth_url, token_url, api_url:

#################################### Generic OAuth ##########################

[auth.generic_oauth]

;enabled = true

;name = OAuth

;allow_sign_up = false

;client_id = some_id

;client_secret = some_secret

;scopes = user:email,read:org

;auth_url =

;token_url =

;api_url =

Like so:

#################################### Generic OAuth ##########################

[auth.generic_oauth]

enabled = true

name = OAuth

allow_sign_up = true

auth_url = http://localhost:8000/login

token_url = http://localhost:8000/users/token

api_url = http://localhost:8000/users/api/

role_attribute_path = role

Step3:

Restart Grafana server.

sudo service grafana-server restart (Ubuntu / Debian)

brew services restart grafana (MAC)

or

run grafana server sous windows with config file

-cd grafana/bin

-grafana-server --config ../conf/custom.ini

sadokbani's Projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.