Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

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

 
Bartender
Posts: 1955
13
  • Mark post as helpful
  • send pies
  • 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.
 
Die Fledermaus does not fear such a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic