sword fails authentication for DSpace 7.6.1

98 views
Skip to first unread message

Joyner Library

unread,
Jun 4, 2024, 12:27:39 PM6/4/24
to DSpace Technical Support
Hi All,

We have enabled sword version 1 in the local configuration but haven't changed other sword settings. I can sign on to the frontend and /server too. When we try to download https://irdev.ecu.edu/server/sword/servicedocument it gives the white label error page. The DSpace log file shows:

INFO  unknown 4f89ae89-9baf-49cc-b800-3205dbddef5d org.dspace.authenticate.LDAPAuthentication @ anonymous:session_id=0:ip_addr=150.216.*.*:auth:attempting trivial auth of user=crimin

2024-06-04 12:00:32,819 ERROR unknown unknown org.springframework.boot.web.servlet.support.ErrorPageFilter @ Forwarding to error page from request [/sword/servicedocument] due to exception [java.lang.NullPointerException: Cannot invoke "javax.servlet.http.HttpServletRequest.setAttribute(String, Object)" because "request" is null]

How do I sign on successfully to the sword service?

Nick Crimi
ECU Libraries

DSpace Technical Support

unread,
Jun 7, 2024, 4:46:27 PM6/7/24
to DSpace Technical Support
Hi Nick,

I think the answer may be that SWORD doesn't support LDAP authentication (and it looks like that's what you are using based on the logs you shared).  SWORD *only supports* PasswordAuthentication (DSpace's internal authentication system).   So, to login to SWORD, you'd need to use an internally stored username & password.

Tim

mw...@iu.edu

unread,
Jun 10, 2024, 3:23:56 PM6/10/24
to dspac...@googlegroups.com
On Fri, Jun 07, 2024 at 08:46:27PM +0000, DSpace Technical Support wrote:
> I think the answer may be that SWORD doesn't support LDAP authentication (and it looks like that's what you are using based on the logs you shared). SWORD *only supports* PasswordAuthentication (DSpace's internal authentication system). So, to login to SWORD, you'd need to use an internally stored username & password.
>
> Tim

There's the today answer (use password authentication) and there's the
todo answer (this should not have errored, and probably should not
have failed).

LDAP authentication as implemented in DSpace uses a username/password
pair so, if this isn't working, it's probably broken rather than
impossible. The result is an NPE, which IMHO is always an indicator
of code that needs fixing. The site of the NPE from the stack trace
should suggest how we came to be setting attributes on a nonexistent
request. Although it seems fairly obvious:
'o.d.sword.SWORDAuthenticator.authenticates' passes a null
'HttpServletRequest' to 'AuthenticationService.authenticate', and that
service would pass it on down to 'LDAPAuthentication.authenticate' if
so configured.

(Noted in passing: there's another class o.d.sword.SWORDAuthentication
with an identically named method, which class seems to be used nowhere
in DSpace.)

We need a Github Issue for this. It's probably best if it comes from
someone who's actually observed the problem and can provide logs.

> On Tuesday, June 4, 2024 at 11:27:39 AM UTC-5 Joyner Library wrote:
--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
library.indianapolis.iu.edu
signature.asc

Joyner Library

unread,
Jun 11, 2024, 2:15:30 PM6/11/24
to DSpace Technical Support
Hi All,

Creating an account through CLI allowed me to download the service document. Vireo 4 is happy and able to deposit dissertations using SWORD client.

Thank you!

Sean Kalynuk

unread,
Jun 11, 2024, 2:28:35 PM6/11/24
to Joyner Library, DSpace Technical Support

Make sure that if you’re using SWORDv1, the account may require ADMIN privileges on the collection due to this bug:

 

https://github.com/DSpace/DSpace/issues/8647

 

Simply adding the user to a SUBMIT group will not work. I have seen this in our DSpace 7.5 instance.

 

-- 

Sean

 

From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Joyner Library <joyn...@gmail.com>
Date: Tuesday, June 11, 2024 at 1:15
PM
To: DSpace Technical Support <dspac...@googlegroups.com>
Subject: Re: [dspace-tech] Re: sword fails authentication for DSpace 7.6.1

Caution! This message was sent from outside the University of Manitoba.

 

--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/3c7d1871-42b6-4f9c-82b3-ede1bff3a393n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages