171 lines
6.3 KiB
HTML
171 lines
6.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>documentation:2.0:applications:grafana</title>
|
|
<meta name="generator" content="DokuWiki"/>
|
|
<meta name="robots" content="index,follow"/>
|
|
<meta name="keywords" content="documentation,2.0,applications,grafana"/>
|
|
<link rel="search" type="application/opensearchdescription+xml" href="../lib/exe/opensearch.html" title="LemonLDAP::NG"/>
|
|
<link rel="start" href="grafana.html"/>
|
|
<link rel="contents" href="grafana.html" title="Sitemap"/>
|
|
<link rel="stylesheet" type="text/css" href="../lib/exe/css.php.t.bootstrap3.css"/>
|
|
<!-- //if:usedebianlibs
|
|
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
|
|
//elsif:useexternallibs
|
|
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
|
|
//elsif:cssminified
|
|
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.min.css" />
|
|
//else -->
|
|
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.css" />
|
|
<!-- //endif -->
|
|
<script type="text/javascript">/*<![CDATA[*/var NS='documentation:2.0:applications';var JSINFO = {"id":"documentation:2.0:applications:grafana","namespace":"documentation:2.0:applications"};
|
|
/*!]]>*/</script>
|
|
<script type="text/javascript" charset="utf-8" src="../lib/exe/js.php.t.bootstrap3.js"></script>
|
|
<!-- //if:usedebianlibs
|
|
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
|
|
//elsif:useexternallibs
|
|
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
|
|
//elsif:jsminified
|
|
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.min.js"></script>
|
|
//else -->
|
|
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.js"></script>
|
|
<!-- //endif -->
|
|
<!-- //if:usedebianlibs
|
|
<script type="text/javascript" src="/javascript/jquery-ui/jquery-ui.min.js"></script>
|
|
//elsif:useexternallibs
|
|
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
|
|
//elsif:jsminified
|
|
<script type="text/javascript" src="/static/bwr/jquery-ui/jquery-ui.min.js"></script>
|
|
//else -->
|
|
<script type="text/javascript" src="/static/bwr/jquery-ui/jquery-ui.js"></script>
|
|
<!-- //endif -->
|
|
</head>
|
|
<body>
|
|
<div class="dokuwiki export container">
|
|
<!-- TOC START -->
|
|
<div id="dw__toc">
|
|
<h3 class="toggle">Table of Contents</h3>
|
|
<div>
|
|
|
|
<ul class="toc">
|
|
<li class="level1"><div class="li"><a href="#presentation">Presentation</a></div></li>
|
|
<li class="level1"><div class="li"><a href="#pre-requisites">Pre-requisites</a></div>
|
|
<ul class="toc">
|
|
<li class="level2"><div class="li"><a href="#grafana_configuration">Grafana configuration</a></div></li>
|
|
<li class="level2"><div class="li"><a href="#llng">LL:NG</a></div></li>
|
|
</ul></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- TOC END -->
|
|
|
|
<h1 class="sectionedit1" id="grafana">Grafana</h1>
|
|
<div class="level1">
|
|
|
|
<p>
|
|
<img src="grafana_logo.png" class="mediacenter" alt="" />
|
|
</p>
|
|
|
|
</div>
|
|
<!-- EDIT1 SECTION "Grafana" [1-69] -->
|
|
<h2 class="sectionedit2" id="presentation">Presentation</h2>
|
|
<div class="level2">
|
|
|
|
<p>
|
|
<a href="https://grafana.com/" class="urlextern" title="https://grafana.com/" rel="nofollow">Grafana</a> is an Open Source dashboard for monitoring databases such as Prometheus, Graphite or Elasticsearch
|
|
</p>
|
|
|
|
<p>
|
|
Grafana offers social login through a generic OAuth 2 connector. Thankfully, it is close enough to OpenID Connect to work well with LemonLDAP::NG
|
|
</p>
|
|
|
|
</div>
|
|
<!-- EDIT2 SECTION "Presentation" [70-376] -->
|
|
<h2 class="sectionedit3" id="pre-requisites">Pre-requisites</h2>
|
|
<div class="level2">
|
|
|
|
</div>
|
|
<!-- EDIT3 SECTION "Pre-requisites" [377-404] -->
|
|
<h3 class="sectionedit4" id="grafana_configuration">Grafana configuration</h3>
|
|
<div class="level3">
|
|
|
|
<p>
|
|
You should start by following the generic OAuth2 documentation provided by Grafana:
|
|
<a href="https://grafana.com/docs/grafana/latest/auth/generic-oauth/" class="urlextern" title="https://grafana.com/docs/grafana/latest/auth/generic-oauth/" rel="nofollow">https://grafana.com/docs/grafana/latest/auth/generic-oauth/</a>
|
|
</p>
|
|
|
|
<p>
|
|
Your configuration file will have to look something like this:
|
|
</p>
|
|
<pre class="code">[auth.generic_oauth]
|
|
enabled = true
|
|
client_id = CHOOSE_A_CLIENT_ID
|
|
client_secret = CHOOSE_A_CLIENT_SECRET
|
|
scopes = openid email profile
|
|
auth_url = https://auth.example.com/oauth2/authorize
|
|
token_url = https://auth.example.com/oauth2/token
|
|
api_url = https://auth.example.com/oauth2/userinfo
|
|
allow_sign_up = true
|
|
name = LemonLDAP::NG
|
|
send_client_credentials_via_post = false
|
|
email_attribute_name = email</pre>
|
|
|
|
</div>
|
|
<!-- EDIT4 SECTION "Grafana configuration" [405-1067] -->
|
|
<h3 class="sectionedit5" id="llng">LL:NG</h3>
|
|
<div class="level3">
|
|
|
|
<p>
|
|
Make sure you have already <a href="../idpopenidconnect.html" class="wikilink1" title="documentation:2.0:idpopenidconnect">enabled OpenID Connect</a> on your LemonLDAP::NG server
|
|
</p>
|
|
|
|
<p>
|
|
Then, add a Relaying Party with the following configuration
|
|
</p>
|
|
<ul>
|
|
<li class="level1"><div class="li"> Options » Authentification » Client ID : same as <code>client_id</code> above</div>
|
|
</li>
|
|
<li class="level1"><div class="li"> Options » Allowed redirection address : same as <code>client_secret </code> above</div>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>
|
|
If you want to transmit user attributes to Grafana, you also need to configure
|
|
</p>
|
|
<ul>
|
|
<li class="level1"><div class="li"> Extra Claims » </div>
|
|
<ul>
|
|
<li class="level2"><div class="li"> add a key named <code>profile</code></div>
|
|
</li>
|
|
<li class="level2"><div class="li"> set a value of <code>name username display_name upn</code></div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="level1"><div class="li"> Exported Attributes (not all of them are mandatory)</div>
|
|
<ul>
|
|
<li class="level2"><div class="li"> replace the existing keys with the following 5 new keys: </div>
|
|
<ul>
|
|
<li class="level3"><div class="li"> <code>name</code></div>
|
|
</li>
|
|
<li class="level3"><div class="li"> <code>username</code></div>
|
|
</li>
|
|
<li class="level3"><div class="li"> <code>display_name</code></div>
|
|
</li>
|
|
<li class="level3"><div class="li"> <code>upn</code></div>
|
|
</li>
|
|
<li class="level3"><div class="li"> <code>email</code> </div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="level2"><div class="li"> map them to your corresponding LemonLDAP::NG session attribute</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<!-- EDIT5 SECTION "LL:NG" [1068-] --></div>
|
|
</body>
|
|
</html>
|