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

Mechanism for optional fields #86

Closed
sethhall opened this issue Jul 15, 2015 · 1 comment
Closed

Mechanism for optional fields #86

sethhall opened this issue Jul 15, 2015 · 1 comment

Comments

@sethhall
Copy link

It would be great if there was a mechanism to declare optional fields in rules. The two following rules give a great use case for this request. (and I looked this time and didn't see a similar request!) 😄

rule=openssh_failed_password:Failed password for invalid user %user:word% from %ip:ipv4% port %port:number% ssh%ssh-ver:number%%tail:rest%
rule=openssh_failed_password:Failed password for %user:word% from %ip:ipv4% port %port:number% ssh%ssh-ver:number%%tail:rest%
@davidelang
Copy link
Contributor

This will be available in the v2 version (currently v2 experimetnal

two ways of doing it

you can specify an alternative for a particular field, or you can define a new type that can have one of several types/values

for example,
type=apachefield:-
type=apachefield:%name:op-quoted-string%
and then use the type @apachefield instead of word etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants