Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Allow grace period #19

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
cdc1cd6
implement grace time
May 22, 2020
638524f
single history
May 22, 2020
17d37bf
update gitignore
May 25, 2020
f4412fd
Merge branch 'master' of git.server.mila.quebec:idt/services/privacyi…
May 25, 2020
1169d6e
First draft to auto-enroll user
Jun 13, 2020
13ecb97
add rhost
Aug 10, 2020
e58cf06
Add grace period with IP fixes #1
Aug 11, 2020
9de3703
remove test pin
Aug 12, 2020
88f6ac0
add history on the IP+USERNAME couple
Aug 12, 2020
6f97be6
add token check prior to auto-enrollment
Aug 14, 2020
e82c99d
Add Readme info
Aug 14, 2020
4bd37b2
Add gitlab-ci to build wheel
Aug 14, 2020
7d49f76
switch to python2
Aug 17, 2020
76eb42a
add test phase should fix #4
Aug 18, 2020
878dddf
test
Aug 18, 2020
f7e7538
testing branch
Aug 18, 2020
bb2d80c
testing
Aug 18, 2020
eb7be67
still testing
Aug 18, 2020
85e061b
add response class
Aug 18, 2020
274e8b4
typo
Aug 18, 2020
ca83572
test
Aug 18, 2020
2eba7e7
test
Aug 18, 2020
8841087
test
Aug 18, 2020
a870c4d
test
Aug 18, 2020
7874605
test
Aug 18, 2020
a945a31
test
Aug 18, 2020
5b55a78
test
Aug 18, 2020
6f1b012
test
Aug 18, 2020
f36b76f
mock
Aug 18, 2020
b5d44a4
test
Aug 18, 2020
31cc5f7
update functionning tests
Aug 18, 2020
dd62fb1
Add tox tests
Aug 18, 2020
42331b6
Merge branch 'testing' into 'master'
Aug 18, 2020
1049f90
allow config in a file via yaml
Aug 18, 2020
da7d315
add build_date info
Aug 19, 2020
24096ad
ext
Aug 19, 2020
e708f5f
ext
Aug 19, 2020
af9f6e4
Merge branch 'testing'
Aug 19, 2020
1e4375b
test html
Aug 19, 2020
3ee7fd5
add user filter
Aug 19, 2020
2e49643
add requirements
Aug 19, 2020
2a1c8bf
add user filtering and related tests
Aug 19, 2020
55334db
test twine pypi
Aug 24, 2020
c2564e9
install twine
Aug 24, 2020
33c6e6b
typo
Aug 24, 2020
7af6efa
trigger tags
Aug 24, 2020
34db70d
[skip ci] for building on master
Aug 24, 2020
24968ab
test nested sql configurations for mysql integration
Oct 27, 2020
4b50cd0
Add MySQL support
Oct 27, 2020
c923647
Add auto-enrollment for TOTP + Push tokens
Oct 30, 2020
bf8e7ab
Adjust qr generation
Nov 4, 2020
97ebe5c
return to python 2
Nov 4, 2020
4acbf34
Allow PrivacyIdea to authenticate with pwd attribute of the user
Nov 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
.idea/
.tox/
venv*/
build/
dist/
privacyidea_pam.egg-info/
.coverage
36 changes: 36 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
stages:
- test
- build
- deploy

tox:
stage: test
image:
name: registry.server.mila.quebec/idt/images/tox:latest
entrypoint: [ '/bin/sh', '-c' ]
script: tox

package:
stage: build
image: "python:2.7"
only:
refs:
- master
variables:
TWINE_USERNAME: "pypi_token"
TWINE_REPOSITORY_URL: "https://git.server.mila.quebec/api/v4/projects/83/packages/pypi"
before_script:
- pip install twine
script:
- python setup.py sdist bdist_wheel
- python -m twine upload dist/*

# Production has to be triggered manually
update_login_nodes:
stage: deploy
only:
refs:
- master
variables:
ANSIBLE_TAGS: '2fa'
trigger: idt/provisioning/environment
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ language: python
sudo: false
python:
- 2.7
- 3.5
- 3.6
- 3.7
- 3.8

# command to install dependencies
install:
Expand Down
49 changes: 38 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,64 @@
[![Build Status](https://travis-ci.org/privacyidea/pam_python.svg?branch=master)](https://travis-ci.org/privacyidea/pam_python)

This module is to be used with http://pam-python.sourceforge.net/.
It can be used to authenticate with OTP against privacyIDEA. It will also
It can be used to authenticate with OTP against privacyIDEA. It will also
cache future OTP values to enable offline authentication.

To be used like this::

```
auth requisite pam_python.so /path/to/modules/privacyidea-pam.py
```

It can take the following parameters:

**url=https://your-server**
**url=https://your-server**

Default is https://localhost

default is https://localhost

**debug**

write debug information to the system log
Write debug information to the system log

**realm=yourRealm**

pass additional realm to privacyidea
Pass additional realm to privacyidea

**nosslverify**

Do not verify the SSL certificate

**prompt=<Prompt>**

The password prompt. Default is "Your OTP".


**api_token=<token>**

The API Token to access admin REST API for auto-enrolment. Requires the following Actions:
``{ "enrollEMAIL": true, "enrollpin": true, "tokenlist": true }``

**grace=<time>**

Grace time in minutes.

**user_attribute=<uid,gid,gecos>**

Override the username to send to privacyIDEA with an attribute from the
user's password entry

**users=<list,of,users>**

Comma-separated list of users to apply the plugin to.
If not specified, apply to all users.

**sqlfile=<file>**

This is the SQLite file that is used to store the offline authentication
This is the SQLite file that is used to store the offline authentication
information.
The default file is /etc/privacyidea/pam.sqlite

**mysql=<uri>**

Use MySQL/MariaDB instead of SQLite to store refill/history tables.
URI form: mysql://username:password@host:3306/db_name
If absent, fallback to sqlfile
Binary file added pam-test.sqlite
Binary file not shown.
Loading