diff --git a/.gitignore b/.gitignore index c7eb3b1..b1e6851 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ .idea/ .tox/ venv*/ +build/ +dist/ +privacyidea_pam.egg-info/ .coverage diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..4fa8eaa --- /dev/null +++ b/.gitlab-ci.yml @@ -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 diff --git a/.travis.yml b/.travis.yml index 1a06861..a6e598e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,6 @@ language: python sudo: false python: - 2.7 - - 3.5 - - 3.6 - - 3.7 - - 3.8 # command to install dependencies install: diff --git a/README.md b/README.md index 7868f87..057f04b 100644 --- a/README.md +++ b/README.md @@ -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=** The password prompt. Default is "Your OTP". - + +**api_token=** + + The API Token to access admin REST API for auto-enrolment. Requires the following Actions: + ``{ "enrollEMAIL": true, "enrollpin": true, "tokenlist": true }`` + +**grace=