Fixing rules

This commit is contained in:
Luca Frosini 2020-04-06 15:46:27 +02:00
parent 02e390ca60
commit e0bbc9268e
5 changed files with 52 additions and 19 deletions

View File

@ -1,2 +1,3 @@
Portal,SocialNetworking,OTHER
Portal,SocialNetworking,/rest
Portal,SocialNetworking,/rest
Portal,SocialNetworking,/gcube/service/&gcube-token=d730d65f-073a-4600-8c7b-326752d61ebf-98187548
1 Portal SocialNetworking OTHER
2 Portal SocialNetworking /rest
3 Portal SocialNetworking /gcube/service/&gcube-token=d730d65f-073a-4600-8c7b-326752d61ebf-98187548

View File

@ -2,7 +2,7 @@
"match": {
"serviceClassRegex": "Portal",
"serviceNameRegex": "SocialNetworking",
"calledMethodRegex": "(\/{0,1}(rest))|OTHER|UNKNOWN"
"calledMethodRegex": "(\/{0,1}(rest))|OTHER|UNKNOWN|\/gcube\/service\/($|&.*)"
},
"replace": {
"serviceClass": "Portal",

View File

@ -70,5 +70,4 @@ Portal,SocialNetworking,/rest/2/users/user-exists
Portal,SocialNetworking,/rest/2/vres/get-my-vres
Portal,SocialNetworking,/rest/messages/writeMessageToUsers
Portal,SocialNetworking,/rest/users/getUserEmail
Portal,SocialNetworking,/rest/users/getUserFullname
Portal,SocialNetworking,/gcube/service/&gcube-token=d730d65f-073a-4600-8c7b-326752d61ebf-98187548
Portal,SocialNetworking,/rest/users/getUserFullname
1 Portal SocialNetworking /rest/1/users/get-usernames-by-global-role
70 Portal SocialNetworking /rest/2/vres/get-my-vres
71 Portal SocialNetworking /rest/messages/writeMessageToUsers
72 Portal SocialNetworking /rest/users/getUserEmail
73 Portal SocialNetworking /rest/users/getUserFullname
Portal SocialNetworking /gcube/service/&gcube-token=d730d65f-073a-4600-8c7b-326752d61ebf-98187548

View File

@ -197,6 +197,17 @@
"serviceName": "cmems-importer-service",
"calledMethod": "OTHER"
}
},{
"match": {
"serviceClassRegex": "DataAnalysis",
"serviceNameRegex": "data-analytics-visualization",
"calledMethodRegex": ".*"
},
"replace": {
"serviceClass": "DataAnalysis",
"serviceName": "data-analytics-visualization",
"calledMethod": "OTHER"
}
},{
"match": {
"serviceClassRegex": "(WPS)|(DataAnalysis)",
@ -311,7 +322,7 @@
"match": {
"serviceClassRegex": "(DataCatalogue)|(DataPublishing)",
"serviceNameRegex": "(science-catalogue)|(gcat)|(gCat)",
"calledMethodRegex": "(\/){0,1}(rest\/(api\/){0,1}){0,1}(?<Collection>group|item|license|namespace|organization|profile|user)s\/(?!list)[%0-9a-zA-Z\\-_]*$"
"calledMethodRegex": "^(\/){0,1}(rest\/(api\/){0,1}){0,1}(?<Collection>group|item|license|namespace|organization|profile|user)s\/(?!list|create)[%0-9a-zA-Z\\-_.+:]*$"
},
"replace": {
"serviceClass": "DataPublishing",
@ -333,7 +344,7 @@
"match": {
"serviceClassRegex": "(DataCatalogue)|(DataPublishing)",
"serviceNameRegex": "(science-catalogue)|(gcat)|(gCat)",
"calledMethodRegex": "(\/index)|OTHER|UNKNOWN"
"calledMethodRegex": "(^\/index$)|OTHER|UNKNOWN"
},
"replace": {
"serviceClass": "DataPublishing",
@ -344,7 +355,7 @@
"match": {
"serviceClassRegex": "(DataCatalogue)|(DataPublishing)",
"serviceNameRegex": "(science-catalogue)|(gcat)|(gCat)",
"calledMethodRegex": "(\/){0,1}(rest\/(api\/){0,1}){0,1}items\/[%0-9a-zA-Z\\-_]*\/resources\/[%0-9a-zA-Z\\-_]*$"
"calledMethodRegex": "^(\/){0,1}(rest\/(api\/){0,1}){0,1}items\/[%0-9a-zA-Z\\-_]*\/resources\/[%0-9a-zA-Z\\-_.+:]*$"
},
"replace": {
"serviceClass": "DataPublishing",
@ -355,7 +366,7 @@
"match": {
"serviceClassRegex": "(DataCatalogue)|(DataPublishing)",
"serviceNameRegex": "(science-catalogue)|(gcat)|(gCat)",
"calledMethodRegex": "(\/){0,1}(rest\/(api\/){0,1}){0,1}items\/[%0-9a-zA-Z\\-_]*\/resources$"
"calledMethodRegex": "^(\/){0,1}(rest\/(api\/){0,1}){0,1}items\/[%0-9a-zA-Z\\-_.+:]*\/resources$"
},
"replace": {
"serviceClass": "DataPublishing",
@ -572,6 +583,28 @@
"serviceName": "HomeLibraryWebapp",
"calledMethod": "${Method}"
}
},{
"match": {
"serviceClassRegex": "InformationSystem",
"serviceNameRegex": "ICProxy",
"calledMethodRegex": "^(\/){0,1}gcube\/service\/(GCoreEndpoint|HostingNode|RuntimeResource|GenericResource).*"
},
"replace": {
"serviceClass": "InformationSystem",
"serviceName": "ICProxy",
"calledMethod": "query"
}
},{
"match": {
"serviceClassRegex": "InformationSystem",
"serviceNameRegex": "ICProxy",
"calledMethodRegex": "^(\/){0,1}gcube\/service\/(?!GCoreEndpoint|HostingNode|RuntimeResource|GenericResource).*"
},
"replace": {
"serviceClass": "InformationSystem",
"serviceName": "ICProxy",
"calledMethod": "read"
}
},{
"match": {
"serviceClassRegex": "(InformationSystem)|(Accounting)",
@ -730,7 +763,7 @@
"match": {
"serviceClassRegex": "VREManagement",
"serviceNameRegex": "(SmartExecutor)|(smart-executor)",
"calledMethodRegex": ".*((getAvailablePlugins.*)|(GET \/plugins(\/){0,1}$))"
"calledMethodRegex": ".*((getAvailablePlugins.*)|(^(GET ){0,1}(\/){0,1}plugins(\/){0,1}$))"
},
"replace": {
"serviceClass": "VREManagement",
@ -741,7 +774,7 @@
"match": {
"serviceClassRegex": "VREManagement",
"serviceNameRegex": "(SmartExecutor)|(smart-executor)",
"calledMethodRegex": ".*((getScheduledExecution.*)|(GET .*executions(\/){0,1}$))|((GET ){0,1}(\/){0,1}(rest\/){0,1}plugins\/[a-zA-Z]{1,})"
"calledMethodRegex": ".*((getScheduledExecution.*)|((GET ){0,1}.*executions(\/(ORPHAN){0,1}){0,1}()$))|((GET ){0,1}(\/){0,1}(rest\/){0,1}plugins\/[0-9a-zA-Z%\\-_]{1,})"
},
"replace": {
"serviceClass": "VREManagement",
@ -752,7 +785,7 @@
"match": {
"serviceClassRegex": "VREManagement",
"serviceNameRegex": "(SmartExecutor)|(smart-executor)",
"calledMethodRegex": ".*((getStateEvolution)|(getState)|(GET .*executions\/.{1,})).*|((GET ){0,1}(\/){0,1}(rest\/){0,1}plugins\/[a-zA-Z]{1,}\/.*)"
"calledMethodRegex": ".*((getStateEvolution)|(getState)|(GET .*executions\/(?!executions).{1,})).*|((GET ){0,1}(\/){0,1}(rest\/){0,1}plugins\/[0-9a-zA-Z%\\-_]{1,}\/(?!executions).*)"
},
"replace": {
"serviceClass": "VREManagement",
@ -785,7 +818,7 @@
"match": {
"serviceClassRegex": "Portal",
"serviceNameRegex": "SocialNetworking",
"calledMethodRegex": "\/{0,1}rest\/((1|2)\/){0,1}(((users(\/2){0,1})|comments|full-text-search|hashtags|messages|notifications|people|posts|tokens|vres|vers)\/){0,1}(?<Method>[a-zA-Z\\-]*(\/){0,1})"
"calledMethodRegex": "\/{0,1}rest\/((1|2)\/){0,1}(((people){0,1}(users(\/2){0,1})|comments|full-text-search|hashtags|messages|notifications|people|posts|tokens|vres|vers)\/){0,1}(?<Method>[a-zA-Z\\-]*(\/){0,1})"
},
"replace": {
"serviceClass": "Portal",
@ -796,7 +829,7 @@
"match": {
"serviceClassRegex": "Portal",
"serviceNameRegex": "SocialNetworking",
"calledMethodRegex": "(\/{0,1}(rest))|OTHER|UNKNOWN"
"calledMethodRegex": "(\/{0,1}(rest))|OTHER|UNKNOWN|\/gcube\/service\/($|&.*)"
},
"replace": {
"serviceClass": "Portal",
@ -1014,7 +1047,7 @@
}
},{
"match": {
"serviceClassRegex": "SDI",
"serviceClassRegex": "SDI|DataAnalysis",
"serviceNameRegex": "Thredds",
"calledMethodRegex": "^(\/){1}(?<Protocol>[a-zA-Z0-9]*){1}(\/public\/netcdf\/){1}(?<Collection>[a-zA-Z0-9_\\-%]*(?<!(..\\.nc)))(\/){1}.*(?<!(..\\.nc|.\\.asc|\\.tiff))$"
},
@ -1025,7 +1058,7 @@
}
},{
"match": {
"serviceClassRegex": "SDI",
"serviceClassRegex": "SDI|DataAnalysis",
"serviceNameRegex": "Thredds",
"calledMethodRegex": "^(\/){1}(?<Protocol>[a-zA-Z0-9]*){1}(\/public\/netcdf\/){1}[^\/]*((?<!(..\\.nc|.\\.asc|\\.tiff))|\/wfs)$"
},
@ -1036,7 +1069,7 @@
}
},{
"match": {
"serviceClassRegex": "SDI",
"serviceClassRegex": "SDI|DataAnalysis",
"serviceNameRegex": "Thredds",
"calledMethodRegex": "^(?!.*((\/public\/netcdf\/)|(::))).*$"
},
@ -1047,7 +1080,7 @@
}
},{
"match": {
"serviceClassRegex": "SDI",
"serviceClassRegex": "SDI|DataAnalysis",
"serviceNameRegex": "Thredds",
"calledMethodRegex": "^(\/){1}(?<Protocol>[a-zA-Z0-9]*){1}(\/public\/netcdf\/){1}(?<Collection>[a-zA-Z0-9_\\-%]*)(\/){1}(.*\\.(nc|asc|tiff))$"
},
@ -1058,7 +1091,7 @@
}
},{
"match": {
"serviceClassRegex": "SDI",
"serviceClassRegex": "SDI|DataAnalysis",
"serviceNameRegex": "Thredds",
"calledMethodRegex": "^(\/){1}(?<Protocol>[a-zA-Z0-9]*){1}(\/public\/netcdf\/){1}[^\/]*(\\.(nc|asc|tiff))$"
},

File diff suppressed because one or more lines are too long