How to configure JHipster microservice with cloudfoundry UAA - jhipster

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.

Related

Connect jhipster gateway without to uaa

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

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.

How to choose from jhipster uaa and jhipster keycloak?

As I'm choosing the central user authentication module, I found Jhipster provided uaa and keycloak/okta. In my opinion, keycloak may be more general as it is used by all kinds of applications and can easily integrate with other systems, but uaa seems to be well integrated with other jhipster modules. How can I choose from the two? Thanks!

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).

Non java services with jHipster

Can JHipster gateway work with non-java, non JHipster microservices? Say, by importing swagger.json of the target microsevrice and by making those microservice instances register with jH registry and UAA?
Yes it should work as long as the microservice exposes its swagger spec at /v2/api-docs. The service should register with the JHipster registry probably using Spring Cloud Netflix Sidecar as explained by David Steiman in this article and David is also the man behind UAA for JHipster.

Resources