Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Add PowerAuthGroups: users in these unix groups get admin access #215

Merged
merged 4 commits into from
Jun 27, 2017

Conversation

sjmudd
Copy link
Collaborator

@sjmudd sjmudd commented Jun 26, 2017

This simplifies the configuration and avoiding the need to have to explicitly name all PowerAuthUsers. If the authenticated user is in the given list of groups then they will be given "admin" / write access.

So you can change what may be a large list of

  "PowerAuthUsers": ["usera", "userb", "userc", "...", "userz", "api_user1", "api_user2" ],

with something like

  "PowerAuthGroups": [ "orchestrator_users_group", "orchestrator_api_users_group" ],

That is put the user in the right unix group and orchestrator will be happy. Note: this does assume that you are using something like nginx to provide the authentication service etc.

  • contributed code is using same conventions as original code
  • code is formatted via gofmt (please avoid goimports)
  • code is built via ./build.sh

This simplifies the configuration and avoiding the need to have
to explicitly name all PowerAuthUsers. If the authenticated user
is in the given list of groups then they will be given "admin"
type access.
@shlomi-noach
Copy link
Collaborator

Thank you -- this looks real good. Would you mind moving this away from the http package and into the os package?

@sjmudd
Copy link
Collaborator Author

sjmudd commented Jun 27, 2017

ok, will do.

@shlomi-noach shlomi-noach merged commit 07a6dc7 into master Jun 27, 2017
@shlomi-noach shlomi-noach deleted the github_unixgroup_check branch June 27, 2017 05:29
@sjmudd
Copy link
Collaborator Author

sjmudd commented Jun 27, 2017

So moved the files as requested to os, and fixed a small issue noted with go vet / golint.

@sjmudd
Copy link
Collaborator Author

sjmudd commented Jun 27, 2017

Thanks for the fast response.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants