-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35451b2
commit f95cd7f
Showing
6 changed files
with
262 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": [] | ||
} |