13

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.

Matthew Groves
  • 25,181
  • 9
  • 71
  • 121
bastianneu
  • 2,059
  • 2
  • 18
  • 31
  • 5
    it's not bad practice, it's just not done. would you call delivering a car without breaks bad practice? – markus Jul 28 '09 at 12:33
  • and I don't understand why it should be difficult to explain this to a customer. I just tell my customer: there is a big problem with the way your applications stores passwords, this is very very very dangerous, we need to change that soon! this is not a problem to take lightly, we should try to squeeze it into the agenda this week! – markus Jul 28 '09 at 12:36
  • I understand your point from an developer perspective...but a lot of customers need ideas presented like "their own ideas". I want them to understand the need behind this wihtout forcing them. I hope that clears it up a little... – bastianneu Jul 28 '09 at 12:40

11 Answers11

11

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
  • 28,507
  • 14
  • 48
  • 67
  • 4
    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 Jul 28 '09 at 12:24
  • there is no part for "security" in our customer wishes. :-) – bastianneu Jul 30 '09 at 06:12
7

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
  • 233,326
  • 40
  • 323
  • 462
  • 4
    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 Jul 28 '09 at 12:57
  • 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 Jul 30 '09 at 06:14
4

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
  • 7,635
  • 1
  • 31
  • 34
  • 1
    I am not sure i they can handle that. I dont want them to feel stupid about recent Descisions. – bastianneu Jul 28 '09 at 12:23
  • 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 Jul 28 '09 at 12:31
  • @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 Jul 28 '09 at 12:35
4

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
  • 660
  • 3
  • 9
3

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.

Community
  • 1
  • 1
Chris
  • 9,209
  • 16
  • 58
  • 74
  • 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 Jul 28 '09 at 12:18
  • @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 Jul 28 '09 at 12:36
  • 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 Jul 28 '09 at 12:47
2

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
  • 11,583
  • 20
  • 64
  • 98
1

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.

Patrick Desjardins
  • 136,852
  • 88
  • 292
  • 341
  • 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 Jul 28 '09 at 12:28
  • 2
    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 Jul 28 '09 at 12:29
  • 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. – Patrick Desjardins Jul 28 '09 at 12:35
1

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.

dominic
  • 468
  • 1
  • 5
  • 14
0

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
  • 1,378
  • 1
  • 13
  • 22
  • 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 Jul 28 '09 at 12:28
  • 1
    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 Jul 28 '09 at 12:59
  • I disagree strongly that 'you needn't worry', for all sorts of reasons, from not caring about doing things well, to that simply because the current system doesn't store sensitive data doesn't mean that it won't in future. – nicodemus13 Jan 17 '12 at 17:12
0

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
  • 10,404
  • 8
  • 51
  • 81
  • 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 Jul 28 '09 at 12:32
  • They only 'don't care' because they are ignorant and nothing has yet happened to point out how serious things could be. That they haven't asked for it is neither here, nor there. You're a professional who should be offering them advice based on what you think is the correct way of doing things. If someone built you a house without insulation and they pointed out you hadn't asked for it, I don't think you'd be impressed! However, I appreciate that it can be very difficult to make people understand the importance of things they have no interest in. I guess you have to FRIGHTEN them :) – nicodemus13 Jan 17 '12 at 17:15
0

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
  • 2,447
  • 1
  • 15
  • 26