Skip to content

Commit

Permalink
feat: configure github login (#51)
Browse files Browse the repository at this point in the history
* feat: configure github login

* feat: restrict github user to skkuding
  • Loading branch information
dotoleeoak authored May 24, 2024
1 parent ce01bcd commit 914ba47
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/update-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
MINIO_ROOT_USER = ${{ secrets.MINIO_ROOT_USER }}
MINIO_ROOT_PASSWORD = ${{ secrets.MINIO_ROOT_PASSWORD }}
MS_WEBHOOK_URL = ${{ secrets.MS_WEBHOOK_URL }}
GH_CLIENT_ID = ${{ secrets.GH_CLIENT_ID }}
GH_CLIENT_SECRET = ${{ secrets.GH_CLIENT_SECRET }}
EOF
Expand All @@ -33,7 +35,7 @@ jobs:
docker compose --profile start-up ps -q
echo EOF
} >> "$GITHUB_OUTPUT"
- name: when initial containers are not running, start all containers
if: steps.check-start-up-container.outputs.stdout == ''
run: >
Expand Down
14 changes: 13 additions & 1 deletion config/grafana/grafana.ini
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ domain = grafana.codedang.com
;
;# The full public facing url you use in browser, used for redirects and emails
;# If you use reverse proxy and sub path specify full url (with sub path)
root_url = %(protocol)s://%(domain)s
root_url = https://grafana.codedang.com
;
;# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
serve_from_sub_path = true
Expand Down Expand Up @@ -98,3 +98,15 @@ startTLS_policy = MandatoryStartTLS
;welcome_email_on_sign_up = false
;templates_pattern = emails/*.html, emails/*.txt
;content_types = text/html

#################################### AUTH ##########################
[auth.github]
enabled = true
client_id = ${GH_CLIENT_ID}
client_secret = ${GH_CLIENT_SECRET}
allow_signup = true
auto_login = false
skip_org_role_sync = true
allowed_organizations = ["SKKUDING"]
# TODO: Configure team sync
# https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/github/#configure-team-synchronization

0 comments on commit 914ba47

Please sign in to comment.