spring - Calling secured endpoint by scheduler using Feign Client -
i have simple microservices architecture:
- api gateway
- service registry
- uaa service (user data , token generation; use oauth2 , jwt)
- core services, let's service_a , service_b
the flow looks this: user gives credentials, api gateway passes them uaa-service, being validated, uaa-service generates jwt , returns user. access token attached every request, service_a , service_b can authenticate , authorize incoming requests. nothing fancy it.
the problem i've created scheduler, running in service_a, gathers data service_a , service_b , saves in database. problem is, endpoints of service_b secured , need access token able call service_b.
how should deal such issues? can see 3 options:
- copy keystore.jks uaa-service service_a , generate token manually
- replace oauth simple basic authentication service_b endpoints
- generate manually jwt validity set 20 years, store in service_b , use forever
neither of nice solutions, 1 option 3.
thoughts?
Comments
Post a Comment