Project

General

Profile

Actions

Idea #14964

closed

Port arvados-pam to Python 3

Added by Tom Morris about 5 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
-
Start date:
Due date:
Story points:
-

Description

source:sdk/pam provides a PAM module that allows users to authenticate (e.g., to an SSH service on a shell node) using an Arvados token. It checks the same login permissions as source:services/login-sync. It makes it possible to provide a login service like shellinabox that doesn't have SSH private keys or tunnel options.

Currently it requires Python 2.7.


Related issues

Related to Arvados - Idea #15348: [pam] PAM module in GoResolvedTom Clegg06/23/2020Actions
Blocks Arvados Epics - Idea #14532: [Epic] Port to Python 3 to for Python 2 sunset in December 2019Resolved01/01/202009/16/2020Actions
Actions #1

Updated by Tom Morris almost 5 years ago

  • Parent task deleted (#14532)
Actions #2

Updated by Tom Morris almost 5 years ago

  • Tracker changed from Task to Idea
  • Target version changed from Arvados Future Sprints to To Be Groomed
Actions #3

Updated by Tom Morris almost 5 years ago

  • Blocks Idea #14532: [Epic] Port to Python 3 to for Python 2 sunset in December 2019 added
Actions #4

Updated by Tom Morris almost 5 years ago

  • Subject changed from Port PAM to Python 3 to Port arvados-pam to Python 3
  • Description updated (diff)
Actions #5

Updated by Tom Clegg almost 5 years ago

Pam-python is a PAM Module that runs the Python interpreter, thus allowing PAM Modules to be written in Python.

arvados-pam is one such "PAM module written in Python." We can make have made the arvados_pam module python3-compatible enough to pass its unit tests, but it can't be shown to work in real life (and can't eliminate the python2.7 dependency) until pam-python itself is updated to work with python3. The author hasn't done this yet, but plans to.

Debian ships pam-python as libpam-python. Even in buster, it still requires python2.7. https://packages.debian.org/buster/libpam-python

If we can't wait for an upstream fix (or fork pam-python and do it ourselves) another approach would be to start fresh and implement a PAM module in Go, using someone else's example like https://github.com/uber/pam-ussh. This might be a better long term solution anyway -- it looks like we never even found a way to test the libpam-python solution without hitting segfaults.

Actions #6

Updated by Tom Clegg almost 5 years ago

  • Description updated (diff)
Actions #7

Updated by Tom Clegg almost 5 years ago

  • Description updated (diff)
Actions #8

Updated by Tom Clegg almost 5 years ago

(from discussion offline) having a PAM module is worthwhile (still the best way to enable shell-over-https for CLI/browser use) but the Python solution is looking like a dead end -- it's never been stable and the connector shim isn't even aimed at production use. Porting to Go seems like the least-effort long term solution.

Actions #9

Updated by Tom Clegg almost 5 years ago

Actions #10

Updated by Tom Clegg about 4 years ago

"I'm just letting everybody know now the tests work, I've started intergrating all the changes for a new release." -- https://sourceforge.net/p/pam-python/tickets/5/#f0a9

Actions #11

Updated by Peter Amstutz over 3 years ago

  • Status changed from New to Rejected

Rewrote PAM in Go

Actions #12

Updated by Ward Vandewege over 3 years ago

  • Target version deleted (To Be Groomed)
Actions

Also available in: Atom PDF