views:

438

answers:

11

I want to call "storing a password in plain text in a Database" a bad pratice... but our customer did this in his Application. They want me to renew that Application.

My point: I want to change this...but since it is not a need for our Customer it is still unclear.

How do you handle such issues regarding security? From my point of view it is difficult to explain such issues to Customers.

+1  A: 

You should simply explain to the customer that login is not secure if someone with bad intention has access to the database. If the application it's inside the company, maybe it's not worth to change it. You have to analyse if it's really a value and you can only know it by talking with the customer. Maybe the data is not very confidential and it's not a priority to have a lot of security. All depend of the software goal and where is the database and what the customer want its data secure.

Daok
There is a point to which software goals are relevant. Goals change. Maybe today's data isn't very confidential, but tomorrow's might. And maybe the database is only accessible internally, but it will later be externally exposed. The fact that there is a password system at all tells me that there's some minimal need for security, and it seems to me that plaintext storage doesn't meet that need. If it was worthwhile to implement a password system, it's worthwhile to store the passwords securely.
Imagist
Even if the data in that database isn't particularly high value, chances are the users are re-using their passwords on other systems.
caf
In a perfect world I would agree 100% with you caf, but sometime in the real world the customer might not want to invest money to fix these kind of problem. Customer has the last word and this is why you need to talk to him and to show him the possibility of problem but at the end the choice might not be to fix it if HE believe it doesn't worth it.
Daok
+3  A: 

Never store a password in plaintext.

I would recommend to read those questions:

If your customer isn't interested in details - just implement it. (Also provide a proper password recovery procedure). It's not really a big deal for you as a programmer but really improves the security & quality of your product.

If he wants to know what you intend to change - explain it to him. Tell him about the security issues and he will understand. Also a live example really helps to open customer eyes: Simply retreive his password from their old system and show him how easy it would be for everyone.

I've always done it that way: If I feel it's important to have a security feature in one of my products - I've always included it. It adds a big plus to the quality of your products and gives you many "woah you thought of everything" moments.

Chris
yeah ive already read those question..my focus on that question here was if i just implement it in best practice way without matching our customer needs.
bastianneu
@bastianneu: "without matching our customer needs"? What? What need? A need to publicize passwords? That doesn't seem to be a rational need.
S.Lott
they do not ask for it. I know that is damm dangerous but we are writing Software for our Customers and not for us. So i want them to get an Idea about it.
bastianneu
+4  A: 

If you can, a live demonstration works great. Ask the user to create an account with a password (not the password they normally use). Go into the database and retrieve, and explain that anyone who has access to your database (either by permission, or via a security breach) can simply go ahead and do this.

tschaible
I am not sure i they can handle that. I dont want them to feel stupid about recent Descisions.
bastianneu
A quick caution; explain to the user what you're doing BEFORE you do this and get permission to do it. The best intended white-hatting can turn to black-hatting in the eyes of the law with the help of an ill-informed user.
Imagist
@bastianneu: "I dont want them to feel stupid" The decision was stupid. How you portray that decision, however, is another matter. You don't have to use the word "stupid" even if it was stupid. You can call it "questionable" or "second-best" or "nearly correct".
S.Lott
i love "nearly correct" :-)
bastianneu
+6  A: 

Write a short, clear and jargon-free formal letter stating your concerns and concluding that in your professional opinion, it should be rectified. Address it to someone reasonably high up in the customer.

If they then choose to ignore your advice, that's their prerogative.

(Keep a copy of the letter yourself, too.)

caf
Thats a really nice Idea.
bastianneu
Having it written is not a bad idea. But I would address this issue by phone or in person (if possible) explaining the security dangers. If they refuse to change their point of view you can always tell them that you feel that you are going to send them a letter.
borjab
Thank you for that addition.
bastianneu
I like this answer the most cause it is really an good adivce for an developer if he/she has concerns about some tasks.
bastianneu
+10  A: 

I think "bad practice" is an understatement. "Irresponsible" might be more accurate.

If it's worth to protect it with a password, it's worth doing it properly. Storing passwords in plain text is an embarrassing security breach waiting to happen.

If "security" is anywhere in your customers wishes (which I guess it is, since there are passwords), they've implicitly asked for a decent security system, which includes proper handling of passwords. They may not ask for "passwords being stored securely" (hashed and salted) because they're not the experts; that's what they hired you for.

Rik
You are right. I am still working on my English Skills
bastianneu
Don't beat yourself up over your English skills; your question is very readable. It's just that I think "bad practice" is sort of a weasel word, and password security is more like a fundamental law every programmer should know and never break.
Rik
there is no part for "security" in our customer wishes. :-)
bastianneu
A: 

From a strictly professional point of view, you have to ask yourself if leaving it as is would pose as a problem later on (do you have a support contract that may be called on in the event of a highjacker stealing a pass from the DB?)

Personally, I do not think it is hard to explain to someone why storing passes un-encrypted is unsafe, however, as Daok pointed, you really needn't worry about passes on system that does not hold private-personal-secret-magical data.

Nowadays it seems so easy to use encryption for this purpose that, depending on the technology you are using, it could mean just the slightest effort in coding and time to get it done.

Cheers mate!

Donato Azevedo
Well my point is that i dont want to implement something for our Customer that is not demanded. Talking about handling Passwords is sometimes an challenging issue.
bastianneu
Agreed, though you see that there is a, somewhat moral, issue involved, in the sense that, given that it it is a security breach, or let's just say, a bad practice, as a professional you *should* let them know. However, as you said, your client may not want it and have the reasons not to want it, in which case you may just rest!
Donato Azevedo
Thank you for that comment.
bastianneu
+1  A: 

I would explain that what they have done is bad practice and ask them if they would like you to change it. I would advice against doing anything outside the permit of what you were asked to do without consulting them.

denis
A: 

Demonstrations and explanations are most useful, but when you say you are to "renew" the Application, are you working from documentation, a functional or technical specification?

Asking to be involved in finalising these documents and included in their sign-off would be a good idea.

Ultimately, it is a need for the customer, they just don't realise it yet.

Unsliced
Thats the point. They dont know about Security and i think they dont care. I got a bad feeling if i show them this password change. They dont ask for it. I going to implement it in "best pratice" Way but giving them an idea about this...
bastianneu
+4  A: 

The best reason to never keep password in plain text is actually a legal one.

There are laws, such as the Data Protection Act in the UK, which state that reasonable efforts must be made to keep sensitive data secure. Storing passwords in plain-text will clearly violate this, and in turn potentially null any indemnity insurance you have in the event of a breach of security. This could leave you open to a large liability suit if you don't take this simple measure.

When it comes to business men, you always have to talk in terms of their pockets, and stating that an hours work to hash the passwords, and change the login will cost them a tiny amount compared to the potential cost if something went badly wrong.

It would also be worth noting, that if someone has designed a system as fundamentally flawed as this, the likely hood of there being an error which can expose sensitive data like this is exponentially higher.

On top of this, as others stated, a live demonstration is good. take a random staff members password out of the database, and try it on their other systems, you won't have to try many before your in.

Bittarman
+1 Interessting point. Thank you
bastianneu
+2  A: 

Bastanneu, do you know the English expression "Cover your a**"? Imagine this scenario:

  1. You are worried they don't care about security and they don't want to hear your message. You tell them anyway and they say no to any changes.
  2. They get hacked.
  3. They ask you why didn't say anything earlier.

I recommend you make your concerns known upfront. And keep proof (signed letter, etc.).

PowerUser
Thats the Scenario i am afraid of.
bastianneu
A: 

This is a situation where you have to phrase things properly. Plaintext passwords is not something you phrase as "bad practice". It's something you phrase as broken, something that simply can not be done. You must make your contract contingent on fixing their password storage, it is not optional. That's not to say you can't have a friendly discussion about why it can't be done, but you must make it clear that you won't do it, no matter what.

Then the question becomes how do you convince the business folks that it is not a valid solution. This should also be fairly easy. Find the decision makers, and bring them to a machine where you have the database query browser open. Type out the query "Select password from credentials where username ='DECISION_MAKERS_USERNAME'", then have the decision maker execute it (be polite and don't watch the screen as they do it) Explain that any employee with database access will be able to do this. Generally I would think that would do the trick, but if you need to do further convincing explain that a large portion of users share passwords across applications, and that any employee would be able to break into things like bank accounts, email accounts, etc with it. If that still isn't enough, explain examples of lawsuits and fines for companies that have done this.

Whatever you do, don't explain the technical details of any of it. Just show the consequences. Don't explain hashes, salts, or use words like "plaintext". Just explain that is it is now, people can see passwords, and that it will be easy to change it so that nobody can see the passwords, but they still would work.

If you can't convince them, don't take the client. And you should probably warn the users of the app that their passwords are not securely stored.

Brian Schroth