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

Passwords should never be in a response body #59

Open
philsturgeon opened this issue Mar 1, 2024 · 0 comments
Open

Passwords should never be in a response body #59

philsturgeon opened this issue Mar 1, 2024 · 0 comments

Comments

@philsturgeon
Copy link
Contributor

User Story Description

As a API designer, I need to be reminded that a password should never ever ever be returned from an API in any situation, hashed or otherwise, so I can avoid turning up in one of Troy Hunts blog posts.

During my 14 years at Pfizer, I once reviewed an iOS app built for us by a low-cost off-shored development shop. I proxied the app through Fiddler, watched the requests and found an API that was returning every user record in the system and for each user, their corresponding password in plain text. When quizzing the developers about this design decision, their response was - and I kid you not, this isn't made up - "don't worry, our users don't use Fiddler" 🤦‍♂️
I cannot think of any reason ever to return any user's hashed password to an y interface, including an appropriately auth'd one where only the user themselves would receive it.
https://www.troyhunt.com/how-spoutibles-leaky-api-spurted-out-a-deluge-of-personal-data/

Acceptance Criteria

We could add a rule which says any field called password or password_* should be writeOnly: true.

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

No branches or pull requests

1 participant