Sync GitHub / sync (push) Successful in 8s
Add PublicAccessListener (priority 84) that allows rate-limited unauthenticated access to configured public paths. Authenticated users bypass this listener entirely via AcceptListener/AllowListener. New components: - PublicPathMatcher service with wildcard path matching (* and **) and optional host-prefix scoping - PublicAccessListener applying per-IP rate limiting to public paths - Separate public_limiter compound rate limiter (burst + sustained) - publicRateLimitCache pool (APCu in prod, array in tests) New env vars: - PUBLIC_PATHS (comma-separated path patterns, empty = disabled) - PUBLIC_BURST_COUNT/PUBLIC_BURST_TIME (default 100/60s) - PUBLIC_UPPER_COUNT/PUBLIC_UPPER_TIME (default 500/3600s) Tests: 52 new tests (29 unit for PublicPathMatcher, 12 unit for PublicAccessListener, 11 functional for PublicAccessFlowTest). Total: 293 tests, 605 assertions, all passing. PHP CS Fixer: 0 of 63 files need fixing. Documentation: README, CHANGELOG, ROADMAP, Caddyfile, example.env all updated with public access configuration and examples.
56 lines
2.0 KiB
XML
56 lines
2.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
|
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
|
colors="true"
|
|
failOnDeprecation="true"
|
|
failOnNotice="true"
|
|
failOnWarning="true"
|
|
bootstrap="tests/bootstrap.php"
|
|
cacheDirectory=".phpunit.cache"
|
|
>
|
|
<php>
|
|
<ini name="display_errors" value="1" />
|
|
<ini name="error_reporting" value="-1" />
|
|
<server name="APP_ENV" value="test" force="true" />
|
|
<server name="SHELL_VERBOSITY" value="-1" />
|
|
<server name="KERNEL_CLASS" value="App\Tests\TestKernel" />
|
|
<!-- fixed TOTP secret so functional tests can compute valid codes -->
|
|
<server name="TOTP_URI" value="otpauth://totp/Test-TOTP?secret=JBSWY3DPEHPK3PXP" />
|
|
<server name="APP_SECRET" value="test_secret_key_change_me" />
|
|
<!-- high rate limits so functional tests don't get blocked -->
|
|
<server name="BURST_COUNT" value="10000" />
|
|
<server name="UPPER_COUNT" value="10000" />
|
|
<!-- public access: enable for functional tests with low limits -->
|
|
<server name="PUBLIC_PATHS" value="/public/**" />
|
|
<server name="PUBLIC_BURST_COUNT" value="3" />
|
|
<server name="PUBLIC_BURST_TIME" value="60" />
|
|
<server name="PUBLIC_UPPER_COUNT" value="10000" />
|
|
<server name="PUBLIC_UPPER_TIME" value="3600" />
|
|
</php>
|
|
|
|
<testsuites>
|
|
<testsuite name="Project Test Suite">
|
|
<directory>tests</directory>
|
|
</testsuite>
|
|
</testsuites>
|
|
|
|
<source ignoreSuppressionOfDeprecations="true"
|
|
ignoreIndirectDeprecations="true"
|
|
restrictNotices="true"
|
|
restrictWarnings="true"
|
|
>
|
|
<include>
|
|
<directory>src</directory>
|
|
</include>
|
|
|
|
<deprecationTrigger>
|
|
<function>trigger_deprecation</function>
|
|
</deprecationTrigger>
|
|
</source>
|
|
|
|
<extensions>
|
|
</extensions>
|
|
</phpunit>
|