A microservices API Gateway built on top of Express.js
APACHE-2.0 License
Bot releases are hidden (Show)
Published by XVincentX over 6 years ago
Express Gateway v1.8.0 has been released.
This release bring two interesting new features as well as couple of bug fixes and code reorganization.
tlsClientAuthenticated
. This condition can be useful when you'd like to check, on policy level, if the client provided a valid client certificate, and react accordingly. For more informations, check out our documentation. Check out our blog as well to understand a good use case for it #674http_proxy
and HTTP_PROXY
environment variables. We have looked around and, although we know that usually environment variables are upper case, for this one in particular the community seems to be divided — hence our decision #661Published by XVincentX over 6 years ago
Express Gateway v1.7.4 has been released with a small fix for the CLI experience
Published by XVincentX over 6 years ago
Howdy guys!
It's time for another Express-Gateway release.
We've a bit slowed down on Express Gateway lately as we've been pretty busy in deploying some instances on production environments. During the mission, we collected some edge cases and we've put them into this release.
checkCredentialExistence
flag is false
, the gateway will set the received JWT as the current user object, so you can extract the informations you care about directly from there instead of putting you as an anonymous user #643ajv
) has now the coercing option enabled. This means that the gaetway will try to convert your data to the correct type whenever is possible. This was required to fully support environment variables in JSON configuration files. #659basic
credential even if you have another one deactivated on the same consumer #660Published by XVincentX over 6 years ago
We've gone through all the policies and extracted, where it made sense, all the default values from the middleware code so you have better insight what's happening under the hood for you #627
Published by XVincentX over 6 years ago
eg plugin install
command now does not break the the system.config.yml
file anymore #623
Published by XVincentX over 6 years ago
Here we are again with another Express Gateway release.
This time we wanted to focus on a single particular feature that the community has been asking a lot and it was worth to release it as soon as possible given the benefits of environment variable in configuration files.
Express Gateway now supports environment variables in both configuration files. Check the docs to understand the syntax. #620
The configuration handler has been refactored so there's less duplication as well as a single chokidar
watcher for hot reload feature. #620
Published by XVincentX over 6 years ago
JSON Schema for gateway.config.json
was missing some edge cases used in our templates. This was degrading the getting started experience. We've fixed the schema as well as added tests so the getting started templates are always verified to be correct. #614 #616
Published by XVincentX almost 7 years ago
After all Christmas time holidays, where probably most of you went back to home with your relatives, probably sipping some tea on the sofa, we're all back to work.
We aren't an exception and we're opening the 2018 with a new Express Gateway version
Express-Gateway v1.6.0 is here.
In this release we took advantage of the Christmas slowdown and started to pay some technical debt we've been accumulating over the time. 🎅. The most notable change here is the support for Node 9.
Moreover, we have been working a lot in extending our JSON Schema support.
We already introduced its support for policies, conditions and even for plugins. We decided to keep moving forward and now we're using it as well as for configuration files system.config
,gateway.config
and models.
We have departed from our homemade JSONSchemaesque system and fully adopted the JSON Schema standard. This will let you express complex model constraints as well as additional property in a standard way.
Thanks to the schema based validation system we've also discovered two subtle bugs that were really hard to detect. This is a sign we're moving toward the right direction. 👍
.js
models? 😱They won't be loaded anymore by the gateway. Therefore, their presence is basically useless and you should remove them from your models
directory and replace them with the new JSON Schema based one.
We have provided a migration script that will go through your current models and transform them into their respective JSON Schema version:
npx migrate --migrations-dir ./node_modules/express-gateway/migrations/ up
This script, however, will run automatically when you upgrade your EG version.
In case you didn't modify the schemas at all, this is a really trivial task. You just need to copy and paste these files.
In case you put some custom properties, you'll need to convert them in a JSON Schema property.
This should be extremely easy, though:
This property:
module.exports = {
properties: {
firstname: {isRequired: true, isMutable: true},
//…other properties
}
};
Becomes:
"firstname": {
"type": "string"
},
"required": [
"username",
"firstname",
"lastname"
]
Either way you decide to go, once the migration is over and you verified that the gateway is starting correctly, you can safely delete the old .js
files.
For extended informations about JSON Schema, check out their website
In case you enter any issue during the migration process or you're in doubt, feel free to ask for questions in our Gitter channel
system.config
and gateway.config
are now validated through JSON Schema #592Error
object. #588http://express-gaetway.io/policy/something.json
or http://express-gaetway.io/condition/something.json
#571.js
based model have been replaced with JSON Schema based ones #581Published by XVincentX almost 7 years ago
Express-Gateway v1.5.0 is here.
This release finally brings the JWT support in the gateway. It was the top feature voted on FeatHub and we're glad we made it live.
The gateway is now able to verify JSON Web Tokens issued by any authority. It can be the Gateway itself, but it can also be another system such as oAuth.io, Auth0 or your own system. To find out how to use the policy, please refer to our updated documentation (#555)
In addition to opaque tokens, the oauth2 policy can now issue JSON Web Tokens during the oAuth2 flow. You just need to configure it to do so. You can find further informations on our documentation (#567)
node-uuid62
with uuid62
(#568)Note: We have deployed a live gateway instance on Glitch configured with the new two policies. You can take that as a starting point.
Published by XVincentX almost 7 years ago
We're here again with a small pitstop before v1.5.0.
HTTP_PROXY
environment variable to allow usage service endpoints that are behind corporate proxy #552. You can find further informations on our documentation page
chokidar
. #563ioredis-mock
to the latest version. This let us polish couple of things we had to workaround in the previous release in order to complete the client switch. #565error
to warn
. This should hopefully help you to reveal some situation where the gateway might be acting in the way you specified because of some things. #562Published by XVincentX almost 7 years ago
Almost another month has passed and we've been working hardly to bring new features, as well bug fixes!
We have almost completely automated our deployment pipeline. Everytime a new tag is pushed on Github, our lovely CI system will publish the package on npm as well as update all our docker images. Less time on errands, more time on code! (#496)
Express Gateway has now got a migration framework, node-migrate. This is required because as we're refactoring different parts of our codebase, we might need to move the data to ensure consistency with the evolution of the product. Don't worry though — when a new migration is in place, we'll let you know through the release notes. (#494)
We have added the schema definition to our Typescript definition file. If you're writing a plugin using Typescript, you'll now benefit for full type checking and autocomplete for JSONSchema (#518)
Speaking about style guide, we started with some changes last month and we're keeping going with that. Now we are emplying lint-staged to check and fix all code before commit it to the git repository. This should lower the barrier for contributors willing to help us writing the code (#529) (Thanks to @dotBits for the initial implementation)
We have replaced our internal Redis client from node-redis to ioredis. This brings to us a lot of improvements (for example, it's Promise based by default so we do not have to monkey patch its methods) and it also supports a lot of features the community has been asking for, such as Sentiel (Redis' built in high avaialabilty solution) and cluster connections. Please refer to our documentation to learn how to leverage those changes (#499) (Big thanks to @stipsan and his great ioredis-mock
library. He's been extremely collaborative and responsive and we wouldn't be able to ship this big change without his collaboration)
We have modified our CI environment so now all the tests suite is ran against a real Redis instance as well as the emulate experience. This will ensure that all the scenarios will be working correctly (#499)
We have added a requestID
to every request that's passing through the gateway. This should simplify the scenarios where you want to track the journey of a web request and understand what policies processed it. This value will be forwarded as an header under the name eg-request-id
(#543).
All our authentication policies have now an additional passthrough
parameter. When this is set to true, if an user does not pass the authentication stage it won't stop the pipeline process anymore (returning 401 or 403), but it will continue down into the pipeline as unauthenticated request. (#544)
2 new conditions authenticated
and anonymous
have been added to the core in order to support new scenarios (such as rate-limiting unauthenticated requests) (#544)
A new terminate
policy has been added to the core. You can use this one to stop the request from being processed under some determinate conditions (#544)
A new policy called header
has been added into the core. This will let you forward as headers some parts of the gateway that you feel they're important for your application. You can find further information in the documentation section (#546)
The proxy policy has been modified to allow you guys to pass the whole set of options that the underlying middleware is offering. This was particularly required by users willing to set certificate and keyfiles in the proxies. (#491)
We have updated all our patch and minor dependencies version. I know we should do the same for major. We'll get there. (#532)
It is now possible to provide keyId and keySecret parameters when creating a new key-auth credential type. This might be helpful when recreating the gateway and you want to preserve the keys. (#523)
We have modified the Admin API (and by cascade on the CLI) so that you can now refer to an application by using its name instead of its ID (#512)
It is now possible to specify a key/cert file tuple when connecting to a Redis instance (#497) (Thanks to @srcnix)
eg credentials create -c username
and eg credentials create -c user-id
will now look and act on the same user. Previously they were treated as two different entities, causing some bugs during login phases. We have provided a migration script as well to adjust all the data in your system. Please run npx migrate
before starting the Gateway once updated. (#490)In this release we have received multiple external contributions and we have acknowledged all of them in our changelog. Thank you.
Published by XVincentX almost 7 years ago
eg credential list
command now accepts a -f parameter that will let you filter the credentials based on their status (so far, active and archived) (#428)Published by DrMegavolt about 7 years ago
Plugin Engine (https://github.com/ExpressGateway/express-gateway/pull/381)
Express gateway can be extended with:
Plugins have access to:
CLI for Plugins (https://github.com/ExpressGateway/express-gateway/pull/404)
Plugins API (https://github.com/ExpressGateway/express-gateway/pull/404)
node-uuid module changed with uuid due to deprecation (https://github.com/ExpressGateway/express-gateway/pull/403)
Example pipelines (https://github.com/ExpressGateway/express-gateway/pull/405)
Published by kevinswiber about 7 years ago
dir
alias for eg gateway create
(https://github.com/ExpressGateway/express-gateway/pull/373)Published by kevinswiber about 7 years ago
It's the first major release!
Published by kevinswiber about 7 years ago
eg gateway create
CLI options (https://github.com/ExpressGateway/express-gateway/pull/320)Published by kevinswiber about 7 years ago
Published by kevinswiber about 7 years ago