Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Kyle Bowden
    @kyle-bowden
    Does anyone know if you can proxy a dynamic serviceEnpoint, e.g an endpoint that has a placeholder in its path that needs to be replaced with a value?
    Ghost
    @ghost~5dd05c5cd73408ce4fd13a2d
    Hello there. Can anyone tell me whether it's possible to use a unix socket as one of my serviceEndpoints, instead of a host:port address? Can it be used with the url property, and how? Thanks.
    I'm talking about a serviceEndpoint in the gateway.config.yml file.
    Andrey Litvinchuk
    @andreylitvinchuk
    Hi! Try to use oAuth authorization flow. I get interface with requesting access to account in express gateway UI. Can I tune flow so that this interface is skipped and all requesting scopes was approved by default?
    amalleIntesens
    @amalleIntesens
    Hi.
    I am looking for the solution to have custom user with basic-auth credentials ?
    I find how to choose the password but not the user witch end up being the apps ID.
    Regards
    Nguyen Cong Vu
    @nguyencongvu
    @cyppher Hi, I tried many times but not working, can you guide me how to request serviceEnpoint with querystring parameter, and serviceEnpoint with custom header? Many thanks ( @XVincentX again, no docs at all)
    Vincenzo Chianese
    @XVincentX
    @kyle-bowden Not supported
    balulvrs
    @balulvrs
    Hi i couldnt able to find any doc which explain how to add custom policy. can any one help me with steps and How can i add custom plugins without publishing them in npm
    Malys
    @malys
    @balulvrs Hi, you can copy your modules manually in node_modules or use npm link (virtual link creation) (see documnetation on internet)
    Kyle Bowden
    @kyle-bowden
    @XVincentX Thanks for the response, i ended up writing a custom plugin in the end to achieve what i wanted.
    amalleIntesens
    @amalleIntesens
    Hi, I have issues with Basic Auth / Redis performances.
    I created a stackoverflow post https://stackoverflow.com/questions/58977214/express-gateway-basic-auth-redis-performances-issue
    Maybe you can help me figure it out ?
    Ghost
    @ghost~5dd05c5cd73408ce4fd13a2d
    Is there a way to customize the "Cannot GET /xyz" page, or to specify custom behavior? Thanks for your advice.
    Grégory Lony
    @glony_gitlab
    How can I use EG with keycloak ? or any other auth providers ?
    Malys
    @malys
    @glony_gitlab see https://github.com/malys/awesome-express-gateway and keycloak plugins
    Grégory Lony
    @glony_gitlab
    Thank you !
    Do you think auth providers are the best way to manage authentications in eg ?
    Malys
    @malys
    I'm not a developer of eg and I'm discovering the product. But keyclaok eg plugin is based on nodejs keycloak adapter. I(s a clever solution because thsi adapter is maintained by keyclaok and it proposes full keycloak feature. I have to investigate its behaviour and management of session and cookie in HA mode with redis sentinel. Modiying code, it's possible to protect sub resource with different stategy (realm, client,...)If you are working on it, im' interested for your feedback @glony_gitlab
    Ghost
    @ghost~5dd05c5cd73408ce4fd13a2d
    I cannot get express-gateway to work with OAuth2 AND a GraphQL (POST) endpoint. OAuth2 with a regular GET endpoint works fine, and so does key-auth (or no auth) and the GraphQL POST endpoint. But OAuth2 and GraphQL together doesn't work. Can anyone point me in the right direction please? Something I forgot in my gateway.config.yml maybe?
    Ghost
    @ghost~5dd05c5cd73408ce4fd13a2d
    Never mind, I figured it out. It wasn't express-gateway itself, but rather the specific serviceEndpoint…
    Andrey Litvinchuk
    @andreylitvinchuk
    @Wassemoo you can run app this way LOG_LEVEL=debug npm start, and debug your requests
    davidrees
    @davidrees

    I couldn't find a way to make logging conditional on NODE_ENV other than to create a custom condition like this.
    In the condition file:

      handler: (conditionConfig) => () => (
        process.env[conditionConfig.variableName] === conditionConfig.expected
      )

    In the gateway config:

          - log:
            - condition:
                name: not
                condition:
                  name: environment-variable-match
                  variableName: NODE_ENV
                  expected: test

    Am I doing this the hard way? If not, should I publish this as a tiny plugin?

    Wassem Bnyan
    @Wassemoo
    I have soap service
    I've add it in services endpoints
    When I call in API endpoint
    I want come back to me Jason
    Is this possible?
    Ghost
    @ghost~5dd05c5cd73408ce4fd13a2d
    I'm having great difficulties making OAuth2 work with scopes. My specific question is: how do I request scopes from the OAuth2 flow? Scopes with key-auth works like a charm, but with OAuth2??? Help appreciated!
    Ghost
    @ghost~5dd05c5cd73408ce4fd13a2d
    When I add a &scope=name_of_my_scopeto the URL, I get an AuthorizationError: Unauthorized client!
    Malys
    @malys

    how to translate xml to json using express gateway

    https://www.npmjs.com/package/xml2json + custom EG plugin = community contribution :) @Wassemoo (https://github.com/ExpressGateway/express-gateway-plugin-example)

    tle209
    @tle209
    Does EG have any way to discovery the services?
    Ghost
    @ghost~5dd05c5cd73408ce4fd13a2d
    How do I have to configure an app like Insomnia or Postman to get an access token? I get it to work on a browser following the instructions on https://www.express-gateway.io/getting-started-with-oauth2/, but Insomnia gives me a "Failed to fetch token url=[url-to-api-gateway]/oauth2/token status=401". What am I doing wrong?
    (I'm talking about OAuth2 as means of authorization.)
    Vincenzo Chianese
    @XVincentX
    @tle209 Nope
    Ghost
    @ghost~5dd05c5cd73408ce4fd13a2d
    Has anyone any idea why /oauth2/token is returning a 401 error (I'm using Insomnia)? My client id is the id of the application created with eg apps create, but what is the client secret? Is /oauth2/token giving me a 401 (no authorization) because I didn't sent a client secret?
    Ghost
    @ghost~5dd05c5cd73408ce4fd13a2d
    Hello, please, I need some help here. I'm trying to run through the OAuth2 flow using cURL. On /oauth2/authorize I get a "Found. Redirecting to /login". Is there a way to send my basic-auth information using cUrl to avoid this redirection? I'm looking for a way to do the whole OAuth2 authentification thing over the command line, or using JavaScript's fetch. Any documentation I can read about this? Thanks…
    Ghost
    @ghost~5dd05c5cd73408ce4fd13a2d
    Update: I figured the login procedure over cURL out. Don't know how I missed that...
    ankit284
    @ankit284
    Hello, Can Express Gateway support 2 way SSL?
    xhahid43eb
    @xhahid43eb
    hey, how we can increase request data limit using express-gateway. I face issue while submitting a survey form .
    Andri Laksono
    @AndriLaksono
    I'm trying jwt on express-gateway. But from the configuration gateway.config.yml it is in accordance with the documentation. but, thats always return unautorized. my gateway.config.yml:
    http:
      port: 8080
    admin:
      port: 9876
      host: localhost
    apiEndpoints:
      authAPI:
        host: localhost
        paths:
          - '/users/signin'
          - '/users/signup'
          - '/users/oauth/facebook'
          - '/users/auth/google'
          - '/users/auth/google/callback'
          - '/users/secret'
          - '/users/get-user-google'
          - '/dashboard'
      crudAPI:
        host: localhost
        paths:
          - '/users/get-user-data'
          - '/users/delete-user-data'
          - '/users/add-user-data'
          - '/users/get-one-user-data/*'
          - '/users/update-user-data'
          - '/users/update-pass-user-data'
    serviceEndpoints:
      authService:
        url: 'http://localhost:3003'
      crudService:
        url: 'http://localhost:3004'
    policies:
      - log
      - oauth2
      - proxy
      - jwt
    pipelines:
      crud:
        apiEndpoints:
          - crudAPI
        policies:
          - log:
              - action:
                  message: "here"
          - jwt:
              - action:
                  secretOrPublicKey: secretAuth
                  checkCredentialExistence: false
                  # passThrough: true
          - proxy:
              - action:
                  serviceEndpoint: crudService 
                  changeOrigin: true
      auth:
        apiEndpoints:
          - authAPI
        policies:
          - log:
              - action:
                  message: "here auth"
          - proxy:
              - action:
                  serviceEndpoint: authService
    if passThrough set to true (or uncomment) its work correctly. something went wrong?
    help
    balulvrs
    @balulvrs
    Can some one help me in solving this below error and what is this redirectUrl field?
    Configuring yargs through package.json is deprecated and will be removed in a future major release, please use
    the JS API instead.
    ? Enter firstname [required]: bala
    ? Enter lastname [required]: subramanyam
    ? Enter username [required]: bala
    ? Enter email: balupamujula@gmail.com
    ? Enter redirectUri: http://localhost:8080/api/v1/
    × connect ECONNREFUSED 127.0.0.1:9876
    PS E:\incedo-training-project\scalable-microservices\egateway> eg users create? Enter username [required]: bala
    ? Enter email: balupamujula@gmail.com
    ? Enter redirectUri: http://localhost:3002/api/v1/
    × connect ECONNREFUSED 127.0.0.1:9876
    PS E:\incedo-training-project\scalable-microservices\egateway>
    DarikaShasai
    @DarikaShasai
    anyone know how can i resolve this? i can't call to endPoints in my app on angular 'cause only executes one. I recive this error.
    Matt Essenburg
    @codersbrew
    Hola! We are using Express-Gateway in a K8s (Kubernetes) setup. We have noticed as we scale express-gateway pods up there tends to be some 502 errors when express-gateway connects to services (pods) behind it and defined in the apiEndpoints. Has anyone experienced this using K8s with gateway?
    Matt Essenburg
    @codersbrew
    This project dead?
    Malys
    @malys
    @codersbrew the project is not dead (see github https://github.com/ExpressGateway/express-gateway/commits/master) but the community is not active. It's perhaps the weak point of this product :(
    Matt Essenburg
    @codersbrew
    @malys are you aware of anyway to setup debugging logs across the policies? I'd like to see why the proxy isn't forwarding out some requests. Or if it is, if it's timing out with the request from proxy to a service behind it.
    Malys
    @malys
    @codersbrew You can try LOG_LEVEL=debug or export DEBUG=*
    Matt Essenburg
    @codersbrew
    thanks!
    Christophe Nouguier
    @cnouguier
    Hi guys, is there any chance to provide a given password when creating a basic-auth credential ?
    Christophe Nouguier
    @cnouguier
    I finally succeeded:
    eg crendentials create -t basic-auth -c <your-consumer-id> -p "password=<your-password>"
    Matt Essenburg
    @codersbrew
    It seems as if once pods scale up and down there is an issue with how EG's proxy resolves DNS. It may also be at the kubeDNS level