Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Only allowed users can execute benchmarks#11

Open
enthusiastmartin wants to merge 2 commits intoparitytech:masterfrom
galacticcouncil:allowed_users
Open

Only allowed users can execute benchmarks#11
enthusiastmartin wants to merge 2 commits intoparitytech:masterfrom
galacticcouncil:allowed_users

Conversation

@enthusiastmartin
Copy link

Added a configurable option to allow only selected users to execute benchmarks.

It is done via ALLOWED_USERS env - details are in README.

If not provided - any user is allowed (original behavior).


Add `ALLOWED_USERS` with comma separated list of user's github ids. Eg:

`ALLOWED_USERS=123,455,234`
Copy link
Member

Choose a reason for hiding this comment

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

can we not support usernames directly?

Copy link
Author

@enthusiastmartin enthusiastmartin Apr 19, 2021

Choose a reason for hiding this comment

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

I believe it would be possible. One of the reasons that i went with ids was that you can change your username ( although probably not very common thing to do).

Copy link
Member

Choose a reason for hiding this comment

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

I think even if users can change their username, we would prefer this, as it is much easier to audit.

Copy link
Contributor

Choose a reason for hiding this comment

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

Github IDs are immutable, therefore saner to rely on. You don't risk having someone hijack a username to execute the commands. I don't get why it would be harder to audit - even if that were the case, the stability makes up for it.

Copy link
Author

Choose a reason for hiding this comment

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

Github IDs are immutable, therefore saner to rely on. You don't risk having someone hijack a username to execute the commands. I don't get why it would be harder to audit - even if that were the case, the stability makes up for it.

imo, this is good point.

Obliviously i can change this PR and use usernames instead of ids - so let me know what would you prefer.

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
@cla-bot-2021
Copy link

cla-bot-2021 bot commented May 11, 2021

User @enthusiastmartin, please sign the CLA here.

@joao-paulo-parity
Copy link
Contributor

I did not forget this MR. I have plans of migrating this repository to another code base (#51) which already implements a similar access control functionality for organizations and we could implement it for users as well, after the refactor is done.

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.

3 participants