Kia ora Tim,
Thank you for the response! Those were useful places to check.
These are separate API requests, but all of them are using the same JWT that was issued via a call to /authn/login. The process is to authenticate, and then use the received JWT to make a series of requests.
Thanks for pointing out the sessionSalt; I’ve checked the logs again, and the sessionSalt for the EPerson has the same value for every call the tests make – except the one that is failing, as you noted. I’ve included some of the relevant hibernate log lines:
Line 35779: 2023-11-14 11:28:51,313 DEBUG unknown unknown org.hibernate.engine.internal.TwoPhaseLoad @ Processing attribute `sessionSalt` : value = LZ0MyzKNja8CngVszdQNKK4rasVLKsVm
Line 35780: 2023-11-14 11:28:51,313 DEBUG unknown unknown org.hibernate.engine.internal.TwoPhaseLoad @ Attribute (`sessionSalt`) - enhanced for lazy-loading? - false
Line 35820: 2023-11-14 11:28:51,329 DEBUG unknown unknown org.hibernate.engine.internal.TwoPhaseLoad @ Processing attribute `sessionSalt` : value = LZ0MyzKNja8CngVszdQNKK4rasVLKsVm
Line 35821: 2023-11-14 11:28:51,329 DEBUG unknown unknown org.hibernate.engine.internal.TwoPhaseLoad @ Attribute (`sessionSalt`) - enhanced for lazy-loading? - false
Line 36242: 2023-11-14 11:28:51,350 DEBUG unknown unknown org.hibernate.engine.internal.TwoPhaseLoad @ Processing attribute `sessionSalt` : value =
Line 36243: 2023-11-14 11:28:51,350 DEBUG unknown unknown org.hibernate.engine.internal.TwoPhaseLoad @ Attribute (`sessionSalt`) - enhanced for lazy-loading? - false
Line 36912: 2023-11-14 11:28:51,426 DEBUG unknown unknown org.hibernate.engine.internal.TwoPhaseLoad @ Processing attribute `sessionSalt` : value = LZ0MyzKNja8CngVszdQNKK4rasVLKsVm
If the JWT had actually been invalidated or expired, I would not expect the subsequent calls to authenticate successfully using the same JWT. I would also anticipate that the sessionSalt would be different (per https://github.com/DSpace/DSpace/blob/50b47b707ccc4f0d7ed3887f08f0a88a39686f29/dspace-server-webapp/src/main/java/org/dspace/app/rest/security/jwt/JWTTokenHandler.java#L402C31-L402C31). I’m wondering if the issue is occurring during the retrieval, caching, or instantiation of the EPerson. Whether within DSpace or some issue with the database.
It’s a bit of a head-scratcher, because when I run the API calls in isolation, they all work perfectly. It’s only when I run the entire suite that this happens. I’d suggest some sort of race condition, but it’s always failing in the same location. I initially thought it was a expiry or timeout – but the JWT is valid for 30 minutes, and this occurs in a matter of seconds.
Ngā mihi,
Ori Atkins (any pronouns)
Systems and Integration Developer
Te Pātaka Kōrero | The Library
Te Herenga Waka—Victoria University of Wellington
|
Phone +64 4 463 5520 |
|
www.wgtn.ac.nz | 0800 04 04 04 |
NB: I am on the autistic spectrum, please be clear and direct in your replies
--
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 a topic in the Google Groups "DSpace Technical Support" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/dspace-tech/JIUBkNfVtXk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
dspace-tech...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dspace-tech/8b749ac0-6410-4783-922c-8377a291c296n%40googlegroups.com.