Commit Graph

176 Commits

Author SHA1 Message Date
Rubén D
b640b6d695 chore(refactor): LDAP auth refactoring.
- Decouple from ldap_* native functions
- Use Laminas/Ldap library
- Use enum for interface constants
- Move LDAP interfaces to domain
- Simplify LdapActions API

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2023-06-03 21:40:20 +02:00
Rubén D
dba0c4ceda chore(tests): Add SecureSessionService tests
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2023-05-21 17:09:09 +02:00
Rubén D
419a674fba chore(tests): Add more unitary tests
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2023-05-21 13:02:19 +02:00
Rubén D
c907bb9895 ci(php): Bump to PHP 8.1 version
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2023-05-20 22:46:42 +02:00
Rubén D
354a33cf17 chore: Create ApiService tests
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2023-05-20 22:01:41 +02:00
Rubén D
9abe75ea84 chore: Create ApiRequest tests
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2023-05-17 20:55:11 +02:00
Rubén D
cb1e5f9e93 chore: Create PublicLinkService tests.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2023-05-16 14:55:34 +02:00
Rubén D
a597d8ae62 chore: Create AccountService tests and rework models.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-12-10 12:07:38 +01:00
Rubén D
1e1ec16f73 chore: Remove BypassFinals and Pseudo PDO.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-12-04 14:33:17 +01:00
Rubén D
84cf2a59d7 chore: Update definitions
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-12-04 10:26:46 +01:00
Rubén D
78f51f3259 chore: Add tests for CryptPKI
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-12-04 00:06:43 +01:00
Rubén D
973bb8ebfd chore: Add tests for AccountCacheService
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-12-03 22:57:10 +01:00
Rubén D
7f986f17ef chore: Add tests for AccountSearchService
AccountSearchService has been split into multiple classes for better testeability.
Accounts' DTOs have been moved to domain

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-12-03 21:01:32 +01:00
Rubén D
930b1f7139 chore: Create AccountCryptService tests
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-11-27 16:01:51 +01:00
Rubén D
c939ef634a chore: Adapt to hexagonal architecture pattern.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-11-26 20:12:23 +01:00
Rubén D
5952a3f48a chore: Adapt to hexagonal architecture pattern.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-11-26 19:45:53 +01:00
Rubén D
07437ffda0 chore: Create AccountAdapter tests
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-11-26 13:04:38 +01:00
Rubén D
796ecbc5fb chore: Implement AccountAclService tests.
Use scoped namespace for simple functions.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-11-25 23:40:27 +01:00
Rubén D
295d6c6ca9 chore: Apply inspection fixes
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-11-19 11:24:35 +01:00
Rubén D
cd4369e74e Merge branch 'master' into feat/code_refactoring
# Conflicts:
#	app/modules/web/themes/material-blue/views/account/account.inc
#	app/modules/web/themes/material-blue/views/account/search-rows.inc
#	app/modules/web/themes/material-blue/views/config/ldap.inc
#	composer.json
#	composer.lock
#	lib/SP/Bootstrap.php
#	lib/SP/Core/Language.php
#	lib/SP/Html/Html.php
#	lib/SP/Infrastructure/Database/DatabaseUtil.php
#	lib/SP/Providers/Auth/Ldap/LdapActions.php
#	lib/SP/Services/Account/AccountSearchItem.php
#	lib/SP/Services/Install/Installer.php
2022-11-13 09:18:55 +01:00
Rubén D
8a2bbc8283 chore: Use Aura.SqlQuery for building queries.
Refactor AccountRepository and AccountSearchRepository to use Aura.SqlQuery. This will allow to mock queries when testing.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-11-05 09:58:57 +01:00
Rubén D
de06ff5b0f chore: Move account data models and unit test for account repository.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-07-02 18:01:56 +02:00
Rubén D
11a2509bbb chore: Setup definitions for adapters.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-06-26 13:10:32 +02:00
Rubén D
f56bfc22f4 chore: Bootstrap refactoring.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-06-26 12:30:22 +02:00
Rubén D
9e92093f0e chore: Skip login controller from session closing.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-06-20 00:24:36 +02:00
Rubén D
8bfff2170f chore: Avoid handlers and database initialization when not yet installed
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-06-19 22:33:27 +02:00
Rubén D
b0a0170860 chore: Move definitions to core package.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-06-19 11:55:00 +02:00
Rubén D
408a44880d chore: Remove mcrypt dependency.
Any sysPass exported file prior to v2.1.0 won't be able to be imported.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-06-18 19:39:18 +02:00
Rubén D
66dcab2cd0 refactor: Fix initialization errors.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-06-16 07:54:44 +02:00
Rubén D
ef73720d2b refactor: Fix initialization errors.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-06-13 08:02:42 +02:00
Rubén D
1c8fb0ea1a refactor: [WIP] Use hexagonal architecture and implement interfaces for services and repositories.
Controllers are being splited into commands to better dependency management.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-06-06 08:17:34 +02:00
Rubén D
41fcc98da7 chore: Minor code tweaks.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-05-28 09:05:53 +02:00
Rubén D
f22145b389 chore: Use Application helper class and externalize UpgradeConfigChecker.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-05-16 22:04:08 +02:00
Rubén D
98ffc311cf chore: Refactoring of Bootstrap class into an abstract class.
This allows to implement bootstrap classes for each module and simplifies the bootstrap code.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-05-16 19:01:28 +02:00
Rubén D
fe349cb6f9 chore: Inject dependencies into modules.
Avoid to inject de IoC container and inject required dependencies. A few helper modules have been created to provide common dependencies.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-05-16 18:02:35 +02:00
Rubén D
c76e262daa * [MOD] Exceptions in docblock.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-02-27 19:20:14 +01:00
Rubén D
6a6c5d966d * [FIX] Minor fixes.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2022-02-27 13:52:40 +01:00
Rubén D
ebe58282f6 * [ADD] Test API module without using a real sysPass instance.
* [MOD] Improve module loading.
* [MOD] Improve backup file regex.
* [MOD] Minor code tweaks.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2021-10-17 16:26:39 +02:00
Rubén D
58249da565 * [MOD] Use static types.
* [MOD] CORS headers.
* [MOD] Improve Forwarded header lookup.
* [ADD] Create interface for configuration data.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2021-10-12 20:49:18 +02:00
Rubén D
f8e9e19731 * [ADD] Backup CLI command and tests.
* [MOD] Code refactoring.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2021-09-26 18:42:34 +02:00
RubénD
ac00338cad Merge pull request #1585 from sur5r/master
[MOD Log which locale failed to load
2021-09-25 10:01:55 +02:00
Rubén D
0b02c8fdbf Merge branch 'v3.2' into feature/cli_module
# Conflicts:
#	composer.json
#	composer.lock
#	lib/SP/Providers/Auth/Ldap/LdapMsAds.php
#	lib/SP/Services/Install/Installer.php
#	lib/SP/Util/Checks.php
#	lib/SP/Util/Link.php
#	public/js/app-actions.min.js
#	public/js/app-util.min.js
#	tests/res/scripts/reset_db.sh
2021-09-19 21:40:27 +02:00
Rubén D
600c398bb8 * [ADD] Install CLI command tests.
* [MOD] Install CLI command refactoring.
* [MOD] Minor code tweaks.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2021-09-19 21:32:34 +02:00
Rubén D
41703b50f9 * [MOD] Strict type checking (WIP)
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2020-12-20 14:24:42 +01:00
Rubén D
e4e6e04c57 * [MOD] Updated copyright
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2020-12-07 19:42:41 +01:00
magcho
a802a74cbf [init] translation for Japanese 2020-09-06 12:33:00 +09:00
Jakob Haufe
afb81d9fb4 Log which locale failed to load 2020-08-24 13:39:08 +02:00
Rubén D
bec1d21d8c * [MOD] Improved CSRF handling by using HTTP header to set the token
Signed-off-by: Rubén D <nuxsmin@syspass.org>
2020-01-08 13:18:03 +01:00
Rubén D
6197c52af1 * [MOD] Update copyright date
* [MOD] Code cleanup

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2019-04-27 02:48:18 +02:00
Rubén D
63e7e88a23 * [MOD] Improved logging messages
* [MOD] Unlocked PHP 7.3
* [FIX] No debug messages when debug mode is activated

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2019-04-24 00:50:04 +02:00