Need to implement functional tests for #536 . Pay attention to #536 (comment) : not all the requests may be challenged.
See https://github.com/tempesta-tech/tempesta/blob/master/tempesta_fw/http.c#L2140-L2154 for more information how TempestaFW responds to sticky cookie and JS challenge violations.
The test must implement following cases:
Client side:
Tempesta Side:
JS Challenge code tests:
Session identification:
Need to implement functional tests for #536 . Pay attention to #536 (comment) : not all the requests may be challenged.
See https://github.com/tempesta-tech/tempesta/blob/master/tempesta_fw/http.c#L2140-L2154 for more information how TempestaFW responds to sticky cookie and JS challenge violations.
The test must implement following cases:
Client side:
delay_limitcookie_timestamp + delay_min + cookie_timestamp % delay_range. Keep in mind Sessions rate limit #598: with that improvement client must be blocked and never be authorised. Tempesta must close connection (or respond with error) for every request from that client. After discussion we decide that we should close connection after first request. Response should be sent only for first request.attacker: send requests afterdelay_limitelapsed. Same expectations as above.delay_limitwas removedJS is disabled of the clientThis is invalid case. JS MUST be enabled for client.Tempesta Side:
Per-Vhost JS challenge configurationWe have per-vhost tests for theStickydirective in thesessions.test_cookiesJS Challenge code tests:
Client has many cookies, some of them has parametersTheCookieheader does not have parameters.Session identification: