Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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!!!!!
(__) (\/) /-------\/ / | 666 || * ||----||

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://63433]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2017-06-29 00:34 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (653 votes). Check out past polls.