• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

How to have a microservice authenticates a user after coming through Zuul gateway?

 
Bartender
Posts: 2265
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am practicing with my instructor's code.
I have a @RibbonClient ("currency-exchange-service). Currency exchange service is a secure microservice with basic authentication features (using username/password).
Currency conversion microservice sends a request which goes through my Zuul gateway and then go to currency exchange service.
In the code of conversion service , I have @FeignClient("zuul-gateway-service)

In currency exchange service, I have a basic authentication request interceptor bean to accept the username password read from a properties file.

My problem is the request cannot be authenticated after it goes through the Zuul gateway. I cannot search for a solution.
How can the request be authenticated by the ribbon client, currency exchange after it goes through Zuul.

Here is my code:
currency conversion service:
https://github.com/aCodeRancher/spring-microservices/tree/master/03.microservices/currency-conversion-service

currency exchange service:
https://github.com/aCodeRancher/spring-microservices/tree/master/03.microservices/currency-exchange-service

Zuul gateway services that intercepts currency conversion service request:
https://github.com/aCodeRancher/spring-microservices/tree/master/03.microservices/netflix-zuul-api-gateway-server

Eureka service that registers the above services:
https://github.com/aCodeRancher/spring-microservices/tree/master/03.microservices/netflix-eureka-naming-server

Thanks.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic