Connect jhipster gateway without to uaa - jhipster

I have jhipster app using juste gate and microservice. Now I'm on another project using gateway, uaa and microservice and I want to use the uaa with my other gateway. But I don't exactly the config to change in the gateway to do that.
Thanks in advance

Related

Create jhipster monolithic UAA application

I'd like to generate with jHipster an UAA like application with the front end and backend in a monolithic application. I'd like to use the uaa Oauth2 server in order to connect with other application. Am i forced to generate a gateway + registry + uaa in order to achieve that?
Nope, in monolith all necessary oauth2 routine services will be there
UAA is not intended to works with monolith application, only in microservices environment.
If you want to have an SSO login with oauth2 I suggest you to generate your monolith with oauth2 option. Then you can choose between both Okta and keycloak.
JHipster provides docker-compose config to run a keycloak with docker (https://www.jhipster.tech/security/#oauth2).
Hope this can help you.

Gateway and JHipster UAA should connect with Jhipster-register?

I have some questions regarding the creation of Microservice gateway and Jhipster UAA.
When I generate the gateway connects with Jhipster-register and when I generate the JHipster UAA too?
In other words: Both should connect with Jhipster-register?
The image of the architecture diagram found in this Jhipster documentation creates the doubt: Using JHipster UAA for Microservice Security - Architecture diagram
Yes, all services including the gateway, UAA, and any microservices will connect to JHipster Registry. This allows the services to fetch the necessary information from the UAA to authenticate users and validate JWT tokens (passed via cookies).

How to change route of jhipster microservice

I developed a microservice application with these :
Jhipster registry
Uaa
Gateway
Microservice1
I want to deploy this in production on different server, but I don't want to use IP to access to microservices.
How can I launch microservice1 and uaa to say to the registry that they need to be called with these URLs :
uaa.myapp.com
microservice1.myapp.com

How to configure JHipster microservice with cloudfoundry UAA

Is there a way to configure JHipster microservice application with the Cloudfoundry UAA?
During generation of microservice application with Yeoman JHipster generator it gives us an option to select UAA application provided by JHipster for authentication. However I don't want to use UAA application provided by JHipster.
I have other applications in cloudfoundry which use UAA instance provided by Cloudfoundry. So I want to configure the same with JHipster.
Any help is appreciated.

Where is the #AuthorizedFeignClient in Jhipster Release 3.11.0?

I have setup my Jhipster Uaa server, gateways and others micro services and i want to use #AuthorizedFeignClient annotation for inter-service-communication as well explained here : https://jhipster.github.io/using-uaa/
But i cannot find it into the java source generated(Jhispter Release 3.11.0).
Did i have to copy manually in my project this only 2 classes found in jhispter github generator for the moment ? (because still in beta ?) :
.../client/_AuthorizedFeignClient.java
and
.../client/_OAuth2InterceptedFeignConfiguration.java
Thanks,
Francois
currently the #AuthorizedFeignClient annotation is only available for microservice applications using UAA as authentication type, but not for gateways and UAA server itself!
I guess you were looking for the annoation in the gateway, or the the UAA server.
Why is this like this? For the gateway it is because the gateway already has a couple of responsibilities, so building composite logic in there is not a good idea.
If you generate a microservice (not gateway, not uaa server), you should have the client package in your Java root with this annoatation, as well as some more configurations (feign client config, load balanced resource details...)
You can copy those to your gateway, to make it working there.
You can copy them to the UAA, too. More on that, this even will work, but with some weird fact...when UAA will ask service "foo" for some data, it will first ask the UAA for a client credentials authentication....like performing a query to itself...while it could just access grant it itself. There is no accurate way to do it, but I didn't want to keep it in this uncool way in JHipster, so the annotation is for microservice only.

Resources