express-gateway | A microservices API Gateway built on top of Expressjs | REST library
kandi X-RAY | express-gateway Summary
kandi X-RAY | express-gateway Summary
DEPRECATION NOTICE This Project is no longer maintained. Read here for more details or if you're interested in taking over that project. Express Gateway is a microservices API gateway that sits at the heart of any microservices or serverless architecture, regardless of what language or platform you're using. Express Gateway secures your microservices and serverless functions and expose them through APIs using Node.js, Express and Express middleware. Developing cloud native applications, orchestrating and managing them now can be done insanely fast all on one seamless platform without having to introduce additional infrastructure.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Configures the pipeline
- Normalizes the gateway config .
- Authenticate a token
- Bootstrapping config .
- Authenticate A OAuth2 API request .
- register a schema
- Authenticate a local access token .
- replace all env variables in a string
- Validates the updated properties of the credential details .
- Creates a condition middleware middleware
express-gateway Key Features
express-gateway Examples and Code Snippets
Community Discussions
Trending Discussions on express-gateway
QUESTION
I want to add parameters to my express gateway,
I followed official documentation. So my pipeline like that:
...ANSWER
Answered 2022-Jan-12 at 12:55The documentation for the proxy policy states that the proxy policy must come last; you need to reorder your pipeline to conform to this:
QUESTION
I've been trying to do a NodeJS Microservices Architecture using Docker.
I currently have 2 services : Auth API et Users CRUD API. Now my goal is to setup a Gateway using Express-Gateway.
I followed many tutorials on the web to try to set it up but whenever I try to make a request to the gateway (acting like a proxy) it sends a 502 bad gateway response..
My docker-compose.yml :
...ANSWER
Answered 2021-Dec-10 at 19:41The problem lies in your gateway-config.xml file. It is not referring correctly to the ports defined in docker-compose.xml.
The docker-compose.xml ports command is HOST:CONTAINER, so what the host refers to as 3001 for the users container, is port 3000 within the Docker. Express Gateway is running in Docker, so the service endpoints need to refer to the ports as they appear to other containers (they are distinguished by internal hostname as defined in the docker-compose.xml file rather than by port at this level):
QUESTION
I'm using Express Gateway
to proxy my microservices. I'm hitting the gateway from my react
app with Axios
. However, the call gets restricted by the CORS Policy
. I have enabled CORS in the express gateway and also on my authentication service. I followed the official documentation to enable the CORS from this link for Express Gateway and this link for authentication service(Express App). Here is how I have the code.
Express Gateway config.yml
...ANSWER
Answered 2021-Mar-28 at 12:31Your "methods" definition is incorrect. It needs to be in the form of a YAML array:
QUESTION
Im trying to configure api-gateway for my micro service study. I created a pod as a auth-depl and auth-src service for this pod. Also I have another pod&service as links-depl and links-serv. And I want to make a api-gateway for. these services.
The output for "kubeectl get pods":
...ANSWER
Answered 2021-Feb-20 at 11:12In Express Gateway, you need to have a pipeline defined for each of your ApiEndpoints. You have a pipeline which maps the (outside-facing) "api" endpoint to the service endpoint "httpbin", but you are missing one to map the "user" endpoint to your signup endpoint.
You need to add a pipeline for this to your "pipelines" section:
QUESTION
I'm trying to modify a graphql query variable using express-gateway
.
The code on the gateway is as below,
...ANSWER
Answered 2021-Feb-16 at 12:18The only way I could get this working was by using node-fetch
and then making a fetch
request to the graphql-sever from my middleware instead of doing a return next()
and following the middleware chain.
My setup is something like the following,
QUESTION
I have currently configured express-gateway to communicate with a service on my backend exposed on a unique port on my machine and it's working fine. The gateway serves as a proxy to the services and currently does some security checks and jwt authentication. Then, only authorized request (through jwt validation) gets sent to services as configured. However, I'm concerned that if I don't put some sort of authentication on my service, then anyone who knows the port (or URL) my service runs on can directly access it and bypass the gateway directly. I'm looking for a way I can set up a sort of auth between the gateway and the service (maybe through keys) so that only the gateway can communicate with the services and not any other client. I currently can't find anything in the docs specifically for that. Also, if there's something wrong with my architecture, I'd appreciate it if you could point it out. Thank you.
...ANSWER
Answered 2020-Oct-15 at 11:23The path between Express Gateway and your back end should be on a private, encrypted network so there is no way for anyone to bypass the gateway.
With this architecture, you don’t need to authenticate on the server side, and if you use Express Gateway scopes, you don’t even need to check whether the user is authorized to perform the requested action.
QUESTION
I am using a Redis DB to use an Express-Gateway on Heroku. I would like to know how to set Redis credentials as a unique URL-param, instead of using separated vars.
Right now, Express Gateway reads credentials from the file system.config.yml
, where credentials structure is
ANSWER
Answered 2020-Aug-28 at 13:43Express Gateway's configuration files support environment variables — check that out and you should be good to go!
QUESTION
I'm creating an express JS microservices architecture and I'm using express-gateway as an API gateway.
I can expose my services and endpoints through the express gateway , one of the services (Books) has 2 roles (admin, user) with 2 different login startegies (the admin uses JWT and the user uses Firebase auth).
I succeeded in security the admin endpoint /v1/admin with the JWT provided with express-gateway, now I want to create a policy / plugin (I didn't understand the difference) to involve my CheckIfAuthenticatedFirebase Middleware to secure my user endpoint /v1/user.
So I need some help to understand if I must create a plugin or a policy and the steps to do it.
Here is my gateway.config.yml :
...ANSWER
Answered 2020-Jun-03 at 22:21You have to create a policy and invoke it via plugin.
- Make a folder in your plugins directory, let's say folder name is auth.
- inside that auth folder, create a folder policies and a file manifest.js
- create a file auth.js inside policies folder.
- inside manifest.js write this piece of code
QUESTION
I'm deploying a microservices nodejs express application to GKE, I successfully deployed the services (one as Ingress service with static IP @ and one as NodePort service which will not be exposed to Internet).
Now I'm trying to deploy the api gateway which is an express-gateway application, I deployed it in first time as a LoadBalancer service and it's working , here is my service code :
...ANSWER
Answered 2020-Jun-01 at 22:35Do you have a default endpoint of all your scheduled pods? I mean "/" ? Ingress does the health check readiness prob inbuilt that checks if "/" is reachable or not. If not, it will declare it as unhealthy. Hope this helps.
QUESTION
I have deployed my express-gateway on Heroku, using env variables in this way in the gateway.config.yml
file:
ANSWER
Answered 2020-Jan-30 at 13:22You should not make listen both the http and the https server on the same port, otherwise it's going to fail.
Heroku provides its own router handling the SSL termination for you, so you can just remove the whole https
section.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install express-gateway
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page