Update config template and beautify the code

This commit is contained in:
TeoV
2020-03-23 15:50:14 +02:00
committed by Dan Christian Bogos
parent d218868777
commit 77f0e69ffe
14 changed files with 65 additions and 97 deletions

View File

@@ -84,18 +84,19 @@
],
},
{
"id": "RadiusPAPAuth",
"filters": ["*string:~*vars.*radReqType:*radAuth","*exists:~*req.User-Password:"],
"id": "RadiusAuthProcessor",
"filters": ["*string:~*vars.*radReqType:*radAuth"],
"flags": ["*radauth", "*log"],
"request_fields":[
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
],
"reply_fields":[
{"filters": ["*empty:~*cgrep.Error:"], "type": "*none", "blocker": true},
{"filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "type": "*variable", "value": "~*cgrep.Error"}
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*variable", "value": "~*cgrep.Error"}
]
},
{

View File

@@ -96,18 +96,19 @@
],
},
{
"id": "RadiusPAPAuth",
"filters": ["*string:~*vars.*radReqType:*radAuth","*exists:~*req.User-Password:"],
"id": "RadiusAuthProcessor",
"filters": ["*string:~*vars.*radReqType:*radAuth"],
"flags": ["*radauth", "*log"],
"request_fields":[
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
],
"reply_fields":[
{"filters": ["*empty:~*cgrep.Error:"], "type": "*none", "blocker": true},
{"filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "type": "*variable", "value": "~*cgrep.Error"}
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*variable", "value": "~*cgrep.Error"}
]
},
{

View File

@@ -104,18 +104,19 @@
],
},
{
"id": "RadiusPAPAuth",
"filters": ["*string:~*vars.*radReqType:*radAuth","*exists:~*req.User-Password:"],
"id": "RadiusAuthProcessor",
"filters": ["*string:~*vars.*radReqType:*radAuth"],
"flags": ["*radauth", "*log"],
"request_fields":[
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
],
"reply_fields":[
{"filters": ["*empty:~*cgrep.Error:"], "type": "*none", "blocker": true},
{"filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "type": "*variable", "value": "~*cgrep.Error"}
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*variable", "value": "~*cgrep.Error"}
]
},
{

View File

@@ -99,18 +99,19 @@
],
},
{
"id": "RadiusPAPAuth",
"filters": ["*string:~*vars.*radReqType:*radAuth","*exists:~*req.User-Password:"],
"id": "RadiusAuthProcessor",
"filters": ["*string:~*vars.*radReqType:*radAuth"],
"flags": ["*radauth", "*log"],
"request_fields":[
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
],
"reply_fields":[
{"filters": ["*empty:~*cgrep.Error:"], "type": "*none", "blocker": true},
{"filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "type": "*variable", "value": "~*cgrep.Error"}
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*variable", "value": "~*cgrep.Error"}
]
},
{

View File

@@ -107,18 +107,19 @@
],
},
{
"id": "RadiusPAPAuth",
"filters": ["*string:~*vars.*radReqType:*radAuth","*exists:~*req.User-Password:"],
"id": "RadiusAuthProcessor",
"filters": ["*string:~*vars.*radReqType:*radAuth"],
"flags": ["*radauth", "*log"],
"request_fields":[
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
],
"reply_fields":[
{"filters": ["*empty:~*cgrep.Error:"], "type": "*none", "blocker": true},
{"filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "type": "*variable", "value": "~*cgrep.Error"}
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*variable", "value": "~*cgrep.Error"}
]
},
{

View File

@@ -95,18 +95,19 @@
],
},
{
"id": "RadiusPAPAuth",
"filters": ["*string:~*vars.*radReqType:*radAuth","*exists:~*req.User-Password:"],
"id": "RadiusAuthProcessor",
"filters": ["*string:~*vars.*radReqType:*radAuth"],
"flags": ["*radauth", "*log"],
"request_fields":[
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
],
"reply_fields":[
{"filters": ["*empty:~*cgrep.Error:"], "type": "*none", "blocker": true},
{"filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "type": "*variable", "value": "~*cgrep.Error"}
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*variable", "value": "~*cgrep.Error"}
]
},
{

View File

@@ -102,18 +102,19 @@
],
},
{
"id": "RadiusPAPAuth",
"filters": ["*string:~*vars.*radReqType:*radAuth","*exists:~*req.User-Password:"],
"id": "RadiusAuthProcessor",
"filters": ["*string:~*vars.*radReqType:*radAuth"],
"flags": ["*radauth", "*log"],
"request_fields":[
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
],
"reply_fields":[
{"filters": ["*empty:~*cgrep.Error:"], "type": "*none", "blocker": true},
{"filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "type": "*variable", "value": "~*cgrep.Error"}
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*constant", "value": "AccessReject"},
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
"type": "*variable", "value": "~*cgrep.Error"}
]
},
{