mosip / registration

This repository contains modules for registration of an Individual
Mozilla Public License 2.0
4 stars 171 forks source link

Can't login to Registration Client 1.1.3 #663

Closed almontasser closed 3 years ago

almontasser commented 3 years ago

I've installed registration client, and it starts up, then I've added client name, public key, key index, to machine_master table, and assigned regcntrid to 10001, then created a user in keycloak gave him REGISTRATION* roles, and gave him an attribute of rid='10001', but I cant login in the registration client, it gives me an alert box with "Unable to get Authentication Token".

registration.log:

2021-01-11T14:39:38+02:00 - [io.mosip.registration.controller.auth.LoginController] - INFO  - REGISTRATION - LOGIN - LOGIN_CONTROLLER - REGISTRATION - REG - Validating Credentials entered through UI
2021-01-11T14:39:40+02:00 - [io.mosip.registration.controller.BaseController] - INFO  - REGISTRATION - BASE - BASE_CONTROLLER - REGISTRATION - REG - Fetching value from application Context
2021-01-11T14:39:40+02:00 - [io.mosip.registration.controller.BaseController] - INFO  - REGISTRATION - BASE - BASE_CONTROLLER - REGISTRATION - REG - Fetching value from application Context
2021-01-11T14:39:40+02:00 - [io.mosip.registration.controller.BaseController] - INFO  - REGISTRATION - BASE - BASE_CONTROLLER - REGISTRATION - REG - Fetching value from application Context
2021-01-11T14:39:41+02:00 - [io.mosip.registration.controller.BaseController] - INFO  - REGISTRATION - BASE - BASE_CONTROLLER - REGISTRATION - REG - Fetching value from application Context
2021-01-11T14:39:41+02:00 - [io.mosip.registration.controller.BaseController] - INFO  - REGISTRATION - BASE - BASE_CONTROLLER - REGISTRATION - REG - Fetching value from application Context
2021-01-11T14:39:41+02:00 - [io.mosip.registration.controller.BaseController] - INFO  - REGISTRATION - BASE - BASE_CONTROLLER - REGISTRATION - REG - Fetching value from application Context
2021-01-11T14:39:42+02:00 - [io.mosip.registration.controller.BaseController] - INFO  - REGISTRATION - BASE - BASE_CONTROLLER - REGISTRATION - REG - Fetching value from application Context
2021-01-11T14:39:42+02:00 - [io.mosip.registration.controller.BaseController] - INFO  - REGISTRATION - BASE - BASE_CONTROLLER - REGISTRATION - REG - Fetching value from application Context
2021-01-11T14:39:42+02:00 - [io.mosip.registration.controller.BaseController] - INFO  - REGISTRATION - BASE - BASE_CONTROLLER - REGISTRATION - REG - Fetching value from application Context
2021-01-11T14:39:42+02:00 - [io.mosip.registration.controller.BaseController] - INFO  - REGISTRATION - BASE - BASE_CONTROLLER - REGISTRATION - REG - Fetching value from application Context
2021-01-11T14:39:42+02:00 - [io.mosip.registration.controller.auth.LoginController] - INFO  - REGISTRATION - LOGIN - LOGIN_CONTROLLER - REGISTRATION - REG - Validating Credentials entered through UI
2021-01-11T14:39:42+02:00 - [io.mosip.registration.service.login.impl.LoginServiceImpl] - INFO  - REGISTRATION - LOGIN - LOGIN_SERVICE - REGISTRATION - REG - Fetching User details
2021-01-11T14:39:43+02:00 - [io.mosip.registration.dao.impl.UserDetailDAOImpl] - INFO  - REGISTRATION - USER_DETAIL - REGISTRATION_USER_DETAIL_DAO_IMPL - REGISTRATION - REG - Fetching User details
2021-01-11T14:39:43+02:00 - [io.mosip.registration.dao.impl.UserDetailDAOImpl] - INFO  - REGISTRATION - USER_DETAIL - REGISTRATION_USER_DETAIL_DAO_IMPL - REGISTRATION - REG - User details fetched successfully
2021-01-11T14:39:43+02:00 - [io.mosip.registration.service.login.impl.LoginServiceImpl] - INFO  - REGISTRATION - LOGIN - LOGIN_SERVICE - REGISTRATION - REG - Completed fetching User details
2021-01-11T14:39:43+02:00 - [io.mosip.registration.util.healthcheck.RegistrationAppHealthCheckUtil] - INFO  - REGISTRATION - REGISTRATION APP HEALTHCHECK UTIL - ISNETWORKAVAILABLE - REGISTRATION - REG - Registration Network Checker had been called.
2021-01-11T14:39:43+02:00 - [io.mosip.registration.util.healthcheck.RegistrationAppHealthCheckUtil] - INFO  - REGISTRATION - SERVICE_DELEGATE_UTIL - PREPARE_POST_REQUEST - REGISTRATION - REG - Mosip Host name in environment variables : console.sb
2021-01-11T14:39:43+02:00 - [io.mosip.registration.util.healthcheck.RegistrationAppHealthCheckUtil] - INFO  - REGISTRATION - REGISTRATION APP HEALTHCHECKUTIL - ISNETWORKAVAILABLE - REGISTRATION - REG - Internet Access Available.====>200
2021-01-11T14:39:43+02:00 - [io.mosip.registration.context.SessionContext] - INFO  - REGISTRATION - LOGIN - LOGIN_CONTROLLER - REGISTRATION - REG - Entering into creating Session Context
2021-01-11T14:39:43+02:00 - [io.mosip.registration.util.restclient.AuthTokenUtilService] - INFO  - AUTH_REFRESH_TOKEN_UTIL - REGISTRATION - REG - Fetching Auth Token and refresh token based on Login Mode >>> PASSWORD
2021-01-11T14:39:43+02:00 - [io.mosip.registration.util.restclient.AuthTokenUtilService] - INFO  - AUTH_REFRESH_TOKEN_UTIL - REGISTRATION - REG - Preparing URI for web-service
2021-01-11T14:39:43+02:00 - [io.mosip.registration.util.restclient.AuthTokenUtilService] - INFO  - AUTH_REFRESH_TOKEN_UTIL - REGISTRATION - REG - Completed preparing URI for web-service >>>>>>> https://console.sb/v1/syncdata/authenticate/useridpwd
2021-01-11T14:39:43+02:00 - [io.mosip.registration.util.restclient.RestClientUtil] - DEBUG - REGISTRATION - REST_CLIENT_UTIL - INVOKE Token - REGISTRATION - REG - invoke token method called
2021-01-11T14:39:43+02:00 - [io.mosip.registration.util.restclient.RestClientUtil] - DEBUG - REGISTRATION - REST_CLIENT_UTIL - INVOKE - REGISTRATION - REG - invoke method ended
2021-01-11T14:39:43+02:00 - [io.mosip.registration.exception.RegBaseCheckedException] - ERROR - REGISTRATION - CHECKED_EXCEPTION - REGISTRATION - REG - REG-SDU-005-->Auth token received from the authentication web-service is either null or empty
2021-01-11T14:39:43+02:00 - [io.mosip.registration.util.restclient.AuthTokenUtilService] - ERROR - AUTH_REFRESH_TOKEN_UTIL - REGISTRATION - REG - io.mosip.registration.exception.RegBaseCheckedException: REG-SDU-005 --> Auth token received from the authentication web-service is either null or empty
    at io.mosip.registration.util.restclient.AuthTokenUtilService.getAuthTokenResponse(AuthTokenUtilService.java:233)
    at io.mosip.registration.util.restclient.AuthTokenUtilService.getAuthTokenAndRefreshToken(AuthTokenUtilService.java:195)
    at io.mosip.registration.util.restclient.AuthTokenUtilService.getAuthTokenAndRefreshToken(AuthTokenUtilService.java:162)
    at io.mosip.registration.context.SessionContext.validateInitialLogin(SessionContext.java:190)
    at io.mosip.registration.context.SessionContext.create(SessionContext.java:165)
    at io.mosip.registration.controller.auth.LoginController.validateCredentials(LoginController.java:509)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.javafx.reflect.Trampoline.invoke(Unknown Source)
    at jdk.internal.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at javafx.base/com.sun.javafx.reflect.MethodUtil.invoke(Unknown Source)
    at javafx.fxml/com.sun.javafx.fxml.MethodHelper.invoke(Unknown Source)
    at javafx.fxml/javafx.fxml.FXMLLoader$MethodHandler.invoke(Unknown Source)
    at javafx.fxml/javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source)
    at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
    at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
    at javafx.graphics/javafx.scene.Node.fireEvent(Unknown Source)
    at javafx.controls/com.sun.javafx.scene.control.behavior.TextFieldBehavior.fire(Unknown Source)
    at javafx.controls/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$keyMapping$62(Unknown Source)
    at javafx.controls/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
    at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
    at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
    at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
    at javafx.graphics/javafx.scene.Scene$KeyHandler.process(Unknown Source)
    at javafx.graphics/javafx.scene.Scene.processKeyEvent(Unknown Source)
    at javafx.graphics/javafx.scene.Scene$ScenePeerListener.keyEvent(Unknown Source)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(Unknown Source)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(Unknown Source)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(Unknown Source)
    at javafx.graphics/com.sun.glass.ui.View.handleKeyEvent(Unknown Source)
    at javafx.graphics/com.sun.glass.ui.View.notifyKey(Unknown Source)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

2021-01-11T14:39:43+02:00 - [io.mosip.registration.exception.RegBaseCheckedException] - ERROR - REGISTRATION - CHECKED_EXCEPTION - REGISTRATION - REG - REG-SDU-005-->Auth token received from the authentication web-service is either null or empty
2021-01-11T14:39:43+02:00 - [io.mosip.registration.controller.reg.AlertController] - INFO  - REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert generation has been started
2021-01-11T14:39:43+02:00 - [io.mosip.registration.controller.reg.AlertController] - INFO  - REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert generation has been ended
2021-01-11T14:39:44+02:00 - [io.mosip.registration.controller.reg.AlertController] - INFO  - REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert closing has been started
2021-01-11T14:39:44+02:00 - [io.mosip.registration.controller.reg.AlertController] - INFO  - REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert closing has been ended
2021-01-11T14:39:44+02:00 - [io.mosip.registration.controller.reg.AlertController] - INFO  - REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert closing has been started
2021-01-11T14:39:44+02:00 - [io.mosip.registration.controller.reg.AlertController] - INFO  - REGISTRATION - ALERT_CONTROLLER - ALERT_GENERATION - REGISTRATION - REG - Alert closing has been ended
almontasser commented 3 years ago

I've debugged the registration client, when sending the login request, the request returns an error Machine not found, which is weird, because I've added my machine to the database, all as described in the docs.