Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIME variables support #1220

Open
geoolekom opened this issue Nov 15, 2024 · 1 comment
Open

TIME variables support #1220

geoolekom opened this issue Nov 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@geoolekom
Copy link
Contributor

Summary

We would like to request support for the TIME variable and other time-related variables (TIME_DAY, TIME_EPOCH, etc.) in Coraza WAF. These variables are critical for logging and rule creation, improving the granularity and usability of logs.

Basic example

For example, the rule like that would benefit from such variables:

SecRule ARGS:exec "@contains /bin/bash" "id:1234,log,deny,msg:'[%{TIME_EPOCH}] Request blocked.'"

These variables would provide more comprehensive information in logs:

[ModSecurity] [1699951234] Request blocked.

Motivation

Adding support for TIME and related variables would enhance Coraza's functionality, aligning it more closely with ModSecurity features. This is particularly useful for implementing time-based rules and improving the context of logged events, such as debugging and rule evaluation.

Could you also advise on the preferred approach for implementation? We are interested in contributing via a pull request and would like to align with project guidelines.

@jptosso
Copy link
Member

jptosso commented Nov 15, 2024

Noted. We are missing this feature

@jptosso jptosso added the enhancement New feature or request label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants