Re: [Rd] secure password token management method in R

From: Barry Rowlingson <b.rowlingson_at_lancaster.ac.uk>
Date: Wed, 14 Dec 2011 22:31:45 +0000

On Wed, Dec 14, 2011 at 9:54 PM, Ni Wang <niwang_at_gmail.com> wrote:
> hi, r developers, I am now working on a R function/package to handling
> online request with username and token/password.
>
> For security reasons, it's not so safe to store the username & token in
> persistent variables, since they'll be saved to disk when
> users save their workspace. Is there a secure way in R to handle the online
> password management? I have searched it online
> but didn't find any good suggestions. So I am trying my luck on this mail
> list.

 If you save something to an environment that isnt the Global Environment then R won't save it when you quit and save. Suggest you save credentials in a list. Maybe something like this:

 attach(list(username="mrbluesky",password="s3cr3t"),name="credentials")

then you just get user and password from the environment when needed:

 get("username",envir=as.environment(credentials))  get("password",envir=as.environment(credentials))

saving the R workspace in the usual way (answering 'y' to Save Workspace Image) won't save this data.

 I have a vague memory of Splus possibly having a temporary environment which would do what you want, but that doesn't seem to be present in R...

Barry



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 14 Dec 2011 - 22:33:46 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 15 Dec 2011 - 10:50:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive