in reply to encrypt passwords
Naturally, “a file of several hundred database passwords” would be a juicy prize. By definition, the software would have to have some means of decrypting the password, which means that anyone who stole the software (presuming that the password table is most-likely embedded somewhere in it), would get the prize. He would, by definition, possess both the encrypted values and the means to decrypt it. (Even if, as sometimes is done, some additional secret (sic) word must be entered separately.) No matter how you try to dress it up, it’s never good enough.
Long and short of it is ... you really don’t want to do it that way, at all. Instead, use LDAP (nee OpenDirectory, or Kerberos, etc.) to specify the autonomous program’s “role” and the permissions that “he” is therefore to have. The central authentication mechanism takes care of identifying the autonomous program (and the specific computer that it’s on), and of informing the database server what this program is permitted to do, without any further challenge. There’s no monkey-business of: “prove it, say the magic word.”
The program, being recognized, can do what he is authorized to do. (And every such request is specifically identified by the database server as “known to be coming from him.)” None of the rules that are used to authenticate, and none of the rules subsequently used to authorize, are anywhere within reach. If the program is compromised, a few clicks on a distant security-console and the authentication drops-dead on the spot. A few more clicks on the security-log then provide a complete run-down of what this credential had done.
Furthermore, it is highly desirable to carry this strategy one step further, to include identifying any user who’s, say, making requests of this autonomous program. This applies also to intra-net websites: ask the user for a magic word if you want to, but don’t allow a user who’s not authorized to be there, to even get the opportunity to enter one. (“Web-site? What web-site? Nahh, never heard of it. It’s 404 Not Found for you, pal.”)
Every database server, et al, out there, has the ability to do these things. (And Perl, of course, can query LDAP, Kerberos, etc., too.) Don’t authenticate based on what a user or a program “knows.” Rely on an independent, trusted authority, used enterprise-wide, that knows who he is. Trustworthy, open, technologies exist that can even do this across the public Internet, and your enterprise is already using them.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: encrypt passwords
by BrowserUk (Patriarch) on Apr 17, 2015 at 14:21 UTC | |
by marinersk (Priest) on Apr 17, 2015 at 17:24 UTC | |
by BrowserUk (Patriarch) on Apr 17, 2015 at 17:40 UTC | |
by marinersk (Priest) on Apr 17, 2015 at 18:17 UTC | |
by BrowserUk (Patriarch) on Apr 17, 2015 at 20:46 UTC | |
| |
|