neutrinolabs / xrdp

xrdp: an open source RDP server
http://www.xrdp.org/
Apache License 2.0
5.59k stars 1.73k forks source link

RFE: Support interactive PAM authentication, for two-factor auth #736

Open akkornel opened 7 years ago

akkornel commented 7 years ago

Hello!

I would like to request that xrdp's PAM authentication be modified, so that calls to the PAM conversation function (verify_pam_conv3) cause messages (and prompts) to be displayed to the user over the graphic connection, before the connection to the window manager (Xvnc, xorgxrdp, Xorg, etc.) happens.

Use Cases

Here are a pair of use cases:

In both of those cases, the connection would fail, because the way conversations are handled right now assumes that the first conversation message is for a username, and the second message is for a password.

In addition, even the way conversations are handled today causes weird behavior:

I use pam_duo today, with "autopush" turned on. This setting automatically pushes a two-step request to the user's device, or (if the user doesn't have a smart phone) makes a phone call to the user. This works with xrdp, but even in this case pam_duo still uses conversation messages to send messages like "Calling you now…" and "Success! Logging you in". Since xrdp doesn't expect those, it causes pam_duo to log "Conversation failed" warnings.

That is the rationale behind my RFE.

Prerequisites

Before this could be implemented, I think two other enhancements would be needed:

Once those RFE's could be implemented, I think this could be worked on, but I'm not exactly sure how!

Ideas

The problem is, there would have to be some way for sesman to communicate with the xrdp component that is responsible for graphics at the very start of the session (I'm talking about the component that asks users for username, password, and session type). There would be three types of communication from sesman to the graphics component:

The Graphics Component

I think the graphic component would do something like this:

Sesman authentication side

On the sesman side, in auth_userpass, I think the behavior would be:

Finally, verify_pam_conv would have to be changed:

Closing

I know virtually nothing about the innards of xrdp (which really shows since I can't really talk about the graphics component). But, I didn't want to be an ass by putting in a one-line enhancement request! I don't know how else I can help, but if you have any questions for me, I'll do my best!

brijeshjaiswal commented 6 years ago

Hallo.. can you please help me to get xrdp authentication with google-authenticator in step by step method.

metalefty commented 6 years ago

I understand the importance of multi-factor authentication and I also want to implement it. I need sponsors to work on it.

brijeshjaiswal commented 6 years ago

Actually I am looking for this project to get it done by you asap so that xrdp can move further with respect to security level.

brijeshjaiswal commented 5 years ago

Hallo, I am getting Blue screen after login. Please help me. I am attaching the logs. xrdp.log xrdp-sesman.log

Please help me to get out from this issue. Also please help me to integrate google-authenticate with XRDP. Kindly confirm whether its possible or not. If not will look for some other applications.

metalefty commented 5 years ago

@brijeshjaiswal DON'T HIJACK OTHER'S ISSUE.

matt335672 commented 2 years ago

See also #1961 which covers this.