Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

821 reset url doc #823

Closed
wants to merge 63 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
884c094
move LtbAttributeValue to ltb-project/ldap
philhaworteks Jan 5, 2023
0285eea
uses lta-project/ldap version v0.0.1-beta
philhaworteks Jan 24, 2023
3a93b3d
Update version in packaging files
coudot May 15, 2023
a3326c2
Update tr.inc.php
berkaycagir May 20, 2023
8a223c5
Merge pull request #775 from berkaycagir/master
coudot May 25, 2023
86d3766
Merge branch '1.5'
coudot Jun 21, 2023
1f29d41
Add audit feature
coudot Jun 21, 2023
3af5fd8
Doc for audit
coudot Jun 21, 2023
98d0028
Merge branch '1.5'
coudot Aug 16, 2023
d585183
Remove ff only for merge
coudot Aug 16, 2023
9913f9f
Merge branch '1.5'
Aug 16, 2023
ab2125f
Merge branch '1.5'
Aug 16, 2023
a6c59cb
Merge pull request #781 from Worteks/issue-421-audit-log
coudot Aug 18, 2023
4e92020
Possibility to preset login with login_hint parameter
coudot Aug 18, 2023
d3191b2
Documentation for login_hint
coudot Aug 18, 2023
76c96d5
Merge pull request #795 from ltb-project/issue-780-login-hint
coudot Aug 18, 2023
14151aa
Merge branch 'master' into ltb-ldap
coudot Aug 18, 2023
24887a1
Use LTB LDAP v0.1
coudot Aug 18, 2023
5899cfb
Use LTB lib for LDAP connect
coudot Aug 21, 2023
7536850
Reindent file
coudot Aug 21, 2023
76bd756
Adapt result check in code
coudot Aug 21, 2023
b22c362
Replace ldap_connect by LTB LDAP lib
coudot Aug 23, 2023
395cdef
Replace ldap_connect by LTB LDAP lib in setquestions and resetbyquest…
philhaworteks Aug 24, 2023
11b9abe
Replace ldap_connect by LTB LDAP lib in sendtoken and resetbytoken
philhaworteks Aug 24, 2023
b844587
Replace ldap_connect by LTB LDAP lib in sendsms
philhaworteks Aug 24, 2023
86f5197
Replace ldap_connect by LTB LDAP lib in rest API v1
philhaworteks Aug 24, 2023
e9613dd
Missing change for result comparaison after using the LTB lib
coudot Aug 24, 2023
b85ecf0
Use LTB lib in scripts
coudot Aug 24, 2023
5f4ab52
Update tests to run with recent phpunit versions
coudot Sep 6, 2023
78dd1cb
Fix lang files to run tests without errors
coudot Sep 6, 2023
8a5db80
Define CI to run phpunit tests
coudot Sep 6, 2023
d70709f
Do not run composer yet
coudot Sep 6, 2023
e73575f
Use phpunit.xml
coudot Sep 15, 2023
ca530ec
Space opera
coudot Sep 15, 2023
f8c6e00
Merge pull request #799 from ltb-project/update-phpunit
coudot Sep 15, 2023
a7100b0
Merge branch 'master' into ltb-ldap
coudot Sep 15, 2023
053d5e4
translated the line tokensent_ifexists into german
Sep 20, 2023
2fde27f
Merge pull request #804 from piang0/master
coudot Sep 20, 2023
12b6195
First implementation of a page to set mail and phone attributes
coudot Oct 3, 2023
0d59d23
Set messages criticity
coudot Oct 4, 2023
cde9c63
Set messages
coudot Oct 4, 2023
619b258
Do not show form after attributes are updated.
coudot Oct 4, 2023
3c9e2f9
Add links to advertise users they can update their mail or phone
coudot Oct 4, 2023
e387ee7
Documentation for set attributes feature
coudot Oct 13, 2023
cdd741e
Merge pull request #808 from ltb-project/update-ldap-attributes
coudot Oct 13, 2023
bcc83bb
Merge branch 'master' into ltb-ldap
coudot Oct 13, 2023
af1cd86
Use LTB LDAP lib in new setattributes pages
coudot Oct 13, 2023
a3b9aa5
Comment default values for set attributes feature (#808)
coudot Oct 13, 2023
3dc70d3
Merge branch 'master' into ltb-ldap
coudot Oct 13, 2023
588ebc1
Better include the autoload script
coudot Oct 13, 2023
6bf7864
Merge pull request #797 from ltb-project/ltb-ldap
coudot Oct 13, 2023
ac5cc5e
Manage composer dependencies in packaging
coudot Oct 13, 2023
5f7bcec
CI badge
coudot Oct 13, 2023
b803dc4
Update tr.inc.php
berkaycagir Oct 13, 2023
4ef91ea
Merge pull request #812 from berkaycagir/berkaycagir-patch-1
coudot Oct 13, 2023
4a9d80f
Merge branch '1.5'
Nov 2, 2023
a20a8e8
Complete and fix pt-BR translation
natanjunges Nov 10, 2023
7047c00
Merge pull request #815 from natanjunges/master
coudot Nov 13, 2023
eddde9f
Do not trust SMS number from crypted token, search it again in LDAP D…
coudot Nov 22, 2023
603a509
Use the new LDAP lib for AttributeValue
coudot Nov 22, 2023
66cf222
master version is 1.6.0
coudot Nov 22, 2023
f20f24a
Update packaging for 1.5.4
coudot Nov 22, 2023
7ddb8ef
add security remark about $reset_url parameter (#821)
Jan 5, 2024
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
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on: [push]

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: PHPUnit Tests for php7.4
uses: php-actions/phpunit@v3
with:
configuration: tests/phpunit.xml
version: 5.7.25
php_version: 7.4
args: --coverage-text
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# LDAP Tool Box Self Service Password

[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/372/badge)](https://bestpractices.coreinfrastructure.org/projects/372)
[![Build Status](https://travis-ci.org/ltb-project/self-service-password.svg?branch=master)](https://travis-ci.org/ltb-project/self-service-password)
[![Build Status](https://github.com/ltb-project/self-service-password/actions/workflows/ci.yml/badge.svg)](https://github.com/ltb-project/self-service-password/actions/workflows/ci.yml)
[![Documentation Status](https://readthedocs.org/projects/self-service-password/badge/?version=latest)](https://self-service-password.readthedocs.io/en/latest/?badge=latest)

## Presentation
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"ltb-project/ldap": "v0.1.0"
}
}
135 changes: 135 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions conf/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,12 @@
# Changing it will also invalidate all previous tokens and SMS codes
$keyphrase = "secret";

# Use attributes update page
$use_attributes = false;
#$attribute_mail = "mail";
#$attribute_phone = "mobile";
#$who_change_attributes = "manager";

# Reset URL (if behind a reverse proxy)
#$reset_url = $_SERVER['HTTP_X_FORWARDED_PROTO'] . "://" . $_SERVER['HTTP_X_FORWARDED_HOST'] . $_SERVER['SCRIPT_NAME'];

Expand Down Expand Up @@ -355,6 +361,9 @@
#$messages['passwordchangedextramessage'] = NULL;
#$messages['changehelpextramessage'] = NULL;

# Audit
#$audit_log_file = "/var/log/self-service-password/audit.log";

## Pre Hook
# Launch a prehook script before changing password.
# Script should return with 0, to allow password change.
Expand Down
39 changes: 39 additions & 0 deletions docs/audit.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.. _audit:

Audit
=====

You can enable audit to log all actions done through Self Service Password.

The items provided in the audit log are:

* Date
* IP of connected user
* DN of account being updated (user DN, can be empty if error occurs before finding the DN)
* Who has done the action (user login)
* Action
* Result of the action

Example:

.. code-block:: json

{
"date":"Wed, 21 Jun 2023 15:58:11",
"ip":"127.0.0.1",
"user_dn":"uid=donald,ou=users,dc=example,dc=com",
"done_by":"donald",
"action":"change",
"result":"nomatch"
}

Audit log file
--------------

Set the file where actions are logged:

.. code-block:: php

$audit_log_file = "/var/log/self-service-password/audit.log";

.. tip:: The file must be writable by the PHP or WebServer process
9 changes: 7 additions & 2 deletions docs/config_general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,19 @@ Prefill user login
------------------

If Self Service Password is called from another application, you can
prefill the login but sending an HTTP header.
prefill the login by sending an HTTP header.

To enable this feature:
To enable this feature, configure the name of the HTTP header:

.. code-block:: php

$header_name_preset_login = "Auth-User";

It is also possible to prefill the login by using the ``login_hint``
GET or POST parameter. This method does not require any configuration.

Example: ``https://ssp.example.com/?actionresetbyquestions&login_hint=spiderman``

Captcha
-------

Expand Down
3 changes: 3 additions & 0 deletions docs/config_sms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ reset code trough SMS.
A message is sent either to an Email to SMS gateway, either trough an
API (called with PHP code or by script).

.. tip:: You can enable :ref:`set_attributes` feature to allow users to
update their phone number in the LDAP directory.

SMS provider
------------

Expand Down
4 changes: 4 additions & 0 deletions docs/config_tokens.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Then, the user click on the link in the mail, an can set a new password.
.. tip:: PHP sessions are used to store and retrieve token on server
side.

.. tip:: You can enable :ref:`set_attributes` feature to allow users to
update their mail address in the LDAP directory.

Activation
----------

Expand Down Expand Up @@ -81,3 +84,4 @@ this case you can set yourself the reset URL:

$reset_url = $_SERVER['HTTP_X_FORWARDED_PROTO'] . "://" . $_SERVER['HTTP_X_FORWARDED_HOST'] . $_SERVER['SCRIPT_NAME'];

.. warning:: Make sure your webserver/reverse-proxy hosting self-service-password is only answering to a dedicated Full Qualified Domain Name. Else you should define a hard-coded ``$reset_url`` parameter for preventing self-service-password to forge urls based on arbitrary host headers.
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ LDAP Tool Box Self Service Password documentation
config_sshkey.rst
config_rate_limit.rst
webservices.rst

audit.rst
set_attributes.rst
50 changes: 50 additions & 0 deletions docs/set_attributes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.. _set_attributes:

Attributes update
=================

You can allow user to update their mail or phone in the LDAP directory.

Users need of course to authenticate to change these information.

When enabling this feature, a note will be added in help messages to advertise users they can change their mail or their phone. You can also access directly to the page with ``?action=setattributes``.

Activation
----------

Enable the feature:

.. code-block:: php

$use_attributes = true;

Mail attribute
--------------

Define which attribute contains the mail address:

.. code-block:: php

$attribute_mail = "mail";

.. tip:: If attribute is not defined, the mail is not displayed in set attributes page.

Phone attribute
---------------

Define which attribute contains the phone number:

.. code-block:: php

$attribute_phone = "mobile";

.. tip:: If attribute is not defined, the phone is not displayed in set attributes page.

Who change attributes
----------------------

By default the change is done in LDAP directory with the user account. You can change this behavior to let the SSP service account do the change:

.. code-block:: php

$who_change_attributes = "manager";
Loading