Skip to content
New issue

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

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

Already on GitHub? # to your account

Protect AWS Credentials #1763

Closed
gisjedi opened this issue Aug 31, 2019 · 5 comments
Closed

Protect AWS Credentials #1763

gisjedi opened this issue Aug 31, 2019 · 5 comments
Assignees
Milestone

Comments

@gisjedi
Copy link
Contributor

gisjedi commented Aug 31, 2019

Pain Point? Please describe.
Currently when you specify AWS Access Key ID and Secret Access Key for either S3 Workspace or Strike (to authenticate to SQS queue) there is no protection for the ID and Key. Any user that can access the API as a read user will be able to extract the credentials.

Desired Solution
One solution would be to push all credentials into Vault, but this would make it a hard requirement of Scale. Presently, we don't require it by default. It would then be necessary to only make it a one-way update, reading would be restricted to the executing strikes / pre-tasks.

Alternative / Workaround
We could alternatively just lock the API down to only allow read of the credentials when the user has is_staff flag. This would break the UI for the workspace and strike views of non-privileged users.

@JohnPTobe
Copy link

Assuming it's not a problem if scale admins can see s3 keys for workspaces/strikes I say we just return 'hunter2' for those fields in the API regardless of who's logged in.

@JohnPTobe
Copy link

That displays as ******* for everyone else right?

@gisjedi
Copy link
Contributor Author

gisjedi commented Sep 1, 2019

Yeah, just allow GET only of workspaces / strikes for users with is_staff set to False and sanitize the credentials.

@cshamis
Copy link

cshamis commented Sep 1, 2019 via email

@JohnPTobe JohnPTobe self-assigned this Sep 2, 2019
@JohnPTobe
Copy link

I'll sanitize those fields by default in the convert_config_to_v6_json method used by the workplace serializer. Thus you have to explicitly have a flag passed from the api that an admin is requesting the object and if we miss an object that has a workplace as a relation it won't be leaked accidentally.

@emimaesmith emimaesmith added this to the Sprint 6 milestone Sep 3, 2019
@gisjedi gisjedi closed this as completed in 603c8d7 Sep 5, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants