Skip to content
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

Normal users should not be able to create/end leases for other people #137

Open
joshmarsh opened this issue Nov 21, 2019 · 4 comments
Open
Labels
bug Something isn't working

Comments

@joshmarsh
Copy link
Contributor

Is your feature request related to a problem? Please describe.
While authenticating with temporary sts credentials mapped to a cognito user called testuser, I observed the following behavior.

~ dce leases create --budget-amount 100.0 --budget-currency USD --email jane.doe@optum.com --principle-id jdoe99
Lease created: {"accountId":"XXX","budgetAmount":100,"budgetCurrency":"USD","budgetNotificationEmails":["jane.doe@optum.com"],"createdOn":1574347343,"expiresOn":1574952143,"id":"d7586b82-2b57-4ba0-9469-ba59d865e823","lastModifiedOn":1574347343,"leaseStatus":"Active","leaseStatusModifiedOn":1574347343,"leaseStatusReason":"Active","principalId":"jdoe99"}
~ dce leases end --account-id XXX --principle-id jdoe99
Lease ended

Describe the solution you'd like
Respond with 403 for any leases requests involving a principaID that is not your own.

@joshmarsh
Copy link
Contributor Author

joshmarsh commented Nov 21, 2019

Related CLI Issue: Optum/dce-cli#37

@eschwartz
Copy link
Contributor

For sure.

We should probably step back and look at a authorization strategy for all our endpoints....

@kddejong
Copy link
Contributor

kddejong commented Nov 21, 2019

agreed. Users when creating a lease shouldn't provide their principal. Admins should be able to override that value. I think these are things that get easier to do when we getting some of the code changes in.

@kapilt
Copy link
Contributor

kapilt commented Nov 23, 2019

and a security oriented review

@eschwartz eschwartz added the bug Something isn't working label Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants