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

Add password driver for the gandi.net mail API #8684

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
3d011fa
Create gandi.php
Kartoffelbauer Aug 20, 2022
280a15c
Update config.inc.php.dist
Kartoffelbauer Aug 20, 2022
2b114c2
Update gandi.php
Kartoffelbauer Aug 20, 2022
0652b5f
Update gandi.php
Kartoffelbauer Aug 20, 2022
a776a60
Update config.inc.php.dist
Kartoffelbauer Aug 20, 2022
d4f57bf
Update gandi.php
Kartoffelbauer Aug 21, 2022
2aefbdc
Update README
Kartoffelbauer Aug 21, 2022
caa344b
Update gandi.php
Kartoffelbauer Aug 21, 2022
34dd527
Update config.inc.php.dist
Kartoffelbauer Aug 21, 2022
4e5df57
Update README
Kartoffelbauer Aug 21, 2022
0ad8846
Update README
Kartoffelbauer Aug 21, 2022
ca58c4a
Update gandi.php
Kartoffelbauer Aug 21, 2022
26bff2e
Update de_DE.inc
Kartoffelbauer Aug 22, 2022
0ced4e9
Update en_US.inc
Kartoffelbauer Aug 22, 2022
6fe5da2
Update en_GB.inc
Kartoffelbauer Aug 22, 2022
7a794e6
Update en_US.inc
Kartoffelbauer Aug 22, 2022
c60cf96
Update de_DE.inc
Kartoffelbauer Aug 22, 2022
f68612a
Update en_CA.inc
Kartoffelbauer Aug 22, 2022
60a8813
Update de_CH.inc
Kartoffelbauer Aug 22, 2022
0ee6c9d
Update config.inc.php.dist
Kartoffelbauer Aug 22, 2022
c526ad2
Update gandi.php
Kartoffelbauer Aug 22, 2022
c70b4c3
Update fr_FR.inc
Kartoffelbauer Aug 22, 2022
3b1ba73
Update gandi.php
Kartoffelbauer Aug 22, 2022
2e39659
Update ar.inc
Kartoffelbauer Aug 23, 2022
ec6e6ec
Update ar.inc
Kartoffelbauer Aug 23, 2022
0d99349
Update ast.inc
Kartoffelbauer Aug 23, 2022
b0af276
Update az_AZ.inc
Kartoffelbauer Aug 23, 2022
522e9d1
Update be_BE.inc
Kartoffelbauer Aug 23, 2022
08db79b
Update bg_BG.inc
Kartoffelbauer Aug 23, 2022
ce433c5
Update gandi.php
Kartoffelbauer Aug 23, 2022
cc9721e
Update config.inc.php.dist
Kartoffelbauer Aug 23, 2022
5ddc7ad
Update gandi.php
Kartoffelbauer Aug 23, 2022
fa43de9
Update gandi.php
Kartoffelbauer Aug 23, 2022
bbbb8b3
Update gandi.php
Kartoffelbauer Aug 23, 2022
77f220c
Update gandi.php
Kartoffelbauer Aug 23, 2022
cf7e460
Update gandi.php
Kartoffelbauer Sep 18, 2023
c0d3364
Update config.inc.php.dist
Kartoffelbauer Sep 18, 2023
b488f56
Update gandi.php
Kartoffelbauer Sep 18, 2023
3742240
Update gandi.php
Kartoffelbauer Sep 18, 2023
0e30646
Update config.inc.php.dist
Kartoffelbauer Sep 18, 2023
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
16 changes: 16 additions & 0 deletions plugins/password/README
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
2.1.27. dovecot_passwdfile
2.1.28. Mailcow
2.1.29. LDAP Samba Active Directory (ldap_samba_ad)
2.1.30. gandi (gandi.net mail-API)
2.2. Password Strength Drivers
2.2.1. Zxcvbn
2.2.2. Have I been pwned? (pwned)
Expand Down Expand Up @@ -427,6 +428,21 @@
Uses configuration for other LDAP drivers.


2.1.30. gandi
---------------------------

Driver to change the user's password via gandi.net mail-API. A password driver is also
included that checks the password strength according to the official gandi.net documentation.
See https://api.gandi.net/docs/email/ for more information.

In order to work, the following configuration options must be set appropriately:
Password driver:
* password_username_format = %u
* password_algorithm = sha512-crypt
Password strength driver:
* password_minimum_score = 2


2.2. Password Strength Drivers
------------------------------

Expand Down
17 changes: 17 additions & 0 deletions plugins/password/config.inc.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -513,3 +513,20 @@ $config['password_dovecot_passwdfile_path'] = '/etc/mail/imap.passwd';
// ----------------------
$config['password_mailcow_api_host'] = 'localhost';
$config['password_mailcow_api_token'] = '';


// GANDI-API Driver options
// ------------------------
// The domain-to-personal-access-token/domain-to-api-key configuration required for authentication.
// This can take various forms depending on your needs.
// (1) The raw Personal-Access-Token/API-key or an array containing the key-value mapping.
// $config['password_gandi_keys'] = 'your-personal-access-token-or-api-key';
// $config['password_gandi_keys'] = array(
// 'example.com' => 'first-personal-access-token-or-api-key',
// 'foo.com' => 'second-personal-access-token-or-api-key',
// );
// (2) The absolute path to a file containing either the raw Personal-Access-Token/API-key or a key-value mapping in JSON format.
// $config['password_gandi_keys'] = '/absolute/path/to/somewhere';
//
// Note: For security reasons, it is recommended to use the second option.
$config['password_gandi_keys'] = null;
Loading