1
0
Fork 0
Commit graph

81 commits

Author SHA1 Message Date
Joao Gilberto Magalhaes
883521e7e1 Add FastCGI Plugin for PHP-FPM support with examples, tests, and documentation
- Introduced `FastcgiPlugin` for automatic HAProxy `fcgi-app` configuration generation.
- Added example Docker Compose setup for PHP-FPM with FastCGI.
- Updated documentation with detailed examples and usage instructions for FastCGI.
- Included test cases to validate plugin behavior and generated configurations.
- Enhanced `easymapping` to support `fcgi-app` definitions in global configs.
2025-12-01 13:04:32 -05:00
Joao Gilberto Magalhaes
a993025718 Add FastCGI support for PHP-FPM and backend server protocol configuration
- Introduced `proto` and `socket` options for backend communication, supporting protocols like FastCGI (fcgi) and HTTP/2 (h2).
- Updated HAProxy configuration templates to handle Unix socket paths and protocol-specific settings.
- Enhanced documentation with examples for FastCGI using Unix sockets and TCP connections.
- Added new tests to validate FastCGI support, including expected configuration generation.
2025-11-30 13:23:56 -05:00
Joao Gilberto Magalhaes
51f8cd4659 Add path-based JWT validation support in JwtValidatorPlugin
- Introduced `paths` and `only_paths` configuration options to define protected API paths.
- Enhanced HAProxy configuration generation to handle path-specific JWT validation.
- Updated plugin metadata to include path details and validation logic.
- Modified documentation with detailed examples for protecting paths.
- Added comprehensive tests for path-based validation scenarios and edge cases.
2025-11-28 10:38:09 -05:00
Joao Gilberto Magalhaes
90e0df42a1 Fix blank line addition in docker.txt configuration 2025-11-27 20:36:41 -05:00
Joao Gilberto Magalhaes
d3637e737a Refactor plugin configuration examples and improve formatting in documentation
- Replaced `config.yml` with modular configuration examples: `config-basic.yml`, `config-certbot.yml`, `config-deny-pages.yml`, and `config-jwt-validator.yml`.
- Improved examples with detailed usage instructions, prerequisites, and testing steps for each configuration.
- Fixed indentation and formatting inconsistencies across plugin files and HAProxy configuration generation.
- Streamlined README comparison table for static vs. dynamic discovery.
- Updated `docker-compose-jwt-validator.yml` to correct audience key formatting.
2025-11-27 19:49:32 -05:00
Joao Gilberto Magalhaes
75d6833769 Enhance plugin documentation and add Kubernetes plugin annotation support
- Updated `plugins.md` and `kubernetes.md` with detailed plugin configuration examples for Kubernetes annotations.
- Introduced support for `easyhaproxy.plugins` and `easyhaproxy.plugin.{name}.{key}` annotations in Kubernetes.
- Added comprehensive examples for JWT validation, IP whitelisting, and deny pages
2025-11-27 18:54:07 -05:00
Joao Gilberto Magalhaes
ebc4b2bf7a Add JWT Validator Plugin and corresponding tests
- Introduced `JwtValidatorPlugin` (DOMAIN): Validates JWT tokens for protected API endpoints using HAProxy's JWT functionality.
- Added configuration options: `enabled`, `algorithm`, `issuer`, `audience`, `pubkey_path`, and `pubkey`.
- Documented the plugin setup and usage in `plugins.md` and `plugin-development.md`.
- Created fixtures for `services-with-jwt-validator`.
- Added extensive test cases to validate configuration and HAProxy output generation.
- Ensured seamless integration into the plugin framework alongside existing domain plugins.
2025-11-27 18:48:10 -05:00
Joao Gilberto Magalhaes
57387f3e32 Add IP Whitelist Plugin and corresponding tests
- Introduced `IpWhitelistPlugin` (DOMAIN): Restricts access to specific IP addresses or CIDR ranges.
- Added configuration options: `enabled`, `allowed_ips`, and `status_code`.
- Updated `plugins.md` and `plugin-development.md` to document `IpWhitelistPlugin`.
- Created fixtures for `services-with-ip-whitelist`.
- Added extensive test cases for `IpWhitelistPlugin` to validate configuration and HAProxy output generation.
- Ensured seamless integration into the plugin framework alongside other domain plugins.
2025-11-27 18:35:37 -05:00
Joao Gilberto Magalhaes
91f8ff5d08 Add tests for plugin integration and improve plugin configuration handling
- Created fixtures for `services-with-cloudflare`, `services-with-deny-pages`, and `services-with-multiple-plugins`.
- Added comprehensive test cases for `CloudflarePlugin`, `DenyPagesPlugin`, and `CleanupPlugin`.
- Ensured proper configuration propagation to plugins using labels in `easymapping/__init__.py`.
- Validated multi-plugin integration and consistent output in HAProxy configuration generation.
2025-11-27 18:17:58 -05:00
Joao Gilberto Magalhaes
113b90a697 Add support for plugin configurations and minor refactoring
- Added `plugin_configs` attribute to test cases.
- Improved handling of enabled plugins in `easymapping/__init__.py`.
- Updated templates directory path resolution for robustness.
- Refactored example files to enhance formatting consistency.
2025-11-27 18:08:05 -05:00
Joao Gilberto Magalhaes
90e3df2b75 Add built-in plugin framework and initial plugins
- Introduced a plugin system enabling EasyHAProxy extensions.
- Added `CleanupPlugin` (GLOBAL): Handles temporary file cleanup.
- Added `CloudflarePlugin` (DOMAIN): Restores visitor IP from Cloudflare headers.
- Added `DenyPagesPlugin` (DOMAIN): Blocks access to specified paths.
- Documented the plugin architecture, configuration options, and built-in plugins in `docs/plugin-development.md` and `docs/plugins.md`.
2025-11-27 17:43:59 -05:00
Joao Gilberto Magalhaes
ea9e4ee7c8 Some fixes and documentation
- Introduced ACME HTTP-01 challenge documentation.
- Added Docker Compose example for HTTP-01 setup.
- Updated `get_haproxy_command` logic with improved PID validation using `psutil`.
- Enhanced logging with a new `SingleLineNonEmptyFilter`.
- Expanded tests for daemonize functionalities.
- Updated dependencies to include `psutil`.
2025-08-24 17:49:25 -04:00
Joao Gilberto Magalhaes
d8049f331f Fix com duplicated name in tests 2024-11-18 09:15:40 -06:00
Joao Gilberto Magalhaes
9d97d568ec creating constants 2024-11-18 09:13:11 -06:00
Joao Gilberto Magalhaes
6df8e39bb1 rename skip_log to setup_log 2024-11-16 10:49:46 -06:00
Joao Gilberto Magalhaes
06ea2bbd3f Log Refactor 2024-11-15 22:39:05 -06:00
Joao Gilberto Magalhaes
e88f6b6326 Added documentation for new feature + Upgrade HAPROXY to 2.8.11 + Upgrade Python 2024-11-15 10:13:24 -06:00
Dylan Vos
e4a7fffa8f
#56: Updating tests 2024-11-09 17:42:55 +01:00
Dylan Vos
b7b372c6fc
#56: Small fix, missed ENV setting - broken cast 2024-11-09 17:37:15 +01:00
Dylan Vos
2026531b7f
#56: Small fix, missed ENV setting 2024-11-09 17:35:16 +01:00
Dylan Vos
8671a80b74
#56 prototyped manual-auth-hook and different preferred-challenges support 2024-11-09 14:10:01 +01:00
Zasda Yusuf Mikail
45e63cbd4d
Update tests 2024-02-03 16:34:58 +07:00
Zasda Yusuf Mikail
4fe1143ce1
Update docker test fixture 2024-01-31 20:56:01 +07:00
Zasda Yusuf Mikail
49cd42077e
Add prometheus metrics 2024-01-30 09:01:20 +07:00
Joao Gilberto Magalhaes
166b75cd75 Minor Fix Pre-Merge 2023-07-03 15:02:32 -05:00
Joao M
812590d86c
Merge branch 'issue/41' into issue/43 2023-07-03 14:19:00 -05:00
Joao M
78ea9b6810
Merge pull request #45 from byjg/issue/38
Issue #38 Add HTTPS Support for SSL
2023-07-03 13:37:38 -05:00
Joao Gilberto Magalhaes
4bb1c7931d Added Retry Count 2023-07-02 11:19:51 -05:00
Joao Gilberto Magalhaes
ac1b84a842 Changes in the process of issue/renew certificate 2023-07-02 11:06:52 -05:00
Joao Gilberto Magalhaes
c96860c449 Changes in the process of issue/renew certificate 2023-07-02 10:56:05 -05:00
Joao Gilberto Magalhaes
382368d58d Minor changes 2023-07-02 10:05:30 -05:00
Joao Gilberto Magalhaes
9db4d763ec ACME Docs and changes in Functions.run_bash 2023-07-02 02:07:37 -05:00
Joao Gilberto Magalhaes
014f83332c Using Certbot auto-config 2023-07-02 00:15:38 -05:00
Joao Gilberto
7f377e263f Fix runtime errors 2023-07-01 19:07:45 -05:00
Joao Gilberto Magalhaes
3b2e9a43fd Fixing errors / reformating code 2023-07-01 18:26:50 -05:00
Joao Gilberto Magalhaes
078cb31eb7 Add parameter eab_kid and eab_hmac_key 2023-07-01 17:26:46 -05:00
Joao Gilberto Magalhaes
5dbe0a6d28 Renaming Letsencrypt to Certbot, since it will be more generic allowing other issuers. 2023-07-01 16:05:53 -05:00
Joao Gilberto Magalhaes
55888752c9 Using Python to validate the Certbot expiration date. 2023-07-01 15:30:00 -05:00
Joao M
c41cc42d47
Merge branch '4.4.0' into issue/38 2023-06-27 00:20:55 -05:00
Joao Gilberto Magalhaes
2ddf276919 Defining Log Level 2023-06-27 00:19:18 -05:00
Joao Gilberto Magalhaes
dcdccb9236 Fix unit tests 2023-06-26 22:41:51 -05:00
Joao M
38c2440145
Merge branch '4.4.0' into 4.3.1 2023-06-26 22:34:09 -05:00
Joao M
f6dbf950b5
Add HTTP2 support for SSL. 2023-06-26 14:31:45 -05:00
Joao Gilberto Magalhaes
c0eb766339 Fix Swarm networking 2023-02-27 23:28:09 -06:00
Joao Gilberto Magalhaes
7dc683b254 Try to fix Docker Swarm with network attachment 2023-02-26 21:39:07 -06:00
Joao Gilberto Magalhaes
3cc9547388 Try Fix Swarm connection 2023-02-26 20:58:43 -06:00
Joao Gilberto Magalhaes
6e367174d4 Add ssl-check 2023-02-26 20:56:32 -06:00
Joao Gilberto Magalhaes
089d4434d9 Adjustment in the HAProxy conf.d 2023-02-12 20:08:12 -06:00
Joao Gilberto
c2beff08fc Load custom config files 2023-02-11 15:34:18 -06:00
Joao Gilberto Magalhaes
cd2a3c6b9c Fix Runtime Errors 2023-02-08 21:34:39 -06:00