Skip to content

Commit 9206646

Browse files
d-w-moorealanking
authored andcommitted
[#521] clearer documentation and errors regarding pam/pam_password
Also incorporated is the pass-through module pam.py which incorporates a version check and reminds users in a friendly way (ie. by throwing a fatal exception with a non-confusing message :) ) to update their PAM scheme strings for 4.3+ ...
1 parent b3c00d7 commit 9206646

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@ the `encryption_*` and `ssl_*` options
161161
directly to the constructor as keyword arguments, even though it is
162162
required when they are placed in the environment file.
163163

164+
PAM logins
165+
----------
166+
167+
Starting with v2.0.0, the python iRODS client is able to authenticate under PAM using the same file-based client environment as the
168+
iCommands.
169+
170+
Caveat for iRODS 4.3+: when upgrading from 4.2, the "irods_authentication_scheme" setting must be changed from "pam" to "pam_password" in
171+
`~/.irods/irods_environment.json` for all file-based client environments.
172+
164173
Maintaining a connection
165174
------------------------
166175

irods/auth/pam.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class PamLoginException(Exception): pass
2+
3+
def login(conn):
4+
if conn.server_version >= (4,3):
5+
raise PamLoginException('PAM logins in iRODS 4.3+ require a scheme of "pam_password"')
6+
conn._login_pam()
7+
8+
# Pattern for when you need to import from sibling plugins:
9+
from .native import login as native_login

0 commit comments

Comments
 (0)