Compare commits

...

328 Commits

Author SHA1 Message Date
Daniel Berteaud fa6de8e904 Support Traefik forwardAuth 2022-11-06 17:45:21 +01:00
Yadd 9834e182f5 Merge branch 'v2.0' 2022-01-05 20:20:39 +01:00
Yadd 79bb915716 Merge branch 'fix-urandom-fatal-1808' into 'master'
Crypt::URandom failing is now fatal (#1808)

See merge request lemonldap-ng/lemonldap-ng!233
2021-10-16 06:04:15 +00:00
Maxime Besson 8bce426477 Crypt::URandom failing is now fatal (#1808) 2021-10-15 20:01:18 +02:00
Yadd 781c9b0a8b Merge branch 'v2.0' 2021-08-09 21:28:02 +02:00
Yadd ac1cfd6398 Merge branch 'v2.0' 2021-08-01 08:38:55 +02:00
Yadd f1fe0f3e5e Merge branch 'v2.0' 2021-07-15 21:45:17 +02:00
Yadd 6c4a5b911c Merge branch 'v2.0' 2021-07-09 12:08:29 +02:00
Yadd 467bbf0f5e Merge branch 'v2.0' 2021-06-26 23:03:26 +02:00
Yadd 94ec375094 Merge branch 'v2.0' 2021-06-25 14:07:11 +02:00
Yadd 1a5d30799e Fix test 2021-06-24 14:02:56 +02:00
Yadd ce02973702 Merge branch 'v2.0' 2021-06-24 13:39:10 +02:00
Yadd 6d2d4ee2c3 Update minified files 2021-06-19 18:48:19 +02:00
Yadd 051a8e4331 Merge branch 'v2.0' 2021-06-19 18:47:01 +02:00
Yadd a3b24418c6 Merge branch 'v2.0' 2021-06-07 18:36:32 +02:00
Yadd 18fdb0f700 make json 2021-05-22 16:20:19 +02:00
Yadd 9c70f905f3 Merge branch 'v2.0' 2021-05-22 16:19:15 +02:00
Yadd d4f957ec35 Merge branch 'v2.0' 2021-05-22 12:31:25 +02:00
Yadd ecebe2a349 Merge branch 'v2.0' 2021-05-13 10:37:41 +02:00
Christophe Maudoux 779f79bace Merge branch 'v2.0' 2021-05-03 23:23:50 +02:00
Christophe Maudoux 143cc5a5c3 Merge branch 'v2.0' 2021-05-01 12:40:48 +02:00
Christophe Maudoux cb28b7cb1e Fix LDAP unit tests & merge 2021-05-01 12:35:33 +02:00
Yadd a282a37b66 Merge branch 'v2.0': findUser may be broken 2021-05-01 07:49:05 +02:00
Christophe Maudoux 3ea79317e2 Fix unit tests (#1976) 2021-05-01 00:20:18 +02:00
Christophe Maudoux 0cf1dbd37d WIP: Fix unit tests ;-) (#1976) 2021-05-01 00:20:09 +02:00
Yadd 8653dde5b5 Merge branch 'v2.0' 2021-04-23 21:44:48 +02:00
Yadd 0ae606c02b Merge branch 'v2.0' 2021-04-21 15:54:04 +02:00
Yadd a36a4912b0 Fix merge 2021-04-19 21:06:19 +02:00
Yadd 76ec67be69 Merge branch 'v2.0' 2021-04-18 12:58:45 +02:00
Maxime Besson fc8e508065 doc: fix typo 2021-04-18 12:57:57 +02:00
Maxime Besson 956c4c4ec2 doc: fix typo 2021-04-18 12:57:57 +02:00
Yadd 30b5b93adc Merge branch 'v2.0' 2021-04-09 18:15:50 +02:00
Yadd 95e53e0a5f Merge branch 'v2.0' 2021-04-07 18:44:45 +02:00
Yadd fca479f675 Merge branch 'v2.0' 2021-04-07 15:23:17 +02:00
Yadd 96d9ebf102 Merge branch 'v2.0' 2021-04-07 14:37:18 +02:00
Yadd 75d8ba3723 Merge branch 'v2.0' 2021-04-07 13:53:52 +02:00
Yadd 1795b71f1f Merge branch 'v2.0' 2021-04-07 13:51:59 +02:00
Yadd ad88e8149b Order language keys 2021-04-07 13:47:20 +02:00
Yadd 4bc3933b7e Merge branch 'v2.0' 2021-04-04 17:27:53 +02:00
Yadd e830f40268 Temporarily reimport minified files 2021-04-02 16:17:37 +02:00
Yadd 4d79969a0e Merge branch 'v2.0' 2021-04-02 16:09:50 +02:00
Christophe Maudoux 0e77c835b3 Fix bad merge 2021-03-30 23:36:20 +02:00
Yadd 8f8399ec99 Fix versions 2021-03-30 21:43:25 +02:00
Yadd ed84fdd771 Merge remote-tracking branch 'origin/v2.0' 2021-03-30 21:41:31 +02:00
Yadd 0727d58878 Merge branch 'v2.0' 2021-03-27 07:47:20 +01:00
Yadd 965f9360c4 Merge branch 'v2.0' 2021-03-25 15:07:41 +01:00
Yadd 2947a828de fix ci 2021-03-24 10:17:58 +01:00
Yadd cb5a9627cf fix ci 2021-03-24 10:10:17 +01:00
Yadd f56fd636fe Merge branch 'v2.0' 2021-03-24 10:09:03 +01:00
Maxime Besson 8e64671575 Remove LDAPFilter from doc (#2183) 2020-12-28 16:28:37 +01:00
Maxime Besson aa55f3d04a Remove LDAPFilter option (#2183) 2020-12-28 16:27:32 +01:00
Christophe Maudoux b1232739a0 Fix unit test 2020-12-10 23:54:43 +01:00
Clément OUDOT 7ec5f5c1c6 Merge branch 'doc-app_gerrit' into 'master'
Doc: add application gerrit

See merge request lemonldap-ng/lemonldap-ng!171
2020-11-30 10:30:01 +01:00
atisne 1d8a46493c Add configuration details to use LL:NG SSO with Gerrit 2020-11-30 09:29:53 +01:00
Xavier Guimard 93cb619cd2 Merge branch 'v2.0' into master 2020-11-13 06:17:45 +01:00
Xavier Guimard ba638e50b7 Merge branch 'v2.0' into master 2020-11-02 12:52:30 +01:00
Christophe Maudoux ac98c223d3 Merge branch 'v2.0' 2020-11-01 00:03:07 +01:00
Xavier Guimard 28c9623b73 Merge branch 'v2.0' into master 2020-10-12 16:08:36 +02:00
Xavier Guimard 61df3e83e7 Merge branch 'v2.0' into master 2020-10-12 15:51:48 +02:00
Xavier Guimard e7526f32af Fix versions 2020-10-07 17:15:20 +02:00
Xavier Guimard 4583f3a9e6 Merge branch 'v2.0' into master 2020-10-07 17:11:27 +02:00
Xavier Guimard b8102d127e Merge remote-tracking branch 'origin/v2.0' into master 2020-09-22 13:05:37 +02:00
Xavier Guimard 17da7d2e6d Merge branch 'meta' into 'master'
Regenerate META files to advertise bugtracker

See merge request lemonldap-ng/lemonldap-ng!162
2020-09-22 06:18:33 +02:00
Xavier Guimard 530b57561d Merge branch 'portal-manifest' into 'master'
Update MANIFEST for Perl distributions

See merge request lemonldap-ng/lemonldap-ng!161
2020-09-22 06:10:51 +02:00
Nicolas R e0620e8d5c Regenerate META files to advertise bugtracker
Before this change the gitlab bugtracker was
not correctly advertised.
2020-09-21 15:56:36 -05:00
Nicolas R 0ace7560fb Update MANIFEST for Perl distributions
This is adding a MANIFEST.SKIP to avoid adding cruft
to MANIFEST files and updating all MANIFEST.

This is fixing an issue in lemonldap-ng-manager which
is using some unpublished file like:
    Api/Providers/CasApp.pm
2020-09-21 15:35:06 -05:00
Xavier Guimard 4e130f327c Merge branch 'v2.0' into master 2020-09-04 06:24:55 +02:00
Christophe Maudoux 937bdd4e8b Merge branch 'v2.0' 2020-09-02 18:55:23 +02:00
Christophe Maudoux 148adaad71 Make json 2020-08-28 22:13:58 +02:00
Christophe Maudoux 5496d798a3 Merge branch 'v2.0' 2020-08-28 22:05:52 +02:00
Maxime Besson 285ea93a65 Remove dependency to XML::Simple (#1491) 2020-07-13 15:54:47 +02:00
Maxime Besson 01edf42017 Remove XML::Simple from SAML issuer (#1491) 2020-07-13 15:54:45 +02:00
Maxime Besson 3c6c5423c1 Remove XML::Simple dep in CAS issuer (#1491) 2020-07-13 15:54:40 +02:00
Clément OUDOT 986a3974b0 Merge branch 'fail2ban-logs' into 'master'
Add host to logs for use with fail2ban

See merge request lemonldap-ng/lemonldap-ng!154
2020-07-05 13:10:43 +02:00
Baptiste Pecatte 0795454620 Remove useless variable 2020-07-04 22:29:29 +02:00
Xavier Guimard d8bda9fa5d Merge branch 'manager_save_angular_1_8' into 'master'
manager: Adapt html to stricter rules in angularjs >= 1.8.0

See merge request lemonldap-ng/lemonldap-ng!155
2020-07-01 10:47:44 +02:00
Olof Johansson 5571e22a55 manager: Adapt html to stricter rules in angularjs >= 1.8.0
label and textarea elements in XHTML must have a matching closing tag
for strict XHTML conformity; when upgrading to angularjs 1.8.0, this
became mandatory even when used with angular because of some potential
XSS issue.

Without this change, the rendering of the modal save form of the manager
web interface will "break" halfway through, and only the text "Summary"
is visible under the "Saving configuration" header. (This is similar to
what is described in #2197, but with that fixed applied.)

Reference: https://docs.angularjs.org/guide/migration#migrating-from-1-7-to-1-8
2020-06-30 16:36:03 +02:00
Baptiste Pecatte 24ecbb2f18 Document failed log samples 2020-06-26 22:06:40 +02:00
Baptiste Pecatte 068370a893 Add host to logs for use with fail2ban 2020-06-26 21:44:06 +02:00
Clément OUDOT f78b2bfa16 Update version in documentation 2020-06-04 19:31:50 +02:00
Maxime Besson e246bfd137 Fix pl translation after merge 2020-06-01 17:15:39 +02:00
Maxime Besson c487efc7da 2.0 to master doc patch 2020-06-01 16:45:00 +02:00
Maxime Besson 3d92ab15dd Merge branch 'v2.0' 2020-06-01 16:42:58 +02:00
Maxime Besson b855f175bc Improve translation of issue templates 2020-05-27 11:03:06 +02:00
Christophe Maudoux afc3bc7029 Fix bad merge 2020-05-25 00:45:16 +02:00
Christophe Maudoux 557f458803 Fix bad merge 2020-05-25 00:14:51 +02:00
Christophe Maudoux b2a1f055c3 Fix bad merge 2020-05-24 23:46:26 +02:00
Christophe Maudoux 79246c8da9 Tidy 2020-05-23 23:52:09 +02:00
Christophe Maudoux 279538613f Merge branch 'v2.0' 2020-05-23 23:43:36 +02:00
Christophe Maudoux 532ffe3fea Merge branch 'v2.0' 2020-05-23 23:38:06 +02:00
Christophe Maudoux d2d9988b61 Merge branch 'v2.0' 2020-04-25 23:16:21 +02:00
Xavier Guimard 1972443477 Revert bad merge 2020-04-12 20:44:11 +02:00
Xavier Guimard 5dc1bc0a49 Merge branch 'v2.0' 2020-04-12 20:40:24 +02:00
Xavier Guimard c09797ff11 Fix Ajax responses when rejected 2020-04-09 10:36:51 +02:00
Christophe Maudoux 01424a71ac Merge branch 'v2.0' 2020-04-08 23:34:49 +02:00
Christophe Maudoux 3b1b1b1997 Fix unit test 2020-04-05 12:36:48 +02:00
Christophe Maudoux 57f6a10a3e Merge branch 'v2.0' 2020-04-05 12:23:00 +02:00
Christophe Maudoux 5804a11099 Merge branch 'v2.0' 2020-04-03 19:35:19 +02:00
Christophe Maudoux 28dc89796c Merge branch 'v2.0' 2020-04-03 11:22:28 +02:00
Christophe Maudoux be55df6d1d Re-order Portal constant 2020-04-03 11:15:53 +02:00
Christophe Maudoux 7c0e6a2d00 Merge branch 'v2.0' 2020-04-01 15:55:31 +02:00
Christophe Maudoux c4ebfc3484 Merge branch 'v2.0' 2020-03-22 22:47:09 +01:00
Clément OUDOT a394dfbe82 Use isRequired attribute (#2119) 2020-03-17 16:45:59 +01:00
Christophe Maudoux a81dbb108b Merge branch 'v2.0' 2020-03-02 17:45:20 +01:00
Christophe Maudoux d67f32d2b2 Merge branch 'v2.0' 2020-02-25 21:28:07 +01:00
Maxime Besson cc4e53c36f Fix RPM version 2020-01-29 08:02:09 +01:00
Maxime Besson e39f67290c Fix unit test for #321 with old perl 2020-01-29 08:01:44 +01:00
Xavier Guimard 22a58a6f44 Merge branch 'v2.0' 2020-01-28 15:58:25 +01:00
Christophe Maudoux 3b3c1bff16 Merge branch 'v2.0' 2020-01-24 22:44:23 +01:00
Christophe Maudoux f0031cc7f6 Merge branch 'v2.0' 2020-01-15 21:06:54 +01:00
Christophe Maudoux 50316f2e50 Fix unit tests (#1605) 2020-01-10 23:07:21 +01:00
Christophe Maudoux aab0dcca14 Merge branch 'v2.0' 2020-01-10 23:06:59 +01:00
Christophe Maudoux ab292a034e Merge branch 'v2.0' 2020-01-04 22:38:58 +01:00
Christophe Maudoux 1c44733bfc Fix bad merge 2020-01-04 18:09:12 +01:00
Christophe Maudoux 0b8f84ae2d Enable debug 2020-01-04 17:28:52 +01:00
Christophe Maudoux 4fc458b174 Merge branch 'v2.0' 2020-01-04 17:09:48 +01:00
Christophe Maudoux 0546303dac Merge branch 'v2.0' 2020-01-04 14:24:04 +01:00
Christophe Maudoux ff095ca156 Merge branch 'v2.0' 2019-12-19 21:29:18 +01:00
Xavier d544eae57f Fix merge 2019-12-14 08:33:21 +01:00
Xavier f62a366812 Merge branch 'v2.0' 2019-12-13 18:14:47 +01:00
Xavier Guimard 74d2bc92c8 Merge branch 'fix-1882-merge' into 'master'
Fix #1882 in refresh token code

Closes #1882

See merge request lemonldap-ng/lemonldap-ng!113
2019-12-11 20:07:20 +01:00
Maxime Besson 4ead8b17ba Fix #1882 in refresh token code 2019-12-11 16:26:29 +01:00
Xavier c6740692af Merge branch 'v2.0' 2019-12-11 08:13:19 +01:00
Xavier 947dd9a438 Merge branch 'v2.0'
TODO: Fix OIDC
2019-12-11 08:00:40 +01:00
Christophe Maudoux 2efb445534 Merge branch 'v2.0' 2019-11-02 12:06:09 +01:00
Christophe Maudoux 9231711a41 Merge branch 'v2.0' 2019-10-29 19:33:11 +01:00
Xavier 3f7ae26d49 Merge branch 'v2.0' 2019-10-15 22:12:27 +02:00
Xavier aa2fa22074 Add regexp capture feature in rules (#321) 2019-10-15 21:46:04 +02:00
Xavier 6453a04a55 Merge branch 'v2.0' 2019-10-09 07:08:30 +02:00
Xavier Guimard 1cf89af06b Merge branch 'patch-1' into 'master'
fix typo

See merge request lemonldap-ng/lemonldap-ng!98
2019-10-08 15:49:05 +02:00
Vincent Mazenod f7d8547260 fix typo 2019-10-08 14:16:54 +02:00
Xavier 6e54b8b304 Fix version 2019-09-30 23:20:34 +02:00
Xavier 2323c031ec Merge branch 'v2.0' 2019-09-30 23:20:12 +02:00
Christophe Maudoux e612f53838 Merge branch 'v2.0' 2019-09-27 22:33:00 +02:00
Xavier cc79680b89 Merge branch 'v2.0' 2019-09-24 21:03:55 +02:00
Christophe Maudoux 9ec3ef8cfe Merge branch 'v2.0' 2019-09-22 15:54:58 +02:00
Christophe Maudoux 8af332c265 make json 2019-09-22 15:50:43 +02:00
Christophe Maudoux df83595e8e Typo 2019-09-20 21:56:38 +02:00
Xavier e3336d8117 Add missing dependency to DateTime::Format::RFC3339 2019-09-20 06:38:35 +02:00
Xavier f63f481cea Add missing dependency to DateTime::Format::RFC3339 2019-09-20 06:37:38 +02:00
Clément OUDOT 373f2f1a39 Merge branch 'maxbes/lemonldap-ng-fix-1882-remove-oidcServiceMetaDataIssuer' into 'master'
Maxbes/lemonldap ng fix 1882 remove oidc service meta data issuer

See merge request lemonldap-ng/lemonldap-ng!95
2019-09-19 16:02:59 +02:00
Clément OUDOT 0466a2c8cc Merge remote-tracking branch 'origin/master' into maxbes/lemonldap-ng-fix-1882-remove-oidcServiceMetaDataIssuer 2019-09-19 15:31:25 +02:00
Christophe Maudoux 52cacf4a08 Typo 2019-09-18 22:23:59 +02:00
Xavier cccd025dfc Tidy + typo 2019-09-18 21:49:55 +02:00
Xavier fedea4abbd Merge remote-tracking branch 'mamesene/certificateReset-1605' 2019-09-18 21:44:31 +02:00
Christophe Maudoux 52be87b012 Merge branch 'v2.0' 2019-09-18 21:14:24 +02:00
mamesene b18d47065a Add reset certificate bouton on standardform 2019-09-18 16:58:41 +02:00
mamesene 9d149a95f6 Reset Certificate module (#1605) 2019-09-18 16:04:45 +02:00
Maxime Besson a8cab64c5b Remove oidcServiceMetaDataIssuer (#1882) 2019-09-17 21:34:25 +02:00
Xavier 212a07ca20 Update versions 2019-09-17 20:57:48 +02:00
Xavier 8b5387a48b Merge branch 'v2.0' 2019-09-17 20:56:39 +02:00
Xavier f9704e8982 Merge branch 'v2.0' 2019-09-16 22:58:01 +02:00
Xavier 40215168c0 Fix merge 2019-09-12 22:30:24 +02:00
Xavier e1fe12a94d Merge branch 'v2.0' 2019-09-12 22:03:57 +02:00
Xavier ebd4c41a62 Fix ppolicy merge from v2.0 2019-09-11 21:32:33 +02:00
Xavier d881605fed Merge branch 'v2.0' 2019-09-11 21:22:50 +02:00
Clément OUDOT 374cac7874 Remove linkedInFields parameter (#1890) 2019-09-09 11:23:55 +02:00
Xavier 61200a67a7 Update manifest 2019-09-03 23:15:37 +02:00
Xavier ba7f8695f7 Merge branch 'v2.0' (fix versions) 2019-09-03 23:14:45 +02:00
Christophe Maudoux afd915f64c Merge branch 'v2.0' 2019-09-03 23:00:07 +02:00
Xavier c312e16712 Merge branch 'v2.0' 2019-09-02 23:16:37 +02:00
Christophe Maudoux 174193e74c Merge branch 'v2.0' 2019-09-01 22:11:33 +02:00
Christophe Maudoux 7c40b39a8d Update unit test 2019-08-31 22:23:47 +02:00
Xavier Guimard 8ac93e034d Merge branch 'v2.0' 2019-08-29 11:33:42 +02:00
Xavier Guimard a3ec47bbb7 Fix warning 2019-08-29 10:26:36 +02:00
Xavier Guimard 4193f4fb51 Merge branch 'v2.0' 2019-08-28 11:35:43 +02:00
Xavier 7e5d6d6afd Merge branch 'v2.0' 2019-08-27 07:14:35 +02:00
Christophe Maudoux 1212cd9ba2 Merge branch 'v2.0' 2019-08-25 18:47:43 +02:00
Xavier 89179afb88 Add autopkgtest test in .gitlab-ci.yml 2019-08-20 23:01:47 +02:00
Xavier bef05c6f5d Merge branch 'v2.0' 2019-08-20 21:49:21 +02:00
Xavier e32eb491d2 Increase autopkgtest speed 2019-08-20 21:44:42 +02:00
Christophe Maudoux 28732d614b Merge branch 'v2.0' 2019-08-15 22:43:20 +02:00
Christophe Maudoux 115cc9b027 Fix #1867 for 2.1 2019-08-09 23:34:54 +02:00
Christophe Maudoux 866d5457f3 Merge branch 'v2.0' 2019-08-09 23:33:59 +02:00
Christophe Maudoux 7bd1d23087 Fix test (number of error messages) 2019-08-03 11:27:53 +02:00
Christophe Maudoux 3a660bde24 Merge branch 'v2.0' 2019-08-03 11:18:06 +02:00
Christophe Maudoux 499b16bd07 Merge branch 'v2.0' 2019-07-31 16:34:38 +02:00
Christophe Maudoux c82fc0f572 Merge branch 'v2.0' 2019-07-23 16:03:10 +02:00
Christophe Maudoux f47f93533c Improve unit test 2019-07-19 10:50:19 +02:00
Christophe Maudoux b81ccf7517 Merge branch 'v2.0' 2019-07-19 10:13:33 +02:00
Christophe Maudoux b705b10da8 Merge branch 'v2.0' 2019-07-17 12:26:55 +02:00
Xavier 1fbfbc5c21 Fix tests 2019-07-13 09:41:13 +02:00
Christophe Maudoux b7c8d30b3f Merge branch 'v2.0' 2019-07-10 12:16:43 +02:00
Christophe Maudoux 4f6c0632bd Move Nginx links into snippets (#1811) 2019-07-04 21:10:08 +02:00
Xavier 82c25b4e2e Don't use more test threads than make wants 2019-07-02 23:22:29 +02:00
Christophe Maudoux 8f7e3eba37 Append missing Nginx links (#1811) 2019-07-02 22:36:42 +02:00
Xavier 6f365c9e43 Parallelize common/portal tests 2019-07-02 22:06:37 +02:00
Xavier 3b7a70e0b7 Merge branch 'v2.0' (with new tidy) 2019-07-02 20:12:11 +02:00
Xavier 891f926196 Trailing whitespaces 2019-07-01 21:30:03 +02:00
Xavier Guimard 77d72896f8 Fix bad merge 2019-07-01 20:25:44 +02:00
Xavier Guimard af63d55c08 Merge branch 'v2.0' 2019-07-01 20:21:42 +02:00
Xavier 1718efe6d5 Merge branch 'v2.0' 2019-06-30 09:37:15 +02:00
Xavier Guimard 8b7ce08587 Merge branch 'v2.0' 2019-06-28 14:35:30 +02:00
Xavier c8d38d52a6 Merge branch 'crypto-improvements' 2019-06-27 22:15:19 +02:00
Xavier cbde82bdfc Fix HMAC verif 2019-06-27 22:12:57 +02:00
Xavier 1a1ccd7568 Merge branch 'crypto-improvements' 2019-06-27 22:03:05 +02:00
Xavier 2fcaf52bcf Better random string generation (#1803) 2019-06-27 21:59:18 +02:00
Xavier b1f12b72e5 Add MAC verification to crypto 2019-06-27 20:48:01 +02:00
Xavier Guimard cc8c5e057e Use IV for *cryptHex methods 2019-06-27 19:36:01 +02:00
Xavier Guimard 9d5d1f6cd5 Don't use Crypt::URandom inside jail: this import file access libraries 2019-06-27 19:10:51 +02:00
Xavier Guimard 0b1643c294 Add an initialization vector in crypt methods 2019-06-27 18:39:01 +02:00
Xavier Guimard c7cb6594dd Fix bad merge 2019-06-27 10:24:44 +02:00
Xavier Guimard 72439d341f Merge branch 'v2.0' 2019-06-27 07:59:37 +02:00
Xavier 400b9eaab9 Revert "Better password generation (#1803)"
This reverts commit b4ec8eaeeb.
2019-06-26 06:19:07 +02:00
Xavier b4ec8eaeeb Better password generation (Fixes: #1803) 2019-06-25 21:01:57 +02:00
Xavier Guimard 3d1be3e7e5 Set negetive values for PE_PASSWORD_OK and PE_LOGOUT_OK (Fixes: #1816) 2019-06-25 17:38:08 +02:00
Xavier Guimard 1c0ffb3e83 Import v2.0 tests 2019-06-25 17:20:27 +02:00
Xavier Guimard 1b4600b15c Merge branch 'v2.0' 2019-06-25 17:14:00 +02:00
Xavier Guimard 4bfad92530 Merge branch 'v2.0' 2019-06-24 11:46:57 +02:00
Xavier 243cad350f Enable Ubuntu Disco build 2019-06-23 08:45:23 +02:00
Xavier 2e7b3c584a Fix LDAP Policy 2019-06-23 08:18:19 +02:00
Xavier 9e16e2b75c Merge branch 'v2.0' 2019-06-23 07:21:55 +02:00
Christophe Maudoux 9ac5834bfe Merge branch 'v2.0' 2019-06-17 22:42:28 +02:00
Xavier 44e472f0f5 Improve #1723 test 2019-06-15 22:29:45 +02:00
Xavier c7dd179f2c Add #1723 test 2019-06-15 22:28:24 +02:00
Xavier eabe1dc129 Fix UserDB::Proxy missing setSecurity() (#1723) 2019-06-15 22:27:58 +02:00
Xavier fe55ba3567 Set Content-Type for JSON 401 response 2019-06-15 22:26:37 +02:00
Xavier c1a8723b90 Don't stop auth process when remote response is 401 (#1723) 2019-06-15 21:28:54 +02:00
Xavier b8c3b45aa3 Fix translations 2019-06-15 10:08:01 +02:00
Xavier d27e4bcc55 Merge branch 'v2.0' 2019-06-15 09:23:50 +02:00
Xavier Guimard 020553ab6a Merge branch 'v2.0' 2019-06-13 10:09:18 +02:00
Xavier a2454ff4cc Merge branch 'v2.0' 2019-06-12 21:44:39 +02:00
Christophe Maudoux aabb65629b Merge remote-tracking branch 'origin/v2.0' 2019-06-10 21:07:42 +02:00
Xavier Guimard f59681e80e Merge branch 'v2.0' 2019-06-07 17:48:32 +02:00
Christophe Maudoux f3a37d2387 Merge remote-tracking branch 'origin/v2.0' 2019-06-04 23:26:19 +02:00
Xavier Guimard ee661fc61d Merge branch 'v2.0' 2019-06-04 17:59:55 +02:00
Christophe Maudoux 59f6106ba6 Merge remote-tracking branch 'origin/v2.0' 2019-05-31 00:16:07 +02:00
Xavier f75093d433 Merge branch 'v2.0' 2019-05-28 22:12:50 +02:00
Xavier Guimard 1509d44d5f Merge branch 'v2.0' 2019-05-27 12:03:45 +02:00
Xavier Guimard 4678649367 Merge branch 'v2.0' 2019-05-24 10:23:40 +02:00
Xavier Guimard 8fe4fb0b09 Update README.md 2019-05-17 11:11:46 +02:00
Xavier Guimard 63f11f31f3 Update README.md 2019-05-17 11:09:32 +02:00
Xavier Guimard 9d0a07f04c Simplify Display.pm 2019-05-17 10:26:45 +02:00
Xavier Guimard 857ee8b0a0 Move captcha template parameters into plugin (#1652) 2019-05-17 10:26:45 +02:00
Xavier 8c562c7817 Modularize Display/login (#1652) 2019-05-17 10:26:45 +02:00
Xavier Guimard 5a1c090a18 Merge branch 'v2.0' 2019-05-17 10:26:19 +02:00
Xavier Guimard bdc68d5833 Merge branch 'v2.0' 2019-05-15 14:25:57 +02:00
Xavier 224307515f Merge branch 'v2.0' 2019-05-11 20:25:11 +02:00
Christophe Maudoux 0cbbb75971 Update handler-nginx.conf 2019-05-09 10:08:56 +02:00
Xavier Guimard db4b46c487 Merge branch 'v2.0' 2019-05-07 09:36:19 +02:00
Christophe Maudoux a3ec2eb225 Merge branch 'v2.0' 2019-05-04 20:26:32 +02:00
Xavier f1f3929cf1 Merge branch 'v2.0' 2019-05-02 14:49:35 +02:00
Christophe Maudoux c233ef37ef Merge branch 'favapps' into 'master'
Favapps

Closes #1689

See merge request lemonldap-ng/lemonldap-ng!74
2019-05-02 14:46:49 +02:00
Christophe Maudoux 97bb3e44e4 Fix unit test 2019-05-01 23:39:37 +02:00
Christophe Maudoux cb9add6eac Fix warning message 2019-05-01 13:09:26 +02:00
Christophe Maudoux a06d91a16e Update manifest 2019-05-01 12:15:34 +02:00
Christophe Maudoux 9ac0b65a91 Append FavApps unit test (#1689) 2019-05-01 12:15:25 +02:00
Christophe Maudoux e9b26bb79a Merge remote-tracking branch 'origin/master' into favapps 2019-04-30 21:57:46 +02:00
Xavier 29b71569de Merge branch 'v2.0' 2019-04-30 21:03:14 +02:00
Christophe Maudoux 14ae7ea1a2 Append reset button (#1689) 2019-04-30 19:20:42 +02:00
Christophe Maudoux 66ec4da991 Update langs (#1689) 2019-04-30 19:20:19 +02:00
Christophe Maudoux 130f6ba983 Move FavApps plugin options to Portal Menu (#1689) 2019-04-30 19:19:56 +02:00
Christophe Maudoux f9ba34006e Update manifest (#1689) 2019-04-30 19:18:26 +02:00
Christophe Maudoux 6e2e3456fe Clean code 2019-04-29 21:56:18 +02:00
Christophe Maudoux f1c82e52cd Sort by spoofed and real attributes (#1658) 2019-04-29 21:48:52 +02:00
Christophe Maudoux 58279c029f Improve unit test 2019-04-28 22:56:32 +02:00
Christophe Maudoux 4cce434e93 Update star icons & License (#1689) 2019-04-28 21:44:32 +02:00
Christophe Maudoux e9fd5815c9 Display FavApps tab by default if required (#1689) 2019-04-28 20:39:05 +02:00
Christophe Maudoux 12e96a3056 Display menu module only if at least one FavApp is registered (#1689) 2019-04-28 19:04:29 +02:00
Christophe Maudoux 82bf2e4a4c Fix template (#1689) 2019-04-27 23:30:36 +02:00
Christophe Maudoux ce4135c4b9 Display star for favorite applications (#1689) 2019-04-27 17:46:59 +02:00
Christophe Maudoux 548032fbe0 Improve code (#1386) 2019-04-26 23:00:17 +02:00
Christophe Maudoux 441df6e7ea WIP - Prepare template loop (#1689) 2019-04-26 22:58:53 +02:00
Christophe Maudoux 239bb4634f Manage error (#1689) 2019-04-25 23:03:30 +02:00
Christophe Maudoux 6011eaf7b7 Typo 2019-04-25 23:03:15 +02:00
Christophe Maudoux 0279d16f62 Update langs (#1689) 2019-04-25 23:02:59 +02:00
Christophe Maudoux aea313e2e6 Use activation rule (#1689) 2019-04-25 23:02:37 +02:00
Christophe Maudoux 547a688c28 Modify template (#1689) 2019-04-25 11:02:40 +02:00
Christophe Maudoux 140d697cfa Improve code (#1689) 2019-04-25 11:02:06 +02:00
Christophe Maudoux 106e20bbc5 Manage errors (#1689) 2019-04-24 23:29:56 +02:00
Christophe Maudoux 1cf78550b4 WIP - Append/remove favorite apps (#1689) 2019-04-24 23:29:20 +02:00
Christophe Maudoux 4adc002327 Update langs (#1689) 2019-04-24 12:35:57 +02:00
Christophe Maudoux 1926c121c8 WIP - Append all parameters (#1689) 2019-04-24 12:16:31 +02:00
Christophe Maudoux 33f8970a17 Improve JS code (#1689) 2019-04-24 12:15:49 +02:00
Christophe Maudoux 5f8dcfb2b1 Make minify (#1689) 2019-04-24 11:04:39 +02:00
Christophe Maudoux b2397f2b9c WIP - favApps plugin (#1689) 2019-04-24 11:00:40 +02:00
Christophe Maudoux 9c0b7dbc00 Update langs (#1689) 2019-04-24 10:59:42 +02:00
Christophe Maudoux 7a2f104ba8 Build struct 2019-04-23 21:59:56 +02:00
Christophe Maudoux 8460e47b49 Merge remote-tracking branch 'origin/master' into favapps 2019-04-23 21:58:09 +02:00
Xavier Guimard 76b3e7b17c Merge branch 'v2.0' 2019-04-23 16:44:35 +02:00
Xavier Guimard 999ecb32bc Merge branch 'v2.0' 2019-04-23 15:14:21 +02:00
Xavier Guimard 80f9889271 Merge branch 'v2.0' 2019-04-23 15:12:59 +02:00
Xavier Guimard c496d979f5 Optimize #1718 2019-04-23 14:40:55 +02:00
Xavier Guimard a2b03dbbf7 Typo (#1718) 2019-04-23 14:33:43 +02:00
Xavier Guimard b736b2c638 Fix manifest 2019-04-23 14:17:38 +02:00
Xavier Guimard 5af27967c6 Auto generate handler wrapper when possible (#1718) 2019-04-23 14:16:31 +02:00
Xavier c968b39715 Merge branch 'v2.0' 2019-04-22 23:30:12 +02:00
Christophe Maudoux 48d51b1c5e Merge remote-tracking branch 'origin/master' into favapps 2019-04-21 22:34:31 +02:00
Christophe Maudoux 1c1f556aff Typo 2019-04-17 23:15:14 +02:00
Christophe Maudoux e3e4239563 WIP - JS & Menu.tpl (1689) 2019-04-17 23:15:03 +02:00
Xavier 2f3f1bd99b Merge branch 'v2.0' 2019-04-17 20:25:04 +02:00
Xavier Guimard bd94c5579d Merge branch 'v2.0' 2019-04-16 13:39:31 +02:00
Christophe Maudoux ad00102662 Prepare favApps loop (#1689) 2019-04-15 22:16:12 +02:00
Christophe Maudoux 7a284338be Update langs (#1689) 2019-04-14 22:46:07 +02:00
Christophe Maudoux e490addd2d WIP - favApps skeleton (#1689) 2019-04-14 22:34:58 +02:00
Christophe Maudoux 476212094a Merge branch 'v2.0' 2019-04-14 21:13:43 +02:00
Xavier 27bf1ea3d8 Merge branch 'v2.0' 2019-04-11 22:12:02 +02:00
Xavier 4d7a3b8a33 Merge branch 'v2.0' 2019-04-09 22:30:05 +02:00
Xavier Guimard 01b5951b73 Merge branch 'v2.0' 2019-04-05 10:10:40 +02:00
Xavier 4798683129 Merge branch 'v2.0' 2019-04-02 06:56:45 +02:00
Xavier Guimard b40f292d8a Merge branch 'v2.0' 2019-03-27 10:31:30 +01:00
Xavier Guimard 6a13b4f40d Update META.* 2019-03-26 09:18:04 +01:00
Xavier Guimard 4cb497e5a2 Merge branch 'v2.0' 2019-03-26 08:09:56 +01:00
Xavier 3cea903c79 Merge branch 'v2.0' 2019-03-25 22:14:10 +01:00
Xavier 4fcf77e721 Merge branch 'v2.0' 2019-03-19 08:32:33 +01:00
Xavier Guimard 8941ee4dd5 Merge branch 'v2.0' 2019-03-14 14:57:39 +01:00
Xavier Guimard 77301e70ca Merge branch 'v2.0' 2019-03-07 22:29:34 +01:00
Xavier Guimard 82242481e1 Merge branch 'v2.0' 2019-03-03 09:21:39 +01:00
Xavier Guimard 44eb01b857 Prepare autopkgtest for pkg-perl-tools > 0.51 2019-03-03 09:20:12 +01:00
Christophe Maudoux 24ba2889af Update manifest (#1658) 2019-03-03 09:20:12 +01:00
Christophe Maudoux b5abdee8f3 Append unit test (#1658) 2019-03-03 09:20:12 +01:00
Christophe Maudoux b18fd9c9fe Fix OTT & minor improvements (#1658) 2019-03-03 09:20:12 +01:00
Christophe Maudoux c50b86cd51 Append unit test (#1658) 2019-03-03 09:20:12 +01:00
Christophe Maudoux 461120ad65 Typo (#1658) 2019-03-03 09:20:12 +01:00
Christophe Maudoux 6bd8e2219a Update default conf. (#1658) 2019-03-03 09:20:12 +01:00
Christophe Maudoux 2653cfdc9e Fix error (#1658) 2019-03-03 09:20:12 +01:00
Christophe Maudoux 6a0b71b01a Improve display (#1658) 2019-03-03 09:20:12 +01:00
Christophe Maudoux d78e45cb50 Update langs (#1658) 2019-03-03 09:20:12 +01:00
Christophe Maudoux 1f5c7a83a9 Dispatching attributes (#1658) 2019-03-03 09:20:12 +01:00
Christophe Maudoux f857f1a8a7 Check access rules (#1658) 2019-03-03 09:20:12 +01:00
Clément OUDOT 6740269cce Restore old login history (#1656) 2019-03-03 09:19:42 +01:00
Clément OUDOT 48b86bd224 Improve log in updateSession (#1656) 2019-03-03 09:19:42 +01:00
dcoutadeur 0eef2220d2 add test to fix 'id_token validity not correctly evaluated' #1662 2019-03-03 09:19:42 +01:00
dcoutadeur 5324da2c15 fix id_token validity not correctly evaluated #1662 2019-03-03 09:19:42 +01:00
Clément OUDOT 59d163c663 Merge branch 'v2.0' 2019-02-28 08:52:48 +01:00
Xavier Guimard 4e0113ddd6 Merge branch 'v2.0' 2019-02-13 22:36:01 +01:00
Xavier Guimard 721214d528 Merge branch 'v2.0' 2019-02-13 07:12:18 +01:00
Xavier Guimard 5862481956 Set master version to 2.1.0 2019-02-12 18:21:38 +01:00
568 changed files with 2991 additions and 2390 deletions

View File

@ -30,6 +30,21 @@ stages:
before_script:
- env | grep ^CI_
autopkgtest:
stage: build
image: buildpkg/debian:buster
script:
- cd $CI_PROJECT_DIR
- env DEBIAN_FRONTEND=noninteractive apt-get -q -y update
- env DEBIAN_FRONTEND=noninteractive apt-get -q -y install --no-install-recommends aspcud apt-cudf pkg-perl-autopkgtest
- env DEBIAN_FRONTEND=noninteractive apt-get -q -y --solver aspcud -o APT::Solver::Strict-Pinning=0 -o Debug::pkgProblemResolver=yes build-dep .
- make
- make -j8 autopkgtest
build_stretch:
extends: .debian_build_job
image: buildpkg/debian:stretch
build_buster:
extends: .debian_build_job
image: buildpkg/debian:buster

View File

@ -1,8 +1,10 @@
### Concerned version
### Environment
Version: %X.X.X
LemonLDAP::NG version: (version number)
Platform: (Nginx/Apache/Node.js)
Operating system: (distribution and version)
Web server: (Nginx/Apache/Node.js/...)
### Summary
@ -11,7 +13,7 @@ Summarize the bug encountered concisely
### Logs
```
Set here the logs using debug mode if possible. Attach it as file if it's too big
Include the logs using logLevel = debug if possible. Attach it as file if it's too big
```
### Backends used

12
COPYING
View File

@ -113,6 +113,18 @@ License: CC-3
Comment: This work, "sfa_manager.png", is a derivative of
"Noun project 1162.svg" by Christopher T. Howlett, under CC-BY-3.0.
Files: lemonldap-ng-portal/site/htdocs/static/common/icons/star0.png
Copyright: Christophe Maudoux <chrmdx@gmail.com>
License: CC-3
Comment: This work, "star0.png", is a derivative of
"Silver star with red border.png" by ANGELUS, under CC-BYSA-3.0.
Files: lemonldap-ng-portal/site/htdocs/static/common/icons/star1.png
Copyright: Christophe Maudoux <chrmdx@gmail.com>
License: CC-3
Comment: This work, "star1.png", is a derivative of
"Golden star with red border.png" by ANGELUS, under CC-BYSA-3.0.
Files: lemonldap-ng-portal/site/htdocs/static/common/icons/notifsExplorer.png
Copyright: Various artists
License: CC-BY-NC-ND-3.0 or GFDL-1.3

12
INSTALL
View File

@ -31,12 +31,12 @@ package for Debian works fine).
Perl modules:
Apache::Session, Net::LDAP, MIME::Base64, CGI, LWP::UserAgent, Cache::Cache,
DBI, XML::Simple, SOAP::Lite, HTML::Template, XML::LibXML, XML::LibXSLT
DBI, SOAP::Lite, HTML::Template, XML::LibXML, XML::LibXSLT
With Debian:
apt-get install libapache-session-perl libnet-ldap-perl libcache-cache-perl \
libdbi-perl perl-modules libwww-perl libcache-cache-perl \
libxml-simple-perl libhtml-template-perl libsoap-lite-perl \
libhtml-template-perl libsoap-lite-perl \
libxml-libxml-perl libxml-libxslt-perl
1.2 - BUILDING
@ -129,17 +129,17 @@ to access to configuration.
Manager:
--------
Apache::Session, MIME::Base64, CGI, LWP::UserAgent, DBI, XML::Simple,
Apache::Session, MIME::Base64, CGI, LWP::UserAgent, DBI,
SOAP::Lite, XML::LibXML, XML::LibXSLT, Lemonldap::NG::Common
With Debian:
apt-get install perl-modules libxml-simple-perl libdbi-perl libwww-perl
apt-get install perl-modules libdbi-perl libwww-perl
# If you want to use SOAP
apt-get install libsoap-lite-perl
Portal:
-------
Apache::Session, Net::LDAP, MIME::Base64, CGI, Cache::Cache, DBI, XML::Simple,
Apache::Session, Net::LDAP, MIME::Base64, CGI, Cache::Cache, DBI,
SOAP::Lite, HTML::Template, XML::LibXML, Lemonldap::NG::Common
With Debian:
@ -148,7 +148,7 @@ With Debian:
Handler:
--------
Apache::Session, MIME::Base64, CGI, LWP::UserAgent, Cache::Cache, DBI,
XML::Simple, SOAP::Lite, Lemonldap::NG::Common
SOAP::Lite, Lemonldap::NG::Common
With Debian:
apt-get install libapache-session-perl libwww-perl libcache-cache-perl

View File

@ -13,6 +13,11 @@ the requested URL and the rule calculates if the user is authorized.
You can find documentation on [our website](https://lemonldap-ng.org/)
# Contribute
LemonLDAP::NG is hosted on [OW2](https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng).
Please use this platform to post issues, merge requests,...
# Upgrade
See https://lemonldap-ng.org/documentation/latest/upgrade
@ -29,8 +34,8 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a [copy of the GNU General Public License](LICENSE)
along with this program. If not, see http://www.gnu.org/licenses/.
Copyright: see COPYING
Copyright: see [COPYING](COPYING)

View File

@ -87,7 +87,7 @@
"cfgAuthor" : "The LemonLDAP::NG team",
"cfgDate" : "1627287638",
"cfgNum" : 1,
"cfgVersion" : "2.0.13",
"cfgVersion" : "2.1.0",
"cookieName" : "lemonldap",
"demoExportedVars" : {
"cn" : "cn",

8
debian/control vendored
View File

@ -19,6 +19,7 @@ Build-Depends-Indep: gsfonts <!nocheck>,
libcrypt-openssl-x509-perl <!nocheck>,
libcrypt-urandom-perl <!nocheck>,
libcrypt-rijndael-perl <!nocheck>,
libdatetime-format-rfc3339-perl <!nocheck>,
libdbd-sqlite3-perl <!nocheck>,
libdbi-perl <!nocheck>,
libdigest-hmac-perl <!nocheck>,
@ -228,8 +229,7 @@ Recommends: libapache-session-browseable-perl,
Suggests: libconvert-base32-perl,
libnet-ldap-perl,
libsoap-lite-perl,
libxml-libxml-perl,
libxml-simple-perl
libxml-libxml-perl
Conflicts: liblemonldap-ng-cli-perl
Description: Lemonldap::NG common files
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
@ -257,8 +257,7 @@ Depends: ${misc:Depends},
lemonldap-ng-fastcgi-server (= ${binary:Version}) | lemonldap-ng-uwsgi-app (= ${binary:Version}) | apache2 | httpd-cgi
Recommends: lemonldap-ng-doc (= ${binary:Version}),
libxml-libxml-perl,
libxml-libxslt-perl,
libxml-simple-perl
libxml-libxslt-perl
Suggests: libclone-perl,
libregexp-assemble-perl
Pre-Depends: debconf
@ -298,6 +297,7 @@ Recommends: gsfonts,
libunicode-string-perl
Suggests: gpg,
libcrypt-u2f-server-perl,
libdatetime-format-rfc3339-perl,
libdbi-perl,
libglib-perl,
libgssapi-perl,

View File

@ -2,3 +2,5 @@
/etc/lemonldap-ng/handler-nginx.conf /etc/nginx/sites-available/handler-nginx.conf
/etc/lemonldap-ng/test-apache2.conf /etc/apache2/sites-available/test-apache2.conf
/etc/lemonldap-ng/test-nginx.conf /etc/nginx/sites-available/test-nginx.conf
/etc/lemonldap-ng/nginx-lmlog.conf /etc/nginx/snippets/llng-lmlog.conf
/etc/lemonldap-ng/nginx-lua-headers.conf /etc/nginx/snippets/llng-lua-headers.conf

View File

@ -269,16 +269,3 @@ SSL authentication
To chain SSL, you have to set "SSLRequire optional" in Apache
configuration, else users will be authenticated by SSL only.
Migrating from Multi
--------------------
Old :doc:`Multiple backends stack<authmulti>`
implemented only \`if\` and \`or\` keywords. Examples:
================================================================ =====================================================
Multi expressions Combination
================================================================ =====================================================
``LDAP;DBI`` ``[myLDAP] or [myDBI]``
``DBI $ENV{REMOTE_ADDR}=~/^192/;LDAP $ENV{REMOTE_ADDR}!~/^192/`` ``if $env->{REMOTE_ADDR} then [myDBI] else [myLDAP]``
================================================================ =====================================================

View File

@ -121,8 +121,6 @@ Filters
In LDAP filters, $user is replaced by user login, and $mail by
user email.
- **Default filter**: default LDAP filter for searches, should not be
modified.
- **Authentication filter**: Filter to find user from its login
(default: ``(&(uid=$user)(objectClass=inetOrgPerson))``)
- **Mail filter**: Filter to find user from its mail (default:
@ -182,7 +180,7 @@ Groups
If your LDAP countains over a thousand groups, you
should avoid using group processing, check out
:ref:`the performance page<performances-ldap-performances>` for
alternatives
alternatives
Password
~~~~~~~~

View File

@ -30,8 +30,6 @@ Then, go in ``LinkedIn parameters``:
- **Authentication level**: authentication level for this module.
- **Client ID**: the application ID you get
- **Client secret**: the corresponding secret
- **Searched fields** (deprecated): Fields requested on People endpoint
in v1, no more used in v2 API
- **Field containing user identifier**: Field that will be used as main
user identifier in LL::NG, usually ``id`` (LinkedIn numeric
identifer) or ``emailAddress``.

View File

@ -13,6 +13,11 @@ Presentation
LL::NG is able to send (through REST or SOAP) authentication
credentials to another LL::NG portal, like a proxy.
.. warning::
SOAP support may be removed in LLNG 3.0
The difference with :doc:`remote authentication<authremote>` is that the
client will never be redirect to the main LL::NG portal. This
configuration is usable if you want to expose your internal SSO portal

View File

@ -15,8 +15,6 @@ This page shows some examples of LL::NG Command Line Interface. See
Save/restore configuration
--------------------------
This part requires LLNG 2.0.5 at least.
Save:
.. code-block:: sh
@ -31,7 +29,7 @@ Restore:
# Or
/usr/share/lemonldap-ng/bin/lemonldap-ng-cli restore - <config.json
Rollback (restore previous configuration, *since 2.0.8*):
Rollback (restore previous configuration):
.. code-block:: shell
@ -314,15 +312,6 @@ these commands;
openssl req -new -newkey rsa:4096 -keyout saml.key -nodes -out saml.pem -x509 -days 3650
Fix the certificate key format (you can skip this step if you are
running >= 2.0.6)
::
sed -e "s/END PRIVATE/END RSA PRIVATE/" \
-e "s/BEGIN PRIVATE/BEGIN RSA PRIVATE/" \
-i saml.key
Import them in configuration and activate the SAML issuer
::

View File

@ -58,9 +58,9 @@ author = u'LemonLDAP::NG'
# built documents.
#
# The short X.Y version.
version = u'2.0'
version = u'3.0'
# The full version, including alpha/beta/rc tags.
release = u'2.0'
release = u'3.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -132,7 +132,7 @@ configuration.
Manager API
-----------
Since 2.0.8, a Manager API is available for:
Manager API is available for:
- Second factors management for users
- OpenID Connect RP management

View File

@ -95,16 +95,17 @@ As *user*, create directory in directory:
git checkout master # go to master branch
git remote add upstream https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng.git # to connect to remote branch
git fetch upstream # import branch
git checkout v2.0 # to change branch
git checkout v2.1 # to change branch
git fetch upstream
Import version branch on linux station:
::
git checkout v2.0
git fetch upstream
git rebase upstream/v2.0 # to align to parent project remote branch
git checkout v2.1
git fetch upstream --all
git rebase upstream/v2.1 # to align to parent project remote branch
git push # to push to working remote branch
On gitlab, create working branch, one per thematic on linux station:
@ -115,9 +116,9 @@ On gitlab, create working branch, one per thematic on linux station:
git status
git commit -am "explanations (#number gitlab ticket)"
git commit --amend file(s) # to modify a commit
git rebase v2.0 # align local working branch to local 2.0
git rebase v2.1 # align local working branch to local 2.1
git checkout -- file(s) # revert
git push # to send on remote working branch ! Only after doing some commits !
git push # to send on remote working branch
On gitlab, submit merge request when tests are corrects.
@ -126,7 +127,7 @@ Install dependencies
::
aptitude install libapache-session-perl libcache-cache-perl libclone-perl libconfig-inifiles-perl libconvert-pem-perl libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcrypt-openssl-x509-perl libcrypt-rijndael-perl libdbi-perl libdigest-hmac-perl libemail-sender-perl libgd-securityimage-perl libhtml-template-perl libio-string-perl libjson-perl libmime-tools-perl libmouse-perl libnet-ldap-perl libplack-perl libregexp-assemble-perl libregexp-common-perl libsoap-lite-perl libstring-random-perl libtext-unidecode-perl libunicode-string-perl liburi-perl libwww-perl libxml-simple-perl libxml-libxslt-perl libcrypt-urandom-perl libconvert-base32-perl cpanminus
aptitude install libapache-session-perl libcache-cache-perl libclone-perl libconfig-inifiles-perl libconvert-pem-perl libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcrypt-openssl-x509-perl libcrypt-rijndael-perl libdbi-perl libdigest-hmac-perl libemail-sender-perl libgd-securityimage-perl libhtml-template-perl libio-string-perl libjson-perl libmime-tools-perl libmouse-perl libnet-ldap-perl libplack-perl libregexp-assemble-perl libregexp-common-perl libsoap-lite-perl libstring-random-perl libtext-unidecode-perl libunicode-string-perl liburi-perl libwww-perl libxml-libxslt-perl libcrypt-urandom-perl libconvert-base32-perl cpanminus
aptitude install apache2 libapache2-mod-fcgid libapache2-mod-perl2 # install Apache
aptitude install nginx nginx-extras # install Nginx
cpanm perltidy@20181120

View File

@ -23,7 +23,7 @@ from a version older than 1.0
Can't locate /usr/share/lemonldap-ng/configStorage.pl
→ When you upgrade from Debian Lenny with customized index.pl files, you
must upgrade them.
must upgrade them.
Lemonldap::NG::Handler
----------------------

View File

@ -53,36 +53,13 @@ portal:
attributes: it can contain boolean results or any string
- macros can also be used to import environment variables *(these
variables are in CGI format)*. Example: ``$ENV{HTTP_COOKIE}``
- groups are stored as a string with values separated by ''; ''
(default values separator) in the special attribute ``groups``: it
contains the names of groups whose rules were returned true for the
current user. For example:
.. code-block:: perl
$groups = group3; admin
- You can also get groups in ``$hGroups`` which is a Hash Reference of
this form:
.. code-block:: perl
$hGroups = {
'group3' => {
'description' => [
'Service 3',
'Service 3 TEST'
],
'cn' => [
'group3'
],
'name' => 'group3'
},
'admin' => {
'name' => 'admin'
}
}
- You can check for group membership of a particular user with the
``inGroup`` function, see examples below.
- If you need more advanced processing of the group list (filtering,
rewriting) you may use ``$groups``, a flat list of all the user's
groups, separated by ''; '' (default values separator). Or the
``$hGroups`` variable which is a perl hash whose keys are the group
names.
Example for macros:
@ -107,6 +84,42 @@ Defining a group for admins
Using groups in a rule
.. code-block:: perl
^/admin -> inGroup('admin')
# Advanced usage
^/admin -> defined $hGroups->{'admin'}
^/admin -> $groups =~ /\badmin\b/
.. note::
Groups are computed after macros, so a group rule may involve a
macro value.
.. warning::
Macros and groups are computed in alphanumeric order,
that is, in the order they are displayed in the manager. For example,
macro "macro1" will be computed before macro "macro2": so, expression of
macro2 may involve value of macro1. As same for groups: a group rule may
involve another, previously computed group.
# Use a boolean macro in a rule
^/admin -> $isAdmin
# Use a string macro in a HTTP header
Display-Name -> $displayName
Defining a group for admins
.. code-block:: perl
# group
admin -> $uid eq 'foo' or $uid eq 'bar'
Using groups in a rule
.. code-block:: perl
^/admin -> $groups =~ /\badmin\b/

View File

@ -321,8 +321,6 @@ Example::
listMatch
~~~~~~~~~
.. versionadded:: 2.0.7
This function lets you test if a particular value can be found with a
multi-valued session attribute.
@ -349,8 +347,6 @@ found.
inGroup
~~~~~~~
.. versionadded:: 2.0.8
This function lets you test if the user is in a given group. It is
case-insensitive.
@ -405,11 +401,8 @@ IP address is local*:
varIsInUri
~~~~~~~~~~
.. versionadded:: 2.0.7
Function to check if a variable is in requested URI
Example *check if $uid is in /check-auth/ URI*:
Function to check if a variable is in requested URI. Example *check if
$uid is in /check-auth/ URI*:
.. code-block:: perl
@ -429,7 +422,3 @@ Example *check if $uid is in /check-auth/ URI*:
https://test1.example.com/check-auth/rtyler/api -> false
https://test1.example.com/check-auth/rtyler -> false
.. |image0| image:: /documentation/new.png
:width: 35px
.. |image1| image:: /documentation/new.png
:width: 35px

View File

@ -11,6 +11,16 @@ Handlers are build on rows of modules:
- Library types if needed *(may inherit from Main)*
- Main: the main handler library
Since version 2.1, wrappers are autogenerated when undefined. Generated
code is simply:
.. code:: perl
package Lemonldap::NG::Handler::Platform::Type;
use base 'Lemonldap::NG::Handler::Lib::Type',
'Lemonldap::NG::Handler::Platform::Main';
1;
Overview of Handler packages
----------------------------

View File

@ -6,4 +6,4 @@ Standard SSO protocols
samlservice
openidconnectservice

View File

@ -95,8 +95,7 @@ Then, add the official LL::NG repository
version
- Use the ``testing`` repository to get packages from next major
version
- Use the ``2.0`` repository to avoid upgrade to next major version
- Use the ``2.1`` repository to avoid upgrade to next major version
Finally update your APT cache:

View File

@ -95,7 +95,7 @@ Run this to update packages cache:
You must also install the EPEL repository for non-core
dependencies. See :ref:`prerequisites and dependencies<prereq-yum>`
chapter for more.
chapter for more.
Manual download
~~~~~~~~~~~~~~~

View File

@ -5,7 +5,7 @@ Each time you save a configuration, Manager launch a lot of tests:
- unit tests for each key: they are declared in
Lemonldap::NG::Manager::Attributes *(source
Lemonldap::NG::Manager::Build::Attributes)*
Lemonldap::NG::Manager::Build::Attributes)*
- more advanced tests declared in Lemonldap::NG::Manager::Conf::Tests
In some case *(conf overridden in INI file,...)*, you may have to ignore

View File

@ -356,7 +356,7 @@ Available options:
- **Server**: Enable/Disable notification server
- **Default condition**: Condition appended to ALL notifications
inserted by notification server (JSON format only)
inserted by notification server
- **Notification parameters to send**: Notifications parameters
returned by ``GET`` method
- **HTTP methods**: Enable/Disable HTTP methods

View File

@ -18,7 +18,6 @@ Key name Documentation
ADPwdExpireWarning AD password expire warning ✔
ADPwdMaxAge AD password max age ✔
AuthLDAPFilter LDAP filter for auth search ✔
LDAPFilter Default LDAP filter ✔
SMTPAuthPass Password to use to send mails ✔
SMTPAuthUser Login to use to send mails ✔
SMTPPort Fix SMTP port ✔

View File

@ -247,17 +247,10 @@ First, create a file to contain the plugin code ::
Enabling your plugin
~~~~~~~~~~~~~~~~~~~~
Declare the plugin in lemonldap-ng.ini:
Declare the plugin in Manager, in General Parameters > Plugins > Custom
Plugins.
::
vi /etc/lemonldap-ng/lemonldap-ng.ini
.. code-block:: perl
[portal]
customPlugins = Lemonldap::NG::Portal::MyPlugin
;customPlugins = Lemonldap::NG::Portal::MyPlugin1, Lemonldap::NG::Portal::MyPlugin2, ...
Since 2.0.7, it can also be configured in Manager, in General Parameters
> Plugins > Custom Plugins.
- Modules list: for example
``Lemonldap::NG::Portal::MyPlugin1, Lemonldap::NG::Portal::MyPlugin2``
- Additional parameters: parameters that will be available in
``customPluginsParams`` configuration key

View File

@ -346,7 +346,6 @@ Password management
revealed. Disabled by default.
Password Policy
---------------
.. tip::

View File

@ -65,8 +65,8 @@ Core
- Regexp::Common
- SOAP::Lite *(optional)*
- String::Random
- Text::Unidecode *(Since LemonLDAP::NG 2.0.5)*
- Unicode::String
- Text::Unidecode
- URI
- URI::Escape
@ -88,7 +88,6 @@ SAML2
- `Lasso <http://lasso.entrouvert.org/>`__
- GLib
- XML::Simple
Second factor
~~~~~~~~~~~~~
@ -135,11 +134,11 @@ SMTP & Reset password/certificate by mail
Unit tests
~~~~~~~~~~
- Authen::U2F::Tester
- Crypt::U2F::Server
- Test::MockObject
- Test::Output
- Test::POD
- Test::MockObject
- Crypt::U2F::Server
- Authen::U2F::Tester
- Test::Output
- Time::Fake
- YAML
@ -169,7 +168,7 @@ Perl dependencies:
::
apt install libapache-session-perl libcache-cache-perl libclone-perl libconfig-inifiles-perl libconvert-pem-perl libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcrypt-openssl-x509-perl libcrypt-rijndael-perl libdbi-perl libdigest-hmac-perl libemail-sender-perl libgd-securityimage-perl libhtml-template-perl libio-string-perl libjson-perl libmime-tools-perl libmouse-perl libnet-ldap-perl libplack-perl libregexp-assemble-perl libregexp-common-perl libsoap-lite-perl libstring-random-perl libunicode-string-perl liburi-perl libwww-perl libxml-simple-perl libxml-libxslt-perl libcrypt-urandom-perl libtext-unidecode-perl libcookie-baker-xs-perl
apt install libapache-session-perl libcache-cache-perl libclone-perl libconfig-inifiles-perl libconvert-pem-perl libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcrypt-openssl-x509-perl libcrypt-rijndael-perl libdbi-perl libdigest-hmac-perl libemail-sender-perl libgd-securityimage-perl libhtml-template-perl libio-string-perl libjson-perl libmime-tools-perl libmouse-perl libnet-ldap-perl libplack-perl libregexp-assemble-perl libregexp-common-perl libsoap-lite-perl libstring-random-perl libunicode-string-perl liburi-perl libwww-perl libxml-libxslt-perl libcrypt-urandom-perl libtext-unidecode-perl libcookie-baker-xs-perl
For Apache:
@ -199,7 +198,7 @@ Perl dependencies:
::
yum install perl-Apache-Session perl-Cache-Cache perl-Clone perl-Config-IniFiles perl-Convert-PEM perl-Crypt-OpenSSL-RSA perl-Crypt-OpenSSL-X509 perl-Crypt-Rijndael perl-Digest-HMAC perl-Digest-SHA perl-GD-SecurityImage perl-HTML-Template perl-IO-String perl-JSON perl-LDAP perl-Mouse perl-Plack perl-Regexp-Assemble perl-Regexp-Common perl-SOAP-Lite perl-String-Random perl-Unicode-String perl-version perl-XML-Simple perl-Crypt-URandom perl-Email-Sender
yum install perl-Apache-Session perl-Cache-Cache perl-Clone perl-Config-IniFiles perl-Convert-PEM perl-Crypt-OpenSSL-RSA perl-Crypt-OpenSSL-X509 perl-Crypt-Rijndael perl-Digest-HMAC perl-Digest-SHA perl-GD-SecurityImage perl-HTML-Template perl-IO-String perl-JSON perl-LDAP perl-Mouse perl-Plack perl-Regexp-Assemble perl-Regexp-Common perl-SOAP-Lite perl-String-Random perl-Unicode-String perl-version perl-Crypt-URandom perl-Email-Sender
For Apache:

View File

@ -5,8 +5,6 @@ This plugin appends an endpoint to refresh sessions by user. It provides
``https://portal/refreshsession`` endpoint. Protect it by webserver
configuration.
This plugin is available with LLNG ≥ 2.0.7.
Usage
-----

View File

@ -1,4 +1,4 @@
Documentation for LemonLDAP::NG 2.0
Documentation for LemonLDAP::NG 3.0
===================================
.. image:: logos/logo_llng_600px.png

View File

@ -1,2 +1,4 @@
.. include:: upgrade_2_1_x.rst
.. include:: upgrade_2_1.rst
.. include:: upgrade_2_0_x.rst
.. include:: upgrade_2_0.rst

View File

@ -0,0 +1,9 @@
Upgrade from 2.0 to 2.1
=======================
SOAP deprecation
----------------
LLNG 2.1.x will be the last major version supporting SOAP services.
Please start migration to :doc:`REST services<restservices>` *(available
since 2.0.0)*.

View File

@ -0,0 +1,10 @@
Upgrade from 2.1.x to 2.1.y
===========================
Update from one minor version to another does not require any particular
action. Please apply general caution as you would with any software:
have backups and a rollback plan ready!
Do not forget to read the release notes of the version you are about to
install for any specific instructions.

View File

@ -132,12 +132,11 @@ There are three ways to impose users a higher authentication level:
- writing a rule based on authentication level:
``$authenticationLevel > 3``
- since 2.0, set a minimum level in virtual host options (default value
for ALL access rules)
- since 2.0.7, a minimum authentication level can be set for each URI
access rule. Useful if URI are protected by different types of
handler (AuthBasic -> level 2, Main -> level set by authentication
backend).
- set a minimum level in virtual host options (default value for ALL
access rules)
- a minimum authentication level can be set for each URI access rule.
Useful if URI are protected by different types of handler (AuthBasic
-> level 2, Main -> level set by authentication backend).
.. tip::
@ -146,6 +145,24 @@ There are three ways to impose users a higher authentication level:
to a form that explain that a higher level is required and propose to
reauthenticate himself.
Using regexp capture in rules
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If URL regexp captures something *(using parenthesis)*, you can use them
in the corresponding rule using ``$_rulematch[1]``. Example: only user
can access to its personal area:
- Regexp: ``/^public_html/(\w+)(/.*)?$``
- Rule: ``$uid eq $_rulematch[1]``
$_rulematch is an array that contains all captured strings. First index
is 1.
.. warning::
This feature requires Perl ≥ 5.25.7
.. _headers:
Headers
@ -209,8 +226,8 @@ headers:
Wildcards in hostnames
----------------------
|image1| Since 2.0, a wildcard can be used in virtualhost name (not in
aliases !): ``*.example.com`` matches all hostnames that belong to
Since 2.0, a wildcard can be used in virtualhost name (not in aliases
!): ``*.example.com`` matches all hostnames that belong to
``example.com`` domain. Version 2.0.9 improves this and allows better
wildcards such as ``test-*.example.com`` or ``test-%.example.com``. The
``%`` wilcard doesn't match subdomains.

View File

@ -100,7 +100,7 @@
"cfgDate": 1428138808,
"cfgLog": "Default configuration provided by LemonLDAP::NG team",
"cfgNum": "1",
"cfgVersion": "2.0.0",
"cfgVersion": "2.1.0",
"cookieName": "lemonldap",
"customFunctions": "My::hello My::get_additional_arg",
"demoExportedVars": {

View File

@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "llng-fastcgi-server 8"
.TH llng-fastcgi-server 8 "2021-08-10" "perl v5.32.1" "User Contributed Perl Documentation"
.TH llng-fastcgi-server 8 "2021-08-01" "perl v5.32.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -7,7 +7,7 @@ use POSIX;
use Getopt::Long;
use Lemonldap::NG::Handler::Main::Reload;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
our (
$foreground, $engine, $nproc, $pidFile,

View File

@ -37,6 +37,7 @@ lib/Lemonldap/NG/Common/Conf/Wrapper.pm
lib/Lemonldap/NG/Common/Crypto.pm
lib/Lemonldap/NG/Common/EmailTransport.pm
lib/Lemonldap/NG/Common/FormEncode.pm
lib/Lemonldap/NG/Common/IO/Filter.pm
lib/Lemonldap/NG/Common/IPv6.pm
lib/Lemonldap/NG/Common/JWT.pm
lib/Lemonldap/NG/Common/Logger/_Duplicate.pm
@ -91,8 +92,11 @@ t/35-Common-Crypto.t
t/36-Common-Regexp.t
t/40-Common-Session.t
t/50-Combination-Parser.t
t/60-Common-IO-Filter.t
t/60-Session-Cli.t
t/99-pod.t
t/inc.tpl
t/test.tpl
tools/apache-session-mysql.sql
tools/lmConfig.CDBI.mysql
tools/lmConfig.RDBI.mysql

View File

@ -4,7 +4,7 @@
"Xavier Guimard <x.guimard@free.fr>, Clément Oudot <clement@oodo.net>"
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010",
"generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010",
"license" : [
"open_source"
],
@ -78,6 +78,6 @@
],
"x_MailingList" : "mailto:lemonldap-ng-dev@ow2.org"
},
"version" : "v2.0.13",
"version" : "v2.1.0",
"x_serialization_backend" : "JSON::PP version 4.04"
}

View File

@ -10,7 +10,7 @@ build_requires:
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010'
generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010'
license: open_source
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@ -54,5 +54,5 @@ resources:
bugtracker: https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues
homepage: http://lemonldap-ng.org/
license: http://opensource.org/licenses/GPL-2.0
version: v2.0.13
version: v2.1.0
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

View File

@ -1,6 +1,6 @@
package Lemonldap::NG::Common;
our $VERSION = '2.0.13';
our $VERSION = '2.1.0';
1;
__END__

View File

@ -15,7 +15,7 @@ use Lemonldap::NG::Common::Apache::Session::Serialize::JSON;
use Lemonldap::NG::Common::Apache::Session::Store;
use Lemonldap::NG::Common::Apache::Session::Lock;
our $VERSION = '2.0.6';
our $VERSION = '2.1.0';
sub _load {
my ( $backend, $func ) = @_;

View File

@ -11,7 +11,7 @@ package Lemonldap::NG::Common::Apache::Session::Generate::SHA256;
use strict;
use Crypt::URandom;
our $VERSION = '2.0.2';
our $VERSION = '2.1.0';
sub generate {
my $session = shift;
@ -21,17 +21,8 @@ sub generate {
$length = $session->{args}->{IDLength};
}
eval {
$session->{data}->{_session_id} =
unpack( 'H*', Crypt::URandom::urandom( int( $length / 2 ) ) );
};
if ($@) {
print STDERR "Crypt::URandom::urandom failed: $@\n";
require Digest::SHA;
$session->{data}->{_session_id} =
substr( Digest::SHA::sha256_hex( time() . {} . rand() . $$ ),
0, $length );
}
$session->{data}->{_session_id} =
unpack( 'H*', Crypt::URandom::urandom( int( $length / 2 ) ) );
}
sub validate {

View File

@ -3,7 +3,7 @@ package Lemonldap::NG::Common::Apache::Session::Lock;
use strict;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
sub new {
my $class = shift;

View File

@ -5,7 +5,7 @@ use Lemonldap::NG::Common::UserAgent;
use Lemonldap::NG::Common::Apache::Session::Generate::SHA256;
use JSON qw(from_json to_json);
our $VERSION = '2.0.5';
our $VERSION = '2.1.0';
our @ISA = qw(Lemonldap::NG::Common::Apache::Session::Generate::SHA256);

View File

@ -8,7 +8,7 @@ package Lemonldap::NG::Common::Apache::Session::SOAP;
use strict;
use SOAP::Lite;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
#parameter proxy Url of SOAP service
#parameter proxyOptions SOAP::Lite options

View File

@ -3,7 +3,7 @@ package Lemonldap::NG::Common::Apache::Session::Serialize::JSON;
use strict;
use JSON qw(to_json from_json);
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
sub serialize {
my $session = shift;

View File

@ -3,7 +3,7 @@ package Lemonldap::NG::Common::Apache::Session::Store;
use strict;
our $VERSION = '2.0.10';
our $VERSION = '2.1.0';
sub new {
my $class = shift;

View File

@ -5,10 +5,10 @@ use Mouse;
use Lemonldap::NG::Common::Conf;
use Lemonldap::NG::Common::EmailTransport;
our $VERSION = '2.0.8';
extends 'Lemonldap::NG::Common::PSGI::Cli::Lib';
our $VERSION = '2.1.0';
has confAccess => (
is => 'rw',
builder => sub {

View File

@ -9,7 +9,7 @@ use Lemonldap::NG::Common::Apache::Session;
use Lemonldap::NG::Common::Session;
use Lemonldap::NG::Common::Util qw/getPSessionID genId2F/;
our $VERSION = '2.0.9';
our $VERSION = '2.1.0';
has opts => ( is => 'rw' );

View File

@ -5,7 +5,7 @@ use Mouse;
use Safe;
use constant PE_OK => 0;
our $VERSION = '2.0.6';
our $VERSION = '2.1.0';
# Handle "if then else" (used during init)
# return a sub that can be called with ($req) to get a [array] of combination

View File

@ -27,7 +27,7 @@ use Config::IniFiles;
#inherits Lemonldap::NG::Common::Conf::Backends::SOAP
#inherits Lemonldap::NG::Common::Conf::Backends::LDAP
our $VERSION = '2.0.14';
our $VERSION = '2.1.0';
our $msg = '';
our $iniObj;

View File

@ -11,7 +11,7 @@ has 'configStorage' => ( is => 'rw', isa => 'HashRef', default => sub { {} } );
has 'currentConf' => ( is => 'rw', required => 1, default => sub { {} } );
has 'protection' => ( is => 'rw', isa => 'Str', default => 'manager' );
our $VERSION = '2.0.11';
our $VERSION = '2.1.0';
## @method Lemonldap::NG::Common::Conf confAcc()
# Configuration access object

View File

@ -5,7 +5,7 @@ use utf8;
use JSON;
use Lemonldap::NG::Common::Conf::Backends::_DBI;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
our @ISA = qw(Lemonldap::NG::Common::Conf::Backends::_DBI);
sub store {

View File

@ -5,7 +5,7 @@ use utf8;
use Lemonldap::NG::Common::Conf::Serializer;
use Lemonldap::NG::Common::Conf::Backends::_DBI;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
our @ISA = qw(Lemonldap::NG::Common::Conf::Backends::_DBI);
sub store {

View File

@ -5,7 +5,7 @@ use Lemonldap::NG::Common::Conf::Constants; #inherits
use JSON;
use Encode;
our $VERSION = '2.0.9';
our $VERSION = '2.1.0';
our $initDone;
sub Lemonldap::NG::Common::Conf::_lock {

View File

@ -5,7 +5,7 @@ package Lemonldap::NG::Common::Conf::Backends::JSONFile;
use Lemonldap::NG::Common::Conf::Backends::File;
our @ISA = qw(Lemonldap::NG::Common::Conf::Backends::File);
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
1;

View File

@ -11,7 +11,7 @@ use Net::LDAP;
use Lemonldap::NG::Common::Conf::Constants; #inherits
use Lemonldap::NG::Common::Conf::Serializer;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
BEGIN {
*Lemonldap::NG::Common::Conf::ldap = \&ldap;

View File

@ -3,7 +3,7 @@ package Lemonldap::NG::Common::Conf::Backends::Local;
use strict;
use Lemonldap::NG::Common::Conf::Constants;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
sub prereq {
return 1;

View File

@ -5,7 +5,7 @@ use utf8;
use strict;
use Lemonldap::NG::Common::Conf::Serializer;
our $VERSION = '2.0.1';
our $VERSION = '2.1.0';
our $initDone;
sub prereq {

View File

@ -5,7 +5,7 @@ use utf8;
use Lemonldap::NG::Common::Conf::Serializer;
use Lemonldap::NG::Common::Conf::Backends::_DBI;
our $VERSION = '2.0.12';
our $VERSION = '2.1.0';
our @ISA = qw(Lemonldap::NG::Common::Conf::Backends::_DBI);
sub store {

View File

@ -4,7 +4,7 @@ use strict;
use Lemonldap::NG::Common::UserAgent;
use JSON qw(from_json to_json);
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
#parameter baseUrl, user, password, realm, lwpOpts

View File

@ -5,7 +5,7 @@ use utf8;
use SOAP::Lite;
use Lemonldap::NG::Common::Conf::Constants;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
#parameter proxy Url of SOAP service
#parameter proxyOptions SOAP::Lite parameters

View File

@ -5,7 +5,7 @@ use Lemonldap::NG::Common::Conf::Constants; #inherits
use YAML qw();
use Encode;
our $VERSION = '2.0.9';
our $VERSION = '2.1.0';
our $initDone;
$YAML::Numify = 1;

View File

@ -5,7 +5,7 @@ use utf8;
use DBI;
use Lemonldap::NG::Common::Conf::Constants; #inherits
our $VERSION = '2.0.12';
our $VERSION = '2.1.0';
our @ISA = qw(Lemonldap::NG::Common::Conf::Constants);
our ( @EXPORT, %EXPORT_TAGS );

View File

@ -4,7 +4,7 @@ use strict;
use Mouse;
use Lemonldap::NG::Common::Conf::ReConstants;
our $VERSION = '2.0.8';
our $VERSION = '2.1.0';
sub compactConf {
my ( $self, $conf ) = @_;

View File

@ -5,7 +5,7 @@ use strict;
use Exporter 'import';
use base qw(Exporter);
our $VERSION = '2.0.14';
our $VERSION = '2.1.0';
# CONSTANTS

View File

@ -1,7 +1,7 @@
# This file is generated by Lemonldap::NG::Manager::Build. Don't modify it by hand
package Lemonldap::NG::Common::Conf::DefaultValues;
our $VERSION = '2.0.14';
our $VERSION = '2.1.0';
sub defaultValues {
return {
@ -18,18 +18,18 @@ sub defaultValues {
'authChoiceParam' => 'lmAuth',
'authentication' => 'Demo',
'available2F' => 'UTOTP,TOTP,U2F,REST,Mail2F,Ext2F,Yubikey,Radius',
'available2FSelfRegistration' => 'TOTP,U2F,Yubikey',
'bruteForceProtectionLockTimes' => '15, 30, 60, 300, 600',
'bruteForceProtectionMaxAge' => 300,
'bruteForceProtectionMaxFailed' => 3,
'bruteForceProtectionMaxLockTime' => 900,
'bruteForceProtectionTempo' => 30,
'captcha_mail_enabled' => 1,
'captcha_register_enabled' => 1,
'captcha_size' => 6,
'casAccessControlPolicy' => 'none',
'casAuthnLevel' => 1,
'certificateResetByMailCeaAttribute' => 'description',
'available2FSelfRegistration' => 'TOTP,U2F,Yubikey',
'bruteForceProtectionLockTimes' => '15, 30, 60, 300, 600',
'bruteForceProtectionMaxAge' => 300,
'bruteForceProtectionMaxFailed' => 3,
'bruteForceProtectionMaxLockTime' => 900,
'bruteForceProtectionTempo' => 30,
'captcha_mail_enabled' => 1,
'captcha_register_enabled' => 1,
'captcha_size' => 6,
'casAccessControlPolicy' => 'none',
'casAuthnLevel' => 1,
'certificateResetByMailCeaAttribute' => 'description',
'certificateResetByMailCertificateAttribute' =>
'userCertificate;binary',
'certificateResetByMailURL' =>
@ -90,6 +90,7 @@ sub defaultValues {
'facebookExportedVars' => {},
'facebookUserField' => 'id',
'failedLoginNumber' => 5,
'favAppsMaxNumber' => 3,
'findUserControl' => '^[*\\w]+$',
'findUserWildcard' => '*',
'formTimeout' => 120,
@ -100,7 +101,7 @@ sub defaultValues {
'globalLogoutTimer' => 1,
'globalStorage' => 'Apache::Session::File',
'globalStorageOptions' => {
'Directory' => '/var/lib/lemonldap-ng/sessions/',
'Directory' => '/var/lib/lemonldap-ng/sessions/',
'generateModule' =>
'Lemonldap::NG::Common::Apache::Session::Generate::SHA256',
'LockDirectory' => '/var/lib/lemonldap-ng/sessions/lock/'
@ -173,20 +174,20 @@ sub defaultValues {
'locationRules' => {
'default' => 'deny'
},
'logoutServices' => {},
'macros' => {},
'mail2fActivation' => 0,
'mail2fCodeRegex' => '\\d{6}',
'mailCharset' => 'utf-8',
'mailFrom' => 'noreply@example.com',
'mailSessionKey' => 'mail',
'mailTimeout' => 0,
'mailUrl' => 'http://auth.example.com/resetpwd',
'managerDn' => '',
'managerPassword' => '',
'max2FDevices' => 10,
'max2FDevicesNameLength' => 20,
'multiValuesSeparator' => '; ',
'logoutServices' => {},
'macros' => {},
'mail2fActivation' => 0,
'mail2fCodeRegex' => '\\d{6}',
'mailCharset' => 'utf-8',
'mailFrom' => 'noreply@example.com',
'mailSessionKey' => 'mail',
'mailTimeout' => 0,
'mailUrl' => 'http://auth.example.com/resetpwd',
'managerDn' => '',
'managerPassword' => '',
'max2FDevices' => 10,
'max2FDevicesNameLength' => 20,
'multiValuesSeparator' => '; ',
'mySessionAuthorizedRWKeys' =>
[ '_appsListOrder', '_oidcConnectedRP', '_oidcConsents' ],
'newLocationWarningLocationAttribute' => 'ipAddr',
@ -194,7 +195,7 @@ sub defaultValues {
'newLocationWarningMaxValues' => '0',
'notificationDefaultCond' => '',
'notificationServerPOST' => 1,
'notificationServerSentAttributes' =>
'notificationServerSentAttributes' =>
'uid reference date title subtitle text check',
'notificationsMaxRetrieve' => 3,
'notificationStorage' => 'File',
@ -248,7 +249,7 @@ sub defaultValues {
'passwordPolicyMinUpper' => 0,
'passwordPolicySpecialChar' => '__ALL__',
'passwordResetAllowedRetries' => 3,
'persistentSessionAttributes' =>
'persistentSessionAttributes' =>
'_loginHistory _2fDevices notification_',
'port' => -1,
'portal' => 'http://auth.example.com/',
@ -256,10 +257,11 @@ sub defaultValues {
'portalCheckLogins' => 1,
'portalDisplayAppslist' => 1,
'portalDisplayChangePassword' => '$_auth =~ /^(LDAP|DBI|Demo)$/',
'portalDisplayFavApps' => 1,
'portalDisplayGeneratePassword' => 1,
'portalDisplayLoginHistory' => 1,
'portalDisplayLogout' => 1,
'portalDisplayOidcConsents' =>
'portalDisplayOidcConsents' =>
'$_oidcConsents && $_oidcConsents =~ /\\w+/',
'portalDisplayRefreshMyRights' => 1,
'portalDisplayRegister' => 1,
@ -287,11 +289,11 @@ sub defaultValues {
'http://auth.example.com/Lemonldap/NG/Common/PSGI/SOAPService',
'proxy' => 'http://auth.example.com/sessions'
},
'requireToken' => 1,
'rest2fActivation' => 0,
'restAuthnLevel' => 2,
'restClockTolerance' => 15,
'sameSite' => '',
'requireToken' => 1,
'rest2fActivation' => 0,
'restAuthnLevel' => 2,
'restClockTolerance' => 15,
'sameSite' => '',
'samlAttributeAuthorityDescriptorAttributeServiceSOAP' =>
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/AA/SOAP;',
'samlAuthnContextMapKerberos' => 4,
@ -331,7 +333,7 @@ sub defaultValues {
'0;1;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact;#PORTAL#/saml/proxySingleSignOnArtifact',
'samlSPSSODescriptorAssertionConsumerServiceHTTPPost' =>
'1;0;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/proxySingleSignOnPost',
'samlSPSSODescriptorAuthnRequestsSigned' => 1,
'samlSPSSODescriptorAuthnRequestsSigned' => 1,
'samlSPSSODescriptorSingleLogoutServiceHTTPPost' =>
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/proxySingleLogout;#PORTAL#/saml/proxySingleLogoutReturn',
'samlSPSSODescriptorSingleLogoutServiceHTTPRedirect' =>
@ -343,7 +345,7 @@ sub defaultValues {
'sfEngine' => '::2F::Engines::Default',
'sfManagerRule' => 1,
'sfRemovedMsgRule' => 0,
'sfRemovedNotifMsg' =>
'sfRemovedNotifMsg' =>
'_removedSF_ expired second factor(s) has/have been removed (_nameSF_)!',
'sfRemovedNotifRef' => 'RemoveSF',
'sfRemovedNotifTitle' => 'Second factor notification',

View File

@ -6,7 +6,7 @@ use Mouse;
use Lemonldap::NG::Common::Conf::Constants;
use Lemonldap::NG::Common::Conf::ReConstants;
our $VERSION = '2.0.12';
our $VERSION = '2.1.0';
extends 'Lemonldap::NG::Common::Conf::AccessLib';

View File

@ -5,7 +5,7 @@ use strict;
use Exporter 'import';
use base qw(Exporter);
our $VERSION = '2.0.14';
our $VERSION = '2.1.0';
our %EXPORT_TAGS = ( 'all' => [qw($simpleHashKeys $doubleHashKeys $specialNodeKeys $casAppMetaDataNodeKeys $casSrvMetaDataNodeKeys $oidcOPMetaDataNodeKeys $oidcRPMetaDataNodeKeys $samlIDPMetaDataNodeKeys $samlSPMetaDataNodeKeys $virtualHostKeys $specialNodeHash $authParameters $issuerParameters $samlServiceParameters $oidcServiceParameters $casServiceParameters)] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
@ -37,7 +37,7 @@ our $authParameters = {
apacheParams => [qw(apacheAuthnLevel)],
casParams => [qw(casAuthnLevel)],
choiceParams => [qw(authChoiceParam authChoiceModules authChoiceAuthBasic authChoiceFindUser)],
combinationParams => [qw(combination combModules)],
combinationParams => [qw(combination combModules combinationForms)],
customParams => [qw(customAuth customUserDB customPassword customRegister customResetCertByMail customAddParams)],
dbiParams => [qw(dbiAuthnLevel dbiExportedVars dbiAuthChain dbiAuthUser dbiAuthPassword dbiUserChain dbiUserUser dbiUserPassword dbiAuthTable dbiUserTable dbiAuthLoginCol dbiAuthPasswordCol dbiPasswordMailCol userPivot dbiAuthPasswordHash dbiDynamicHashEnabled dbiDynamicHashValidSchemes dbiDynamicHashValidSaltedSchemes dbiDynamicHashNewPasswordScheme)],
demoParams => [qw(demoExportedVars)],
@ -45,7 +45,7 @@ our $authParameters = {
githubParams => [qw(githubAuthnLevel githubClientID githubClientSecret githubUserField githubScope)],
gpgParams => [qw(gpgAuthnLevel gpgDb)],
kerberosParams => [qw(krbAuthnLevel krbKeytab krbByJs krbRemoveDomain krbAllowedDomains)],
ldapParams => [qw(ldapAuthnLevel ldapExportedVars ldapServer ldapPort ldapVerify ldapBase managerDn managerPassword ldapTimeout ldapIOTimeout ldapVersion ldapRaw ldapCAFile ldapCAPath LDAPFilter AuthLDAPFilter mailLDAPFilter ldapSearchDeref ldapGroupBase ldapGroupObjectClass ldapGroupAttributeName ldapGroupAttributeNameUser ldapGroupAttributeNameSearch ldapGroupDecodeSearchedValue ldapGroupRecursive ldapGroupAttributeNameGroup ldapPpolicyControl ldapSetPassword ldapChangePasswordAsUser ldapPwdEnc ldapUsePasswordResetAttribute ldapPasswordResetAttribute ldapPasswordResetAttributeValue ldapAllowResetExpiredPassword ldapGetUserBeforePasswordChange ldapITDS)],
ldapParams => [qw(ldapAuthnLevel ldapExportedVars ldapServer ldapPort ldapVerify ldapBase managerDn managerPassword ldapTimeout ldapIOTimeout ldapVersion ldapRaw ldapCAFile ldapCAPath AuthLDAPFilter mailLDAPFilter ldapSearchDeref ldapGroupBase ldapGroupObjectClass ldapGroupAttributeName ldapGroupAttributeNameUser ldapGroupAttributeNameSearch ldapGroupDecodeSearchedValue ldapGroupRecursive ldapGroupAttributeNameGroup ldapPpolicyControl ldapSetPassword ldapChangePasswordAsUser ldapPwdEnc ldapUsePasswordResetAttribute ldapPasswordResetAttribute ldapPasswordResetAttributeValue ldapAllowResetExpiredPassword ldapGetUserBeforePasswordChange ldapITDS)],
linkedinParams => [qw(linkedInAuthnLevel linkedInClientID linkedInClientSecret linkedInFields linkedInUserField linkedInScope)],
nullParams => [qw(nullAuthnLevel)],
oidcParams => [qw(oidcAuthnLevel oidcRPCallbackGetParam oidcRPStateTimeout)],
@ -69,6 +69,6 @@ our $issuerParameters = {
issuerOptions => [qw(issuersTimeout)],
};
our $samlServiceParameters = [qw(samlEntityID samlServicePrivateKeySig samlServicePrivateKeySigPwd samlServicePublicKeySig samlServicePrivateKeyEnc samlServicePrivateKeyEncPwd samlServicePublicKeyEnc samlServiceUseCertificateInResponse samlServiceSignatureMethod samlNameIDFormatMapEmail samlNameIDFormatMapX509 samlNameIDFormatMapWindows samlNameIDFormatMapKerberos samlAuthnContextMapPassword samlAuthnContextMapPasswordProtectedTransport samlAuthnContextMapTLSClient samlAuthnContextMapKerberos samlOrganizationDisplayName samlOrganizationName samlOrganizationURL samlSPSSODescriptorAuthnRequestsSigned samlSPSSODescriptorWantAssertionsSigned samlSPSSODescriptorSingleLogoutServiceHTTPRedirect samlSPSSODescriptorSingleLogoutServiceHTTPPost samlSPSSODescriptorSingleLogoutServiceSOAP samlSPSSODescriptorAssertionConsumerServiceHTTPArtifact samlSPSSODescriptorAssertionConsumerServiceHTTPPost samlSPSSODescriptorArtifactResolutionServiceArtifact samlIDPSSODescriptorWantAuthnRequestsSigned samlIDPSSODescriptorSingleSignOnServiceHTTPRedirect samlIDPSSODescriptorSingleSignOnServiceHTTPPost samlIDPSSODescriptorSingleSignOnServiceHTTPArtifact samlIDPSSODescriptorSingleLogoutServiceHTTPRedirect samlIDPSSODescriptorSingleLogoutServiceHTTPPost samlIDPSSODescriptorSingleLogoutServiceSOAP samlIDPSSODescriptorArtifactResolutionServiceArtifact samlAttributeAuthorityDescriptorAttributeServiceSOAP samlMetadataForceUTF8 samlRelayStateTimeout samlUseQueryStringSpecific samlOverrideIDPEntityID samlStorage samlStorageOptions samlCommonDomainCookieActivation samlCommonDomainCookieDomain samlCommonDomainCookieReader samlCommonDomainCookieWriter samlDiscoveryProtocolActivation samlDiscoveryProtocolURL samlDiscoveryProtocolPolicy samlDiscoveryProtocolIsPassive)];
our $oidcServiceParameters = [qw(oidcServiceMetaDataIssuer oidcServiceMetaDataAuthorizeURI oidcServiceMetaDataTokenURI oidcServiceMetaDataUserInfoURI oidcServiceMetaDataJWKSURI oidcServiceMetaDataRegistrationURI oidcServiceMetaDataIntrospectionURI oidcServiceMetaDataEndSessionURI oidcServiceMetaDataCheckSessionURI oidcServiceMetaDataFrontChannelURI oidcServiceMetaDataBackChannelURI oidcServiceMetaDataAuthnContext oidcServicePrivateKeySig oidcServicePublicKeySig oidcServiceKeyIdSig oidcServiceAllowDynamicRegistration oidcServiceAllowOnlyDeclaredScopes oidcServiceAllowAuthorizationCodeFlow oidcServiceAllowImplicitFlow oidcServiceAllowHybridFlow oidcServiceAuthorizationCodeExpiration oidcServiceAccessTokenExpiration oidcServiceIDTokenExpiration oidcServiceOfflineSessionExpiration oidcStorage oidcStorageOptions oidcServiceDynamicRegistrationExportedVars oidcServiceDynamicRegistrationExtraClaims)];
our $oidcServiceParameters = [qw(oidcServiceMetaDataAuthorizeURI oidcServiceMetaDataTokenURI oidcServiceMetaDataUserInfoURI oidcServiceMetaDataJWKSURI oidcServiceMetaDataRegistrationURI oidcServiceMetaDataIntrospectionURI oidcServiceMetaDataEndSessionURI oidcServiceMetaDataCheckSessionURI oidcServiceMetaDataFrontChannelURI oidcServiceMetaDataBackChannelURI oidcServiceMetaDataAuthnContext oidcServicePrivateKeySig oidcServicePublicKeySig oidcServiceKeyIdSig oidcServiceAllowDynamicRegistration oidcServiceAllowOnlyDeclaredScopes oidcServiceAllowAuthorizationCodeFlow oidcServiceAllowImplicitFlow oidcServiceAllowHybridFlow oidcServiceAuthorizationCodeExpiration oidcServiceAccessTokenExpiration oidcServiceIDTokenExpiration oidcServiceOfflineSessionExpiration oidcStorage oidcStorageOptions oidcServiceDynamicRegistrationExportedVars oidcServiceDynamicRegistrationExtraClaims)];
1;

View File

@ -14,7 +14,7 @@ use MIME::Base64;
use Safe;
use Encode;
our $VERSION = '2.0.9';
our $VERSION = '2.1.0';
my $dataStart = tell(DATA);

View File

@ -6,7 +6,7 @@ use Encode;
use JSON;
use Lemonldap::NG::Common::Conf::Constants;
our $VERSION = '2.0.12';
our $VERSION = '2.1.0';
BEGIN {
*Lemonldap::NG::Common::Conf::normalize = \&normalize;

View File

@ -3,7 +3,7 @@ package Lemonldap::NG::Common::Conf::Wrapper;
use strict;
use JSON;
our $VERSION = '2.0.3';
our $VERSION = '2.1.0';
sub TIEHASH {
my ( $class, $conf, $overrides ) = @_;

View File

@ -12,32 +12,22 @@ use strict;
use Crypt::Rijndael;
use MIME::Base64;
use Digest::SHA;
use Crypt::URandom;
use bytes;
our $VERSION = '2.0.0';
my ( $newIv, $randG, $hash );
$hash = \&Digest::SHA::sha256;
our $VERSION = '2.1.0';
my $hash = \&Digest::SHA::sha256;
use constant HMAC_LENGTH => 32;
use constant IV_LENGTH => 16;
# Build initialization vector subroutine
BEGIN {
eval { require Crypt::URandom; Crypt::URandom::urandom(IV_LENGTH) };
if ($@) {
$newIv = sub {
return bytes::substr( Digest::SHA::sha1( rand() . time . {} ),
0, IV_LENGTH );
};
$randG = sub { return int( rand( $_[0] ) ) };
}
else {
$newIv = sub { return Crypt::URandom::urandom(IV_LENGTH) };
$randG = sub {
return
int( unpack( "C", Crypt::URandom::urandom(1) ) * $_[0] / 256 );
};
}
sub newIv {
return Crypt::URandom::urandom(IV_LENGTH);
}
sub randG {
my ($max) = @_;
return int( unpack( "C", Crypt::URandom::urandom(1) ) * $max / 256 );
}
our $msg;
@ -65,7 +55,7 @@ sub new {
# @param key that secondary key
# @return Crypt::Rijndael object
sub _getCipher {
my ( $self, $key ) = @_;
my ( $self, $key, $iv ) = @_;
$key ||= "";
$self->{ciphers}->{$key} ||=
Crypt::Rijndael->new( $hash->( $self->{key}, $key ), $self->{mode} );
@ -87,7 +77,7 @@ sub encrypt {
my $iv =
$low
? bytes::substr( Digest::SHA::sha1( rand() . time . {} ), 0, IV_LENGTH )
: $newIv->();
: newIv();
my $hmac = $hash->($data);
eval {
$data =
@ -190,7 +180,7 @@ sub _cryptHex {
}
my $iv;
if ( $sub eq 'encrypt' ) {
$iv = $newIv->();
$iv = newIv();
}
$data = pack "H*", $data;
if ( $sub eq 'decrypt' ) {
@ -215,7 +205,7 @@ sub srandom {
if ($@) {
die 'Missing recommended dependency to String::Random';
}
return String::Random->new( rand_gen => $randG );
return String::Random->new( rand_gen => \&randG );
}
1;

View File

@ -6,7 +6,7 @@ use MIME::Entity;
use Email::Sender::Simple qw(sendmail);
use Email::Date::Format qw(email_date);
our $VERSION = '2.0.10';
our $VERSION = '2.1.0';
sub new {
my ( $class, $conf ) = @_;

View File

@ -4,7 +4,7 @@ use strict;
use Exporter;
our @ISA = qw(Exporter);
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
our @EXPORT_OK = qw(build_urlencoded);
our @EXPORT = qw(build_urlencoded);

View File

@ -0,0 +1,176 @@
# IO::Handle filter. Used to transform HTML::Template on the fly.
package Lemonldap::NG::Common::IO::Filter;
use strict;
use IO::File;
use Symbol;
#our @ISA = ('IO::File');
sub new {
my ( $class, $file, $opt ) = @_;
$opt->{_i} = ( ref $file ? $file : IO::File->new($file) )
or die("Unable to build IO::File object $!");
my $self = ref $class ? $class : bless gensym, $class;
tie( *$self, $class, $opt );
return $self;
}
sub TIEHANDLE {
my ( $class, $data ) = @_;
return bless( $data, $class );
}
sub READLINE {
my ($self) = shift;
my $res = $self->{_i}->getline;
foreach my $key ( keys %$self ) {
next if ( $key eq '_i' );
if ( ref( $self->{$key} ) eq 'CODE' ) {
$res =~ s/__LLNG_${key}__/$self->{$key}->()/gse;
}
elsif ( ref $self->{$key} eq 'ARRAY' ) {
next;
}
elsif ( ref $self->{$key} ) {
local $/ = undef;
$res =~ s/__LLNG_${key}__/$self->{$key}->getline/gse;
}
}
# Parse strings after code/IO
foreach my $key ( keys %$self ) {
die "Undefined value for __LLNG_${key}__ substitution"
unless $self->{$key};
my $v =
( ref $self->{$key} and ref $self->{$key} eq 'ARRAY' )
? $self->{$key}
: [ $self->{$key} ];
$v = join "\n",
map { ref $_ ? () : qq'<TMPL_INCLUDE NAME="$_.tpl">' } @$v;
$res =~ s/__LLNG_${key}__/$v/gs;
}
return $res;
}
sub DESTROY {
my ($self) = @_;
$self->close() if ( ref($self) eq 'SCALAR' );
}
sub AUTOLOAD {
no strict;
my $self = shift;
$AUTOLOAD =~ s/^.*:://;
$AUTOLOAD = lc $AUTOLOAD;
return tied( ${$self} )->{_i}->$AUTOLOAD(@_);
}
1;
__END__
=head1 NAME
Lemonldap::NG::Common::IO::Filter - IO::Handle filter
=head1 SYNOPSIS
use HTML::Template;
my $fh = Lemonldap::NG::Common::IO::Filter->new(
'template.tpl',
{
# Replace all __LLNG_AUTH__ by:
# <TMPL_INCLUDE NAME="login.tpl">
AUTH => 'login',
# Replace all __LLNG_CODE__ by the result of the given function
CODE => sub {return "INCLUDED STRING"}
}
);
my $h = HTML::Template->new( filehandle => $fh );
print $h->output;
Input:
<html><body>
__LLNG_AUTH__
<hr>
__LLNG_CODE__
</body></html>
Output:
<html><body>
<TMPL_INCLUDE NAME="login.tpl">
<hr>
INCLUDED STRING
</body></html>
Same but with a L<IO::Handle> file:
use HTML::Template;
my $file = IO::File->new('test.tpl');
my $fh = Lemonldap::NG::Common::IO::Filter->new_from_io(
$file,
{
# Replace all __LLNG_AUTH__ by:
# <TMPL_INCLUDE NAME="login.tpl">
AUTH => 'login',
# Replace all __LLNG_CODE__ by the result of the given function
CODE => sub {return "INCLUDED STRING"}
}
);
my $h = HTML::Template->new( filehandle => $fh );
print $h->output;
Or with an array:
use HTML::Template;
my $fh = Lemonldap::NG::Common::IO::Filter->new_from_io(
'template.tpl',
{
# Replace all __LLNG_AUTH__ by:
# <TMPL_INCLUDE NAME="login.tpl"> <TMPL_INCLUDE NAME="login2.tpl">
AUTH => [ 'login', 'login2' ],
}
);
my $h = HTML::Template->new( filehandle => $fh );
print $h->output;
=head1 DESCRIPTION
IO::Handle filter used to transform HTML::Template files on the fly.
=head1 AUTHORS
=over
=item LemonLDAP::NG team L<http://lemonldap-ng.org/team>
=back
=head1 BUG REPORT
Use OW2 system to report bug or ask for features:
L<https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
=head1 DOWNLOAD
Lemonldap::NG is available at
L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
=head1 COPYRIGHT AND LICENSE
See COPYING file for details.
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see L<http://www.gnu.org/licenses/>.
=cut

View File

@ -3,7 +3,7 @@ package Lemonldap::NG::Common::IPv6;
use strict;
use base 'Exporter';
our $VERSION = '2.0.10';
our $VERSION = '2.1.0';
our @EXPORT = qw(&isIPv6 &net6 &expand6);
sub isIPv6 {

View File

@ -2,7 +2,7 @@ package Lemonldap::NG::Common::Logger::Apache2;
use Apache2::ServerRec;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
sub new {
return bless {}, shift;

View File

@ -2,7 +2,7 @@ package Lemonldap::NG::Common::Logger::Dispatch;
use strict;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
sub new {
no warnings 'redefine';

View File

@ -3,7 +3,7 @@ package Lemonldap::NG::Common::Logger::Log4perl;
use strict;
use Log::Log4perl;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
our $init = 0;

View File

@ -1,6 +1,6 @@
package Lemonldap::NG::Common::Logger::Null;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
sub new {
return bless {}, shift;

View File

@ -10,7 +10,7 @@ package Lemonldap::NG::Common::Logger::Sentry;
use strict;
use Sentry::Raven;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
sub new {
my $self = bless {}, shift;

View File

@ -2,7 +2,7 @@ package Lemonldap::NG::Common::Logger::Std;
use strict;
our $VERSION = '2.0.5';
our $VERSION = '2.1.0';
sub new {
no warnings 'redefine';

View File

@ -3,7 +3,7 @@ package Lemonldap::NG::Common::Logger::Syslog;
use strict;
use Sys::Syslog qw(:standard);
our $VERSION = '2.0.9';
our $VERSION = '2.1.0';
sub new {
my ( $class, $conf, %args ) = @_;

View File

@ -2,7 +2,7 @@ package Lemonldap::NG::Common::Logger::_Duplicate;
use strict;
our $VERSION = '2.0.6';
our $VERSION = '2.1.0';
sub new {
my $self = bless {}, shift;

View File

@ -3,7 +3,7 @@ package Lemonldap::NG::Common::Module;
use strict;
use Mouse;
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
# Object that provides loggers and error methods (typically PSGI object)
has p => ( is => 'rw', weak_ref => 1 );

View File

@ -4,7 +4,7 @@ use strict;
use Mouse;
use JSON qw(to_json);
our $VERSION = '2.0.8';
our $VERSION = '2.1.0';
extends 'Lemonldap::NG::Common::Module';

View File

@ -11,7 +11,7 @@ use Time::Local;
use DBI;
use Encode;
our $VERSION = '2.0.8';
our $VERSION = '2.1.0';
extends 'Lemonldap::NG::Common::Notifications';

View File

@ -10,7 +10,7 @@ use Mouse;
use Time::Local;
use MIME::Base64;
our $VERSION = '2.0.8';
our $VERSION = '2.1.0';
extends 'Lemonldap::NG::Common::Notifications';

View File

@ -4,7 +4,7 @@ use strict;
use Mouse;
use JSON qw(from_json to_json);
our $VERSION = '2.0.8';
our $VERSION = '2.1.0';
sub newNotification {
my ( $self, $jsonString, $defaultCond ) = @_;

View File

@ -13,7 +13,7 @@ use MIME::Base64 qw/encode_base64url/;
use Net::LDAP;
use utf8;
our $VERSION = '2.0.8';
our $VERSION = '2.1.0';
extends 'Lemonldap::NG::Common::Notifications';

View File

@ -4,7 +4,7 @@ use strict;
use Mouse;
use XML::LibXML;
our $VERSION = '2.0.10';
our $VERSION = '2.1.0';
# XML parser
has parser => (

View File

@ -3,10 +3,11 @@ package Lemonldap::NG::Common::PSGI;
use strict;
use Mouse;
use JSON;
use Lemonldap::NG::Common::IO::Filter;
use Lemonldap::NG::Common::PSGI::Constants;
use Lemonldap::NG::Common::PSGI::Request;
our $VERSION = '2.0.10';
our $VERSION = '2.1.0';
our $_json = JSON->new->allow_nonref;
@ -276,14 +277,23 @@ sub sendHtml {
$args{code} ||= 200;
$args{headers} ||= [ $req->spliceHdrs ];
my $htpl;
$template = ( $args{templateDir} // $self->templateDir ) . "/$template.tpl";
return $self->sendError( $req, "Unable to read $template", 500 )
unless ( -r $template and -f $template );
eval {
unless ( ref $template ) {
$template =
( $args{templateDir} // $self->templateDir ) . "/$template.tpl";
return $self->sendError( $req, "Unable to read $template", 500 )
unless ( -r $template and -f $template );
$self->logger->debug("Starting HTML generation using $template");
}
eval {
require HTML::Template;
my $io =
$args{filter}
? Lemonldap::NG::Common::IO::Filter->new( $template, $args{filter} )
: ref $template ? $template
: IO::File->new($template);
$htpl = HTML::Template->new(
filehandle => IO::File->new($template),
filehandle => $io,
path => $self->templateDir,
search_path_on_include => 1,
die_on_bad_params => 0,
@ -305,6 +315,7 @@ sub sendHtml {
? %{ $args{params} }
: ()
),
%{ $req->{tplParams} },
);
};
if ($@) {

View File

@ -5,7 +5,7 @@ use JSON;
use Mouse;
use Lemonldap::NG::Common::PSGI;
our $VERSION = '2.0.10';
our $VERSION = '2.1.0';
has iniFile => ( is => 'ro', isa => 'Str' );

View File

@ -4,7 +4,7 @@ use strict;
use Exporter 'import';
use base qw(Exporter);
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
# CONSTANTS

View File

@ -6,7 +6,7 @@ use JSON;
use Plack::Request;
use URI::Escape;
our $VERSION = '2.0.10';
our $VERSION = '2.1.0';
our @ISA = ('Plack::Request');
@ -35,11 +35,14 @@ sub new {
$self->{data} = {};
$self->{error} = 0;
$self->{respHeaders} = [];
$self->{tplParams} = {};
return bless( $self, $_[0] );
}
sub data { $_[0]->{data} }
sub tplParams { $_[0]->{tplParams} }
sub uri { $_[0]->{uri} }
sub userData {

View File

@ -5,7 +5,7 @@ use Mouse;
use Lemonldap::NG::Common::PSGI;
use Lemonldap::NG::Common::PSGI::Constants;
our $VERSION = '2.0.10';
our $VERSION = '2.1.0';
extends 'Lemonldap::NG::Common::PSGI';

View File

@ -8,7 +8,7 @@ use SOAP::Transport::HTTP;
our @ISA = ('SOAP::Transport::HTTP::Server');
our $VERSION = '2.0.0';
our $VERSION = '2.1.0';
# Call SOAP::Trace::objects().
sub DESTROY { SOAP::Trace::objects('()') }

Some files were not shown because too many files have changed in this diff Show More