@MOM - I have no clue what that has to do with this thread, but thank you for sharing
___________________________
SECURITY:
After nailing down the last of my database node system, instead of moving on to stored procedures and triggers (which honestly, I might not even need) I decided to follow the theme that I know nothing and do some in-depth research on security. I read some really long articles, 2 entire PDF's and trolled stack-overflow. This all brought me to the conclusion that nobody is posting anything "real" about site (primarily database, for now) security. I have seen some of the dumbest suggestions I have ever encountered on how to make a site secure.
A lot of people seem to think it's "secure" to store your keys in the same table that you store your users. I drew that out on paper and thought about it a lot. There is nothing secure about that. The whole point of a key is to have a "multiplier" (so to speak) that no one can find or knows, in order to decrypt your hashes. If someone is banging the fuck out of your user table, you would be essentially giving them the key. So, that way is stupid.
I have seen suggestions to do hash inside of hash. This is also retarded on so many levels. For one, hashing inside of a hash the way people were suggesting is doing nothing but creating a potential collision nightmare. For two, it's just ghetto. It's the made up junky way to misuse 2 or more systems in order to convince yourself your hash diarrhea is secure, and it is not.
I also saw suggestions to make up your own encryption and never tell anyone how it works. This is the most laughable suggestion to date. For one, my software is intended to be open source, so there is no way to "not tell anyone". For two, creating your own encryption methods is just a huge waste of time. There are industry standards. There are encryption methods built to follow those standards. Chances are super duper high that "your" encryption method is gonna be really sad and pathetic in comparison.
After reading all this garbage I changed my search criteria. I already knew that I wanted to salt a variable, hash it and then make thousands of passes. Reading all of the above was a waste of time. What I really needed to know is where is a safe place to store your keys.
This led me to a whole freakin lot of either stupid or not possible (for me) type of answers.Everything from storing them in the user table, to having a dedicated server which is completely separate from your domain... and it's only purpose is to validate stuff. I really like that idea, but It's just not realistic for me.
I did however dig up one post that had a realistic idea that I also liked - storing keys as environmental variables in either httpd-conf or .htaccess. This way made sense to me. In the case of httpd-conf the file is completely outside of htdocs and therefore probably un-retrievable. In the case of .htaccess, apache will not serve up .htaccess files, so chances are much slimmer that someone can get to the keys. In both cases it is not absolutely fool-proof but it is definitely way better than sticking keys in the user table (or any other table for that matter).
So that's where I am now. I have my entire database thought out and installed and I have the framework for the root of my security model hashed out. My goal is to have the entire sign - in/out/up process completed tonight. This is both easy and hard. 2 simple forms and a "log-out" button wrapped in my security model will get the job done but, I think I want to also play with some ajax and add a "premonition" layer to the forms. I also want to work with some jquery and get some attractive error messages displaying.
So, just getting some sign-action forms to plug into the database is cake. Making the page know who you are before you even finish typing and displaying errors right after you make them is a little more work. Fortunately, I have already done all of these ideas at one time or another and I am positive there is some starter/example code hanging out on one of my drives. I may even be able to copy/paste much of it as is. Even if I have to write it all from the ground up, I'm not discouraged. I know jquery very well and actually love coding in it so, regardless, I'm just going to keep trucking and moving my project forward.
___________________________
SECURITY:
After nailing down the last of my database node system, instead of moving on to stored procedures and triggers (which honestly, I might not even need) I decided to follow the theme that I know nothing and do some in-depth research on security. I read some really long articles, 2 entire PDF's and trolled stack-overflow. This all brought me to the conclusion that nobody is posting anything "real" about site (primarily database, for now) security. I have seen some of the dumbest suggestions I have ever encountered on how to make a site secure.
A lot of people seem to think it's "secure" to store your keys in the same table that you store your users. I drew that out on paper and thought about it a lot. There is nothing secure about that. The whole point of a key is to have a "multiplier" (so to speak) that no one can find or knows, in order to decrypt your hashes. If someone is banging the fuck out of your user table, you would be essentially giving them the key. So, that way is stupid.
I have seen suggestions to do hash inside of hash. This is also retarded on so many levels. For one, hashing inside of a hash the way people were suggesting is doing nothing but creating a potential collision nightmare. For two, it's just ghetto. It's the made up junky way to misuse 2 or more systems in order to convince yourself your hash diarrhea is secure, and it is not.
I also saw suggestions to make up your own encryption and never tell anyone how it works. This is the most laughable suggestion to date. For one, my software is intended to be open source, so there is no way to "not tell anyone". For two, creating your own encryption methods is just a huge waste of time. There are industry standards. There are encryption methods built to follow those standards. Chances are super duper high that "your" encryption method is gonna be really sad and pathetic in comparison.
After reading all this garbage I changed my search criteria. I already knew that I wanted to salt a variable, hash it and then make thousands of passes. Reading all of the above was a waste of time. What I really needed to know is where is a safe place to store your keys.
This led me to a whole freakin lot of either stupid or not possible (for me) type of answers.Everything from storing them in the user table, to having a dedicated server which is completely separate from your domain... and it's only purpose is to validate stuff. I really like that idea, but It's just not realistic for me.
I did however dig up one post that had a realistic idea that I also liked - storing keys as environmental variables in either httpd-conf or .htaccess. This way made sense to me. In the case of httpd-conf the file is completely outside of htdocs and therefore probably un-retrievable. In the case of .htaccess, apache will not serve up .htaccess files, so chances are much slimmer that someone can get to the keys. In both cases it is not absolutely fool-proof but it is definitely way better than sticking keys in the user table (or any other table for that matter).
So that's where I am now. I have my entire database thought out and installed and I have the framework for the root of my security model hashed out. My goal is to have the entire sign - in/out/up process completed tonight. This is both easy and hard. 2 simple forms and a "log-out" button wrapped in my security model will get the job done but, I think I want to also play with some ajax and add a "premonition" layer to the forms. I also want to work with some jquery and get some attractive error messages displaying.
So, just getting some sign-action forms to plug into the database is cake. Making the page know who you are before you even finish typing and displaying errors right after you make them is a little more work. Fortunately, I have already done all of these ideas at one time or another and I am positive there is some starter/example code hanging out on one of my drives. I may even be able to copy/paste much of it as is. Even if I have to write it all from the ground up, I'm not discouraged. I know jquery very well and actually love coding in it so, regardless, I'm just going to keep trucking and moving my project forward.
Comment