-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement GitHub authentication #115
Comments
I implemented a first version of this. It can be enabled by setting the After successfully authenticating, the node will create a JWT token based on the user's role in the organization and the allowed projects/users for the node:
Admins can manage node users and projects using the To test this you will ideally need a github organization with at least two members, one admin and one regular member. For convenience I added a logout command which will erase the stored token and allow you to log in with a different user: |
After some discussion we implemented a few changes to this flow:
So now an example flow might look like this: Someone with admin accces to the AWS account creates a node and ties it to their GitHub user.
After creating the node they have admin rights to manage it. They can now add users using the
which will return
Then the user can use this command to log in and start deploying projects to the node. However with the
After logging in again they will have admin permissions. Users can also be removed using the
|
In order to have team features we need a way to authenticate and authorize users. The current idea is to use GitHub as an identity provider and perform authorization based on organization roles.
The GitHub oauth flow is described here. We will be using the web application flow which is a bit more user friendly since it doesn't require the user to manually enter a code. Instead, it requires us to host a small callback application on our side which will be used by GitHub to perform authentication.
An overview of the architecture can be seen here:
auth
function on the mantil node which knows the public/private key pair used to generate JWT tokens. It then performs authorization by checking organization access rights and allowed projects/users (stored somewhere on the node) and creates the corresponding JWT token.auth
function then sends the token back to the user's NATS channel.The text was updated successfully, but these errors were encountered: