{"action":"opened","issue":{"url":"https://api.github.com/repos/GluuFederation/oxTrust/issues/973","repository_url":"https://api.github.com/repos/GluuFederation/oxTrust","labels_url":"https://api.github.com/repos/GluuFederation/oxTrust/issues/973/labels{/name}","comments_url":"https://api.github.com/repos/GluuFederation/oxTrust/issues/973/comments","events_url":"https://api.github.com/repos/GluuFederation/oxTrust/issues/973/events","html_url":"https://github.com/GluuFederation/oxTrust/issues/973","id":318318155,"number":973,"title":"AuthenticationService.authenticate always returns false for a custom attribute defined in Gluu ","user":{"login":"burcinbozkurt","id":38779700,"avatar_url":"https://avatars0.githubusercontent.com/u/38779700?v=4","gravatar_id":"","url":"https://api.github.com/users/burcinbozkurt","html_url":"https://github.com/burcinbozkurt","followers_url":"https://api.github.com/users/burcinbozkurt/followers","following_url":"https://api.github.com/users/burcinbozkurt/following{/other_user}","gists_url":"https://api.github.com/users/burcinbozkurt/gists{/gist_id}","starred_url":"https://api.github.com/users/burcinbozkurt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burcinbozkurt/subscriptions","organizations_url":"https://api.github.com/users/burcinbozkurt/orgs","repos_url":"https://api.github.com/users/burcinbozkurt/repos","events_url":"https://api.github.com/users/burcinbozkurt/events{/privacy}","received_events_url":"https://api.github.com/users/burcinbozkurt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-27T08:17:37Z","updated_at":"2018-04-27T08:17:37Z","closed_at":null,"author_association":"NONE","body":"We have a custom authentication script developed in Gluu 2.4.4.sp2 on Centos 7.\r\n\r\nWe have a custom attribute \"ID\" that is defined for a person.\r\n\r\ndef authenticate(self, configurationAttributes, requestParameters, step):\r\n        context = Contexts.getEventContext()\r\n        sessionStateService = SessionStateService.instance()\r\n        sessionState = sessionStateService.getSessionState()\r\n        sessionAttributes = sessionState.getSessionAttributes()\r\n        print \"AkisIDExternalAuthenticator. Authenticate. Session State ID: %s\" % sessionState.getId()\r\n\r\n        context.set(\"keyOpErrorMsg\", \"\")\r\n\r\n        if (step == 1):\r\n            print \"AkisIDExternalAuthenticator. Authenticate for step 1\"\r\n\r\n            ''' Getting captcha from request '''\r\n\r\n            logged_in = False\r\n            tckn = eCertificate.getSubject().getSerialNumberAttribute()\r\n\r\n            print \"TCKN = %s\" % tckn\r\n            if (StringHelper.isNotEmptyString(tckn)):\r\n                userService = UserService.instance()\r\n        authenticationService = AuthenticationService.instance()\r\n\r\n                #logged_in = userService.authenticate(tckn)\r\n                logged_in = authenticationService.authenticate(tckn)\r\n\r\n        print \"AuthenticationService is initialized %s\" % logged_in\r\n            print \"Logged in %s\" % logged_in\r\n\r\n            if (not logged_in):\r\n                nameSurname = eCertificate.getSubject().getCommonNameAttribute()\r\n                print \"NameSurnameFromServer: %s\" % nameSurname\r\n                context.set(\"registerMsg\", \"Kimlik dogrulama basarisiz !!!\")\r\n                context.set(\"tckk_count_login_steps\", 2)\r\n                context.set(\"tcknFromServer\", tckn)\r\n                context.set(\"nameSurnameFromServer\", nameSurname)\r\n\r\n            return True\r\n\r\nI debug the code and authenticationService.authenticate(tckn) always returns false. The user with the parameter tckn already exists in Gluu and there exists no other exception in the code.\r\n\r\nSame holds for userService.authenticate(tckn)."}}
{"actor":{"display_login":"burcinbozkurt"}}