Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Obscuring sensitive data in Perl code?

by Madams (Monk)
on Mar 10, 2001 at 07:34 UTC ( #63433=note: print w/ replies, xml ) Need Help??


in reply to Re: Obscuring sensitive data in Perl code?
in thread Obscuring sensitive data in Perl code?

Eeek.......! Using environment variables for sensitive data is bad, bad, bad!!!!!!!
type env at a prompt and wala...out pops the data!!!!!
_________________
madams@scc.net

(__) (\/) /-------\/ / | 666 || * ||----||


Comment on Re: Re: Obscuring sensitive data in Perl code?
Select or Download Code
Re: Re: Re: Obscuring sensitive data in Perl code?
by turnstep (Parson) on Mar 11, 2001 at 07:33 UTC

    Yes, but if you someone already has shell access to *that* account, then there is already a bigger problem. If I create a script like the above, and make it chmod 755, nobody is going to get the sensitive data unless they are logged in as me, althought anyone can read (and run) the script themselves. You can even use very restricted accounts (e.g. no shell access) for more security. The point is, you completely separate the sensitive data from the script. I like this particular way because I can do something like this in .bashrc:

    alias oradev='export ORACLE_SID=dev; export ORACLE_PASS=foo; \ export ORACLE_PASS=bar; echo Set instance to development'

    ...which allows easy interchange of instances, passwords, and other parameters from the command line. Nothing wrong with setting good permissions on an included file, either, but if you can run/read the script, you can track down and read the passwords.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://63433]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2014-07-31 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (247 votes), past polls