dgradecak / alfresco-jwt-auth

Alfresco Identity Service without Keycloak - but with a custom signed JWT
Apache License 2.0
10 stars 6 forks source link

Unable to redirect to share admin dashboard #1

Closed smb192 closed 3 years ago

smb192 commented 3 years ago

Hi, Tried the configuration given in the ReadMe,but still share is not able to receive the token. Below are the share logs

 Caused by: org.springframework.extensions.surf.exception.UserFactoryException: Unable to create user - failed to retrieve user metadata:

^[[34mshare_1 |^[[0m at org.springframework.extensions.surf.support.AlfrescoUserFactory.loadUser(AlfrescoUserFactory.java:185)

 ERROR [alfresco.web.site] [http-nio-8080-exec-2] org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.extensions.surf.exception.UserFactoryException: Unable to retrieve user from repository

^[[34mshare_1 |^[[0m org.springframework.extensions.surf.exception.UserFactoryException: Unable to retrieve user from repository

Share config changes

true
     <connector>
        <id>alfrescoCookie</id>
        <name>Alfresco Connector</name>
        <description>Connects to an Alfresco instance using cookie-based authentication</description>
        <class>org.alfresco.web.site.servlet.SlingshotAlfrescoConnector</class>
     </connector>

     <connector>
        <id>alfrescoHeader</id>
        <name>Alfresco Connector</name>
        <description>Connects to an Alfresco instance using header and cookie-based authentication</description>
        <!--<class>com.gradecak.alfresco.share.authorization.JwtAuthorizationAlfrescoConnector</class>
        <class>org.alfresco.web.site.servlet.SlingshotAlfrescoConnector</class>-->
        <class>com.gradecak.alfresco.share.authorization.JwtAuthorizationAlfrescoConnector</class>
        <userHeader>X-Alfresco-Remote-User</userHeader>
        <jwtHeader>WEB_TOKEN</jwtHeader>
     </connector>

Please help us what could be the reason for the error in share.

dgradecak commented 3 years ago

Hi Sorry for my late reply ... I somehow missed your question here.

alfresco has a feature to create missing people by setting in global properties create.missing.people=true

I recommend to either create the user in advance, either synchronize it from a remote server or add that property

dgradecak commented 3 years ago

@smb192 any feedback on this? is it ok to close the issue if it works for you?

dgradecak commented 3 years ago

feel free to reopen it