Devise Admin View password

74 views
Skip to first unread message

Saravanan P

unread,
Jan 7, 2013, 1:39:27 AM1/7/13
to rubyonra...@googlegroups.com
Hi Everyone

i am using devise for authentication for my app.
Is there any way, Admin user can view other users password as normal string.

Without storing there password as string in database?
Please advise.

Jérémie Horhant

unread,
Jan 7, 2013, 2:31:31 AM1/7/13
to rubyonra...@googlegroups.com
Hi,

With Devise vanilla config it's not possible. You should look to custom
encryptor
(https://github.com/plataformatec/devise/wiki/How-To:-Create-a-custom-encryptor)
with reversible encryption. But you should really don't
do that, it's a security breach and client private life violation. As a
sysadmin for many years now I've never seen a good reason to keep
password readable.
> --
> You received this message because you are subscribed to the Google
> Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-ta...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/_YLbCKXtQbEJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

jeremie_horhant.vcf

Saravanan P

unread,
Jan 7, 2013, 2:52:47 AM1/7/13
to rubyonra...@googlegroups.com
Ok  thanks Jérémie Horhant :)
--
Regards by
Saravanan.P

Colin Law

unread,
Jan 7, 2013, 2:53:20 AM1/7/13
to rubyonra...@googlegroups.com
On 7 January 2013 06:39, Saravanan P <sarav...@shriramits.com> wrote:
> Hi Everyone
>
> i am using devise for authentication for my app.
> Is there any way, Admin user can view other users password as normal string.

Why would you want to do that?

Colin

Saravanan P

unread,
Jan 7, 2013, 2:59:18 AM1/7/13
to rubyonra...@googlegroups.com
In my case, Admin user can create many different sub-users. And he can view their password too.. :(



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.



--
Regards by
Saravanan.P

Colin Law

unread,
Jan 7, 2013, 4:23:08 AM1/7/13
to rubyonra...@googlegroups.com
On 7 January 2013 07:59, Saravanan P <sarav...@shriramits.com> wrote:
> In my case, Admin user can create many different sub-users. And he can view
> their password too.. :(

That does not explain /why/ he needs to be able to view the passwords.

Colin

Saravanan P

unread,
Jan 7, 2013, 4:35:44 AM1/7/13
to rubyonra...@googlegroups.com
As a admin he can create many sub user and he will email user detail to the person who going to use that with application.

Jérémie Horhant

unread,
Jan 7, 2013, 5:27:16 AM1/7/13
to rubyonra...@googlegroups.com
Here it is, the huge security hole... Mails are sent in clear text and virtually anyone can read it.

I suggest you to generate a random password when an admin create a sub user. Then in the same time send it by mail with obligation to
change it when the user login

Or the simplest solution, generate a random password and don't send it. So the password is "lost" and when the user will want to login he can use
the "Forgottent password" link. Simple (all is ready in Devise) and secure
jeremie_horhant.vcf

Walter Lee Davis

unread,
Jan 7, 2013, 12:13:32 PM1/7/13
to rubyonra...@googlegroups.com
I recommend you never set a password for a user. Instead, use the very flexible Devise Invitable module to create a user without any password set, and the requirement that s/he create a password before logging in. The only thing sent to the new user is a cryptic token link (and these time-bomb out after a definable time). As an admin, I do not want to be in the business of knowing (or having to remind my users of) their passwords -- that's what the "I forgot..." link is for!

Walter
> <jeremie_horhant.vcf>

Saravanan P

unread,
Jan 8, 2013, 12:38:55 AM1/8/13
to rubyonra...@googlegroups.com
Ok Thank you walter.
Reply all
Reply to author
Forward
0 new messages