-
Notifications
You must be signed in to change notification settings - Fork 42
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
Backend auth #65
Backend auth #65
Conversation
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
61b3810
to
d0d019d
Compare
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
d472fae
to
d09d207
Compare
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general, left a couple comments, and needs some testing!
rtr.HandleFunc("/api/agent/list", s.agentList) | ||
rtr.HandleFunc("/api/agent/ban", s.agentBan) | ||
rtr.HandleFunc("/api/agent/delete", s.agentDelete) | ||
rtr.HandleFunc("/api/agent/createjointoken", s.agentCreateJoinToken) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im assuming now that its serving from the same domain / server that CORS policy isnt required and that's why its removed yea? or was in put in a different way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes so I added middleware for the authorization function, and I put the CORS handler there
api_permissions["/api/tornjak/selectors/register"] = []string{"admin"} | ||
api_permissions["/api/tornjak/clusters/create"] = []string{"admin"} | ||
api_permissions["/api/tornjak/clusters/edit"] = []string{"admin"} | ||
api_permissions["/api/tornjak/clusters/delete"] = []string{"admin"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have this be part of a map defined instead so it's easier to view, and also we don't have to initialize it each time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lumjjb we will be externalizing it into a config file as a separate effort, lead by our intern. Let's leave this as is for now.
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
79b4a53
to
0c8844a
Compare
Signed-off-by: Maia Iyer <maia.raj.iyer@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
For early review. Backend implementation for #63 Currently in progress: