diff --git a/activity/anomaly/descriptor.json b/activity/anomaly/descriptor.json new file mode 100644 index 0000000..f8fbe50 --- /dev/null +++ b/activity/anomaly/descriptor.json @@ -0,0 +1,34 @@ +{ + "name": "anomaly", + "type": "flogo:activity", + "version": "0.0.1", + "title": "Anomaly", + "description": "Anomaly detection", + "homepage": "https://github.com/project-flogo/microgateway/tree/master/activity/anomaly", + "settings": [ + { + "name": "depth", + "type": "string", + "description": "The size of the statistical model. Defaults to 2" + } + ], + "input": [ + { + "name": "payload", + "type": "any", + "description": "A payload to do anomaly detection on" + } + ], + "output": [ + { + "name": "complexity", + "type": "float32", + "description": "How unusual the payload is in terms of standard deviations from the mean" + }, + { + "name": "count", + "type": "int", + "description": "The number of payloads that have been processed" + } + ] +} diff --git a/activity/circuitbreaker/descriptor.json b/activity/circuitbreaker/descriptor.json new file mode 100644 index 0000000..6d31ad8 --- /dev/null +++ b/activity/circuitbreaker/descriptor.json @@ -0,0 +1,46 @@ +{ + "name": "circuitbreaker", + "type": "flogo:activity", + "version": "0.0.1", + "title": "Circuit Breaker", + "description": "Adds protection for a service", + "homepage": "https://github.com/project-flogo/microgateway/tree/master/activity/circuitbreaker", + "settings": [ + { + "name": "mode", + "type": "string", + "allowed": [ "a", "b", "c", "d"], + "description": "The tripping mode: 'a' for contiguous errors, 'b' for errors within a time period, 'c' for contiguous errors within a time period, and 'd' for a probabilistic smart circuit breaker mode. Defaults to mode 'a'" + }, + { + "name": "threshold", + "type": "int", + "description": "The number of errors required for tripping. Defaults to 5 errors" + }, + { + "name": "period", + "type": "int", + "description": "Number of seconds in which errors have to occur for the circuit breaker to trip. Applies to modes 'b' and 'c'. Defaults to 60 seconds" + }, + { + "name": "timeout", + "type": "int", + "description": "Number of seconds that the circuit breaker will remain tripped. Applies to modes 'a', 'b', 'c'. Defaults to 60 seconds" + } + ], + "input": [ + { + "name": "operation", + "type": "string", + "allowed": ["counter", "reset"], + "description": "An operation to perform: '' for protecting a service, 'counter' for processing errors, and 'reset' for processing non-errors. Defaults to ''" + } + ], + "output": [ + { + "name": "tripped", + "type": "bool", + "description": "The state of the circuit breaker" + } + ] +} diff --git a/activity/jwt/descriptor.json b/activity/jwt/descriptor.json new file mode 100644 index 0000000..aef6997 --- /dev/null +++ b/activity/jwt/descriptor.json @@ -0,0 +1,68 @@ +{ + "name": "jwt", + "type": "flogo:activity", + "version": "0.0.1", + "title": "JSON Web Token", + "description": "JSON web token authentication", + "homepage": "https://github.com/project-flogo/microgateway/tree/master/activity/jwt", + "settings": [], + "input": [ + { + "name": "token", + "type": "string", + "description": "The raw token" + }, + { + "name": "key", + "type": "string", + "description": "The key used to sign the token" + }, + { + "name": "signingMethod", + "type": "string", + "description": "The signing method used (HMAC, ECDSA, RSA, RSAPSS)" + }, + { + "name": "iss", + "type": "string", + "description": "The 'iss' standard claim to match against" + }, + { + "name": "sub", + "type": "string", + "description": "The 'sub' standard claim to match against" + }, + { + "name": "aud", + "type": "string", + "description": "The 'aud' standard claim to match against" + } + ], + "output": [ + { + "name": "valid", + "type": "bool", + "description": "If the token is valid or not" + }, + { + "name": "token", + "type": "any", + "description": "The parsed token" + }, + { + "name": "validationMessage", + "type": "string", + "description": "The validation failure message" + }, + { + "name": "error", + "type": "bool", + "description": "If an error occurred when parsing the token" + }, + { + "name": "errorMessage", + "type": "string", + "description": "The error message" + } + ] +} diff --git a/activity/ratelimiter/descriptor.json b/activity/ratelimiter/descriptor.json new file mode 100644 index 0000000..e66cbad --- /dev/null +++ b/activity/ratelimiter/descriptor.json @@ -0,0 +1,56 @@ +{ + "name": "ratelimiter", + "type": "flogo:activity", + "version": "0.0.1", + "title": "Rate Limiter", + "description": "Limits the rate a which a service is called", + "homepage": "https://github.com/project-flogo/microgateway/tree/master/activity/ratelimiter", + "settings": [ + { + "name": "limit", + "type": "string", + "required": true, + "description": "Limit can be specifed in the format of \"limit-period\". Valid periods are 'S', 'M' & 'H' to represent Second, Minute & Hour. Example: \"10-S\" represents 10 request/second" + }, + { + "name": "spikeThreshold", + "type": "float64", + "description": "Multiple above base traffic load which triggers the spike block logic. Spike blocking is disabled by default." + }, + { + "name": "decayRate", + "type": "float64", + "description": "Exponential decay rate for the spike blocking probability. Default .01" + } + ], + "input": [ + { + "name": "token", + "type": "string", + "required": true, + "description": "Token for which rate limit has to be applied" + } + ], + "output": [ + { + "name": "limitReached", + "type": "bool", + "description": "If the limit exceeds" + }, + { + "name": "limitAvailable", + "type": "int64", + "description": "Available limit" + }, + { + "name": "error", + "type": "bool", + "description": "If any error occured while applying the rate limit" + }, + { + "name": "errorMessage", + "type": "string", + "description": "The error message" + } + ] +} diff --git a/activity/sqld/descriptor.json b/activity/sqld/descriptor.json new file mode 100644 index 0000000..67fee1f --- /dev/null +++ b/activity/sqld/descriptor.json @@ -0,0 +1,35 @@ +{ + "name": "sqld", + "type": "flogo:activity", + "version": "0.0.1", + "title": "SQL Detector", + "description": "Detects SQL injection attacks", + "homepage": "https://github.com/project-flogo/microgateway/tree/master/activity/sqld", + "settings": [ + { + "name": "file", + "type": "string", + "description": "An optional file name for custom neural network weights" + } + ], + "input": [ + { + "name": "payload", + "type": "object", + "required": true, + "description": "A payload to do SQL injection attack detection on" + } + ], + "output": [ + { + "name": "attack", + "type": "float32", + "description": "The probability that the payload is a SQL injection attack" + }, + { + "name": "attackValues", + "type": "object", + "description": "The SQL injection attack probability for each string in the payload" + } + ] +} diff --git a/descriptor.json b/descriptor.json new file mode 100644 index 0000000..758962f --- /dev/null +++ b/descriptor.json @@ -0,0 +1,23 @@ +{ + "name": "microgateway", + "type": "flogo:action", + "version": "0.0.1", + "title": "Microgateway Action", + "description": "Microgateway action for routing traffic", + "homepage": "https://github.com/project-flogo/microgateway", + "settings": [ + { + "name": "uri", + "type": "string", + "required": true, + "description" : "The location of the microgateway resource" + }, + { + "name": "async", + "type": "bool", + "description" : "Execute the resource in an asynchronous manner" + } + ], + "input": [], + "output": [] +}