فهرست منبع

Merged with 2.0 docs and restored some stuff

Torkel Ödegaard 10 سال پیش
والد
کامیت
74a8fa61f2
3فایلهای تغییر یافته به همراه21 افزوده شده و 3 حذف شده
  1. 3 3
      conf/defaults.ini
  2. 2 0
      conf/sample.ini
  3. 16 0
      docs/sources/installation/configuration.md

+ 3 - 3
conf/defaults.ini

@@ -137,19 +137,20 @@ org_role = Viewer
 #################################### Github Auth ##########################
 #################################### Github Auth ##########################
 [auth.github]
 [auth.github]
 enabled = false
 enabled = false
+allow_sign_up = false
 client_id = some_id
 client_id = some_id
 client_secret = some_secret
 client_secret = some_secret
 scopes = user:email
 scopes = user:email
-team_ids =
 auth_url = https://github.com/login/oauth/authorize
 auth_url = https://github.com/login/oauth/authorize
 token_url = https://github.com/login/oauth/access_token
 token_url = https://github.com/login/oauth/access_token
 api_url = https://api.github.com/user
 api_url = https://api.github.com/user
+team_ids =
 allowed_domains =
 allowed_domains =
-allow_sign_up = false
 
 
 #################################### Google Auth ##########################
 #################################### Google Auth ##########################
 [auth.google]
 [auth.google]
 enabled = false
 enabled = false
+allow_sign_up = false
 client_id = some_client_id
 client_id = some_client_id
 client_secret = some_client_secret
 client_secret = some_client_secret
 scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
 scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
@@ -157,7 +158,6 @@ auth_url = https://accounts.google.com/o/oauth2/auth
 token_url = https://accounts.google.com/o/oauth2/token
 token_url = https://accounts.google.com/o/oauth2/token
 api_url = https://www.googleapis.com/oauth2/v1/userinfo
 api_url = https://www.googleapis.com/oauth2/v1/userinfo
 allowed_domains =
 allowed_domains =
-allow_sign_up = false
 
 
 #################################### Logging ##########################
 #################################### Logging ##########################
 [log]
 [log]

+ 2 - 0
conf/sample.ini

@@ -136,6 +136,7 @@
 #################################### Github Auth ##########################
 #################################### Github Auth ##########################
 [auth.github]
 [auth.github]
 ;enabled = false
 ;enabled = false
+;allow_sign_up = false
 ;client_id = some_id
 ;client_id = some_id
 ;client_secret = some_secret
 ;client_secret = some_secret
 ;scopes = user:email
 ;scopes = user:email
@@ -148,6 +149,7 @@
 #################################### Google Auth ##########################
 #################################### Google Auth ##########################
 [auth.google]
 [auth.google]
 ;enabled = false
 ;enabled = false
+;allow_sign_up = false
 ;client_id = some_client_id
 ;client_id = some_client_id
 ;client_secret = some_client_secret
 ;client_secret = some_client_secret
 ;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
 ;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email

+ 16 - 0
docs/sources/installation/configuration.md

@@ -182,6 +182,7 @@ Client ID and a Client Secret. Specify these in the grafana config file. Example
     auth_url = https://github.com/login/oauth/authorize
     auth_url = https://github.com/login/oauth/authorize
     token_url = https://github.com/login/oauth/access_token
     token_url = https://github.com/login/oauth/access_token
     allow_sign_up = false
     allow_sign_up = false
+    team_ids =
 
 
 Restart the grafana backend. You should now see a github login button on the login page. You can
 Restart the grafana backend. You should now see a github login button on the login page. You can
 now login or signup with your github accounts.
 now login or signup with your github accounts.
@@ -189,6 +190,21 @@ now login or signup with your github accounts.
 You may allow users to sign-up via github auth by setting allow_sign_up to true. When this option is
 You may allow users to sign-up via github auth by setting allow_sign_up to true. When this option is
 set to true, any user successfully authenticating via github auth will be automatically signed up.
 set to true, any user successfully authenticating via github auth will be automatically signed up.
 
 
+### team_ids
+Require an active team membership for at least one of the given teams on GitHub.
+If the authenticated user isn't a member of at least one the teams they will not
+be able to register or authenticate with your Grafana instance. Example:
+
+    [auth.github]
+    enabled = true
+    client_id = YOUR_GITHUB_APP_CLIENT_ID
+    client_secret = YOUR_GITHUB_APP_CLIENT_SECRET
+    scopes = user:email
+    team_ids = 150,300
+    auth_url = https://github.com/login/oauth/authorize
+    token_url = https://github.com/login/oauth/access_token
+    allow_sign_up = false
+
 ## [auth.google]
 ## [auth.google]
 You need to create a google project. You can do this in the [Google Developer Console](https://console.developers.google.com/project).
 You need to create a google project. You can do this in the [Google Developer Console](https://console.developers.google.com/project).
 When you create the project you will need to specify a callback URL. Specify this as callback:
 When you create the project you will need to specify a callback URL. Specify this as callback: