I created new JHipster microservice application for demo purpose. I used JHipster Registry version 4.1.1 and create a new UAA application. Both applications started without error.
I want to show UAA application metrics in Registry Dashboard (Administration -> Metrics) but it cannot display and logout JHipster Registry automatically. There is a log line in UAA application:
Enter: com.mycompany.repository.CustomAuditEventRepository.add() with argument[s] = [AuditEvent [timestamp=2019-03-19T19:35:08.979Z, principal=access-token, type=AUTHENTICATION_FAILURE, data={type=org.springframework.security.authentication.BadCredentialsException, message=Cannot convert access token to JSON}]]
Please let me know how to fix this problem.
When using the UAA architecture for microservices, the JHipster Registry needs to run with the uaa
profile to properly manage the registered services. Otherwise, it expects the services to use JWT by default.
The gateway's docker-compose file for the registry (src/main/docker/jhipster-registry.yml
) comes preconfigured with the uaa
profile. If you launch the JHipster Registry some other way (such as a git clone or WAR file), make sure it includes the uaa
profile.