[ 
https://issues.apache.org/jira/browse/METRON-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15572305#comment-15572305
 ] 

ASF GitHub Bot commented on METRON-424:
---------------------------------------

Github user cestella commented on the issue:

    https://github.com/apache/incubator-metron/pull/303
  
    Ok, so there is still an issue here.  Some of the other parsers do not 
create an `ip_src_addr` and `ip_dst_addr` field in their test data (e.g. 
`JSONMapParser`).  In those cases, the `global.json` used fails every message 
as invalid because the default behavior changed for the IP validation code.
    
    As I see it, we have 2 choices:
    1. Make the behavior of the IP validator return valid if the field doesn't 
exist.
    2. Remove the IP validation check from the integration test global config
    3. Force the various parsers to provide those fields.
    
    I suggest 1 upon further consideration.  Global validation across ALL 
parsers is going to have to be tolerant of missing values as not all parsers 
are going to provide every fields.  I think it should be interpreted, "Are 
these fields globally valid if they exist?" rather than "are these fields 
globally valid?"
    
    That being said, I think that the accommodation for this should exist in 
the FieldValidation function, not in the individual validator functions.  I'll 
make a PR to your PR to this effect, but I wanted to make sure everyone was on 
board with that and gather thoughts.


> Stellar fieldValidation "IP" does not support list values
> ---------------------------------------------------------
>
>                 Key: METRON-424
>                 URL: https://issues.apache.org/jira/browse/METRON-424
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Neha Sinha
>
> Currently, stellar fieldValidation *IP* accepts only single string 
> value.However we need the ability to specify a list of values,say, we want to 
> validate ip_dst_addr to be of either IPV4 or IPV6 type. This feature needs to 
> be incorporated.
> Desired Behaviour :- User should be able to configure ip validation as below 
> :-
> GLOBAL Config: global
> {
>   "es.clustername": "metron",
>   "es.ip": "metron-test1-10.openstacklocal",
>   "es.port": "9300",
>   "es.date.format": "yyyy.MM.dd.HH",
>   "fieldValidations" : [
>               {
>                 "input" : [ "ip_dst_addr" ],
>                 "validation" : "IP",
>                 "config" : {
>                     "type" : ["IPV6","IPV4"]
>                            }
>               }
>                        ]
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to