Commit graph

5 commits

Author SHA1 Message Date
xacrimon 3f9f33408d add PAM environment with interpolation support 2021-03-30 18:23:38 +02:00
Andrew Lytvynov 78c2a31e44
pam: trigger pam_authenticate on login (#3966)
* pam: trigger pam_authenticate on login

This will trigger any "auth" PAM modules configured on the system for
teleport. For example, Duo 2FA prompt on each connection.
The module will be able to interact with the user (e.g. print prompts).

Also, make PAM env var propagation consistent for port forwarding
sessions.

Fixes https://github.com/gravitational/teleport/issues/3929

* Revamp PAM testing stack

- update PAM policies and module for "auth" step
- use pam_teleport.so from the repo directory instead of guessing
  OS-specific global path
- add tests covering all failure scenarios and generally refactor PAM
  tests

* Build pam_teleport.so during buildbox build inside docker

This removes the need for libpam-devel on the host and reliably compiles
pam_teleport.so in our CI pipeline.
As part of this, combine build.assets/pam/ and modules/pam_teleport to
avoid the need to sync them.
2020-07-10 20:28:33 +00:00
Russell Jones 3640b5f098 Fix memory leak and pass variables to PAM. 2020-02-06 11:15:44 -08:00
Russell Jones 69f6c666bf Added more test support to pam_teleport.so.
Added support for "pam_putenv" and "pam_get_item" to fetch PAM_RUSER to
pam_teleport.so. This is used for test coverage.
2020-02-06 11:15:44 -08:00
Russell Jones 785967e37f Added PAM support to Teleport. 2018-03-20 14:20:43 -07:00