Updated:
- Status code set to 400 when validation error occurs when using API Gateway event. Thanks @lironess
Updated:
- Scheduled event handler modified to allow custom event types. Thanks @wasenbr
Internal:
- Migrated code coverage from istanbul to nyc.
- Mocha 5.0 now a dev dependency
Updated:
- Support for
isBase64Encoded
for API Gateway responses. Thanks @pkalamegham
New:
- Automatic loading of environment variables from AWS SSM Parameter Store
Internal:
mocha
test dependency is now run using a global install
Updated:
- Added
event.rawBody
to API Gateway requests. Thanks @msteckyefantis
Internal:
- Updated test dependencies
New:
.before()
added to allow handlers to perform initialization operations. Thanks @wasenbr.callbackWaitsForEmptyEventLoop
add to define how the callback works. Thanks @wasenbr
Fix:
event.body
not being parsed or validated correctly. Thanks @RobBrazier
Updated:
- Test dependencies
Updated:
- JWT for API Gateway now removes 'Bearer' prefix. Thanks @RobBrazier
Updated:
- JWT: Public key with or without armor will be parsed and reformatted to make it easier to use the RS256 algorithm
Fix:
- Joi validation provider was pre-loading the library which cause compatibility issues with new version of Joi
New:
- Event-based handler framework
- API Gateway handler mechanism to simplify lambda-proxy implementations
- Targeted validation, JWT enforcement and injection protection
Removed:
- Legacy wrapper for lambda functions
- Generalized validation, JWT and injection protection
Updated:
- Re-wrote most of the library
- Changed to work better with Node 6.1.x LTS
New:
vandium.callbackWaitsForEmptyEventLoop( true | false )
configuration option to prevent callbacks for waiting for empty event loopscallbackWaitsForEmptyEventLoop
configuration option toVandium.configure()
to prevent callbacks for waiting for empty event loopslambdaProxy
configuration option for AWS API Gateway lambda proxy support
Updated:
- Better error handling for AWS API Gateway including status codes for standard Vandium errors
Internal:
- Tests no longer use
lambda-tester
to reduce possibility of future circular dependency - Changed
node-uuid
package to use newuuid
one as per author's request
New:
context.callbackWaitsForEmptyEventLoop
is now supported
Internal:
- Removed
codecov
module from build process
New:
- Added
stringifyErrors
configuration property to improve error handling with AWS API Gateway
Updated:
- Configurations loaded from AWS S3 are now merged with the existing one
Internal:
- Changed callbacks to use ES2015 arrow functions
New:
- Vandium instances can now be created programmatically via a builder pattern for integration into frameworks
- Configure all parameters via a main configuration function
- Integrates
joi-json
library to allow configuration of validation rules in both simple JSON and strings. - Validator will ignore unknown events by default. Can be configured using the
allowUnknown
validation configuration property. - Improved documentation
- New examples
Changed:
- Vandium singleton state gets reset after wrapping handler with
vandium()
. No longer requires module to be unloaded when testing
Internal:
- Refactored all areas where state is preserved. Not a problem for lambda but makes it easier to test on non-lambda environments
Fixed:
- SQL injection attack detection for escape sequence with comments reporting false positive (issue #8)
Updated:
- Changed how internal pipeline is created and thus preventing exceptions where
vandium()
is called more than once.
New:
- Exceptions that get routed to
callback()
orcontext.fail()
will get all properties, other thanerr.message
, stripped to hide details of underlying code. This can be disabled by callingvandium.stripErrors( false )
.
Updated:
- Joi from 8.0.x to 8.4.x
Internal:
- Changed resolution method for validation engine (Joi)
New:
- XSRF token support for JWT for improved security
Internal:
- Refactored validation pipeline and JWT validation
Internal:
- Changed to use vandium-utils project.
Improved:
- Calls to
context.succeed()
,context.fail()
andcontext.done()
are now re-routed to thecallback
function
Internal:
- Updated for future rough in for the lov validation engine
- Simplified and streamline code and tests in several areas
New:
- calling
eval()
from inside the Lambda handler will cause a security violation exception to be thrown
New:
- Environment variable support to enable/disable injection attack protection
Improved:
- Documentation split into several markdown files inside the
docs
folder - Reworked injection attack scanning for future updates
- Update unit tests for full coverage
Improved:
- Reduced load process even further by not requiring s3 resources unless they are needed
- Removed dependency on
lodash
to reduce load times
Improved:
- JWT can now be auto configured by having jwt configuration element in vandium.json or by setting environment variables
- Optimized load process to reduce billing costs for cold runs.
- Warm runs are quicker than previous releases
New:
- Added vandium.after() to provide a mechanism to free resources after the handler calls callback or returns a promise.
Improved:
- Only uncaught exceptions are logged and not those that are raised because of input validation or JWT verification issues
Updated:
- Minor addition of vandium.logUncaughtExceptions() to prevent uncaught exceptions from being sent to console.log
Updated:
- Tests now use version 2.1 of lambda-tester
Fixed:
- Minor documentation fixes
New:
- Added support for AWS Lambda callback handler
- Environment variables can defined inside
vandium.json
Improved:
- Uncaught exceptions are logged to
console.log()
and routed tocallback()
Changed:
- When return promises to vandium, the callback pattern is used instead of context.succeed/fail
Compatibility:
- Requires Node 4.3.2. For 0.10.x support, use version 1.x
Updated:
- JWT validation engine
Fixed:
- SQL Injection (SQLi) attack detection and protection to examine nested objects inside event
Improved:
- Reduced NPM package size
Fixed:
- Synchronous handlers can now return value to the caller
Added:
- SQL Injection (SQLi) attack detection and protection
Added:
- support for Promises. Tested with bluebird
Added:
- travis ci
- build status shield
Fixed:
- unit tests failing if a vandium.json file was present
- documentation typos
Initial Release