Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

36 other auth solutions for dashboards #42

Conversation

hasanheroglu
Copy link
Contributor

Closes #36.

Here, I added a forward auth mechanism. Therefore traefik forwards requests for prometheus, cadvisor and traefik to GitHub authentication. We need to set an environment variable (WHITELISTED_EMAILS) to whitelist emails. Also, we need to create a GitHub OAuth application and use its configuration to successfully log in.

Grafana and Portainer use their own authentication mechanisms and we need to configure them using their UIs. For Grafana, it is possible to give permissions depending on the user's GitHub data. A simple role attribute path would be [email==<USER_EMAIL>] && 'Admin' || 'Viewer' to give specific USER_EMAIL admin permissions and all other viewer permissions. Check Grafana documentation for more details. Furthermore, it is possible to create teams and limit access to dashboards to certain teams and users.

Copy link
Member

@egekorkan egekorkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. The comments above are due to production environment

@@ -37,6 +35,24 @@ services:
reservations:
cpus: '0.05'
memory: 50M
test-things-auth:
image: thomseddon/traefik-forward-auth:2-arm64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to check if we can use the arm image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repo for forward auth is not very well managed, even though this says arm64 all the images in Docker Hub are amd64. I can rename this.

.env Show resolved Hide resolved
Signed-off-by: Hasan Eroglu <[email protected]>
@egekorkan
Copy link
Member

In today's meeting, the idea was to use the github teams after asking Eclipse. This can be easily added during deployment via role attribute field role_attribute_path = contains(groups[*], '@my-github-organization/my-github-team') && 'Editor' || 'Viewer' (see https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/github/#org-roles-mapping-example). We do not even need Editor role

@egekorkan egekorkan merged commit 60cf20b into eclipse-thingweb:main Sep 20, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Other Auth Solutions for Dashboards
2 participants