It's quite strange. I only receive this 401 error when i'm trying to access to "processes" log and csv (metadata-import) bitstreams but when i access to a article bitstream (pdf, docx) i can download it.
I've been reading CSRF and CORS error but I was analyzing browser developer tools, request and cookies. Token and samesite (Lex) cookie have got values both. I don't know, I'm using a testing environment in the same domain: UI Front End: localhost.local:4000 Back End: localhost.local:8080 Perhaps should I configure SSL for local testing environment?? Thanks El lunes, 11 de julio de 2022 a las 18:00:09 UTC+2, Tim Donohue escribió: > Hi Vicente, > > This is just a guess, but it's possible you have some sort of > misconfiguration between the frontend & backend which is causing the > frontend to not be "trusted" by the backend. > > You should check our troubleshooting guide and see if there are any errors > in your Browser's DevTools: > https://wiki.lyrasis.org/display/DSPACE/Troubleshoot+an+error#Troubleshootanerror-DSpace7.x(orabove) > > It might be that you are hitting a CSRF token issue, or a CORS error, or > similar. If so, the solution to those are in our Common Installation > Issues listed here: > https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-CommonInstallationIssues > > Good luck & if you need more help let us know on this list. > > Tim > ------------------------------ > *From:* [email protected] <[email protected]> on behalf > of Vicente Zapatero Martin <[email protected]> > *Sent:* Thursday, July 7, 2022 6:43 AM > *To:* DSpace Technical Support <[email protected]> > *Subject:* [dspace-tech] Re: Export Metadata Unauthorized 401 > > I add these screenshots.When I clicked in file I get "sprint Whitelable > Error Page". > [image: log-process.png][image: log-process-downloadbits.png] > > El miércoles, 6 de julio de 2022 a las 14:31:11 UTC+2, Vicente Zapatero > Martin escribió: > > I can't download any bitstream. Metadata csv's files, etc. In version > dspace 7.3 I have the same error. Surely I forgot any configuration. > > Any idea? > > Thanks. > > El lunes, 20 de junio de 2022 a las 14:16:21 UTC+2, Vicente Zapatero > Martin escribió: > > After export metadata from "Export\Metadata" I get Unauthorized 401 error > message when I click in csv file output. > > It's an URL like this: > > > http://localhost:4000/bitstreams/8e7eec16-76b6-4a6b-bfe4-7ef96b88bd7c/download > > This is a log example: > > 2022-06-20 13:20:01,594 DEBUG unknown unknown > org.dspace.app.rest.security.jwt.JWTTokenHandler @ Received valid token for > username: > 2022-06-20 13:20:01,594 DEBUG unknown unknown > org.dspace.app.rest.security.StatelessAuthenticationFilter @ Found > authentication data in request for EPerson > 2022-06-20 13:20:01,616 DEBUG unknown unknown > org.dspace.core.LegacyPluginServiceImpl @ Adding Sequence plugin for > interface= org.dspace.authenticate.AuthenticationMethod, > class=org.dspace.authenticate.PasswordAuthentication > 2022-06-20 13:20:01,616 INFO 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > 77f2c73b-64e4-463d-8a60-9f11bacdf71b > org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request > [GET /server721/api] originated from / > 2022-06-20 13:20:03,934 DEBUG unknown unknown > org.dspace.app.rest.security.jwt.JWTTokenHandler @ Received valid token for > username: > 2022-06-20 13:20:03,934 DEBUG unknown unknown > org.dspace.app.rest.security.StatelessAuthenticationFilter @ Found > authentication data in request for EPerson > 2022-06-20 13:20:03,965 DEBUG unknown unknown > org.dspace.core.LegacyPluginServiceImpl @ Adding Sequence plugin for > interface= org.dspace.authenticate.AuthenticationMethod, > class=org.dspace.authenticate.PasswordAuthentication > 2022-06-20 13:20:03,965 INFO 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > 277d98eb-4ac4-4523-a7ea-a6e032d31911 > org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request > [GET /server721/api] originated from / > 2022-06-20 13:20:06,020 DEBUG unknown unknown > org.dspace.app.rest.security.jwt.JWTTokenHandler @ Received valid token for > username: > 2022-06-20 13:20:06,020 DEBUG unknown unknown > org.dspace.app.rest.security.StatelessAuthenticationFilter @ Found > authentication data in request for EPerson > 2022-06-20 13:20:06,036 DEBUG unknown unknown > org.dspace.core.LegacyPluginServiceImpl @ Adding Sequence plugin for > interface= org.dspace.authenticate.AuthenticationMethod, > class=org.dspace.authenticate.PasswordAuthentication > 2022-06-20 13:20:06,036 INFO 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > 7fd46ec4-4ea9-4b75-80b5-586599bbee92 > org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request > [GET /server721/api/system/processes/2] originated from / > 2022-06-20 13:20:21,011 DEBUG unknown unknown > org.dspace.app.rest.security.jwt.JWTTokenHandler @ Received valid token for > username: > 2022-06-20 13:20:21,011 DEBUG unknown unknown > org.dspace.app.rest.security.StatelessAuthenticationFilter @ Found > authentication data in request for EPerson > 2022-06-20 13:20:21,026 DEBUG unknown unknown > org.dspace.core.LegacyPluginServiceImpl @ Adding Sequence plugin for > interface= org.dspace.authenticate.AuthenticationMethod, > class=org.dspace.authenticate.PasswordAuthentication > 2022-06-20 13:20:21,026 INFO 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > bc9bf16d-b58c-4c69-b92e-61713b14ab50 > org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request > [GET /server721/api] originated from /processes/2 > 2022-06-20 13:20:23,335 DEBUG unknown unknown > org.dspace.app.rest.security.jwt.JWTTokenHandler @ Received valid token for > username: > 2022-06-20 13:20:23,335 DEBUG unknown unknown > org.dspace.app.rest.security.StatelessAuthenticationFilter @ Found > authentication data in request for EPerson > 2022-06-20 13:20:23,357 DEBUG unknown unknown > org.dspace.core.LegacyPluginServiceImpl @ Adding Sequence plugin for > interface= org.dspace.authenticate.AuthenticationMethod, > class=org.dspace.authenticate.PasswordAuthentication > 2022-06-20 13:20:23,357 INFO 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > ed348e92-17ae-4875-88a9-2ac6873751d2 > org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request > [GET /server721/api] originated from /processes/2 > 2022-06-20 13:20:25,390 DEBUG unknown unknown > org.dspace.app.rest.security.jwt.JWTTokenHandler @ Received valid token for > username: > 2022-06-20 13:20:25,390 DEBUG unknown unknown > org.dspace.app.rest.security.StatelessAuthenticationFilter @ Found > authentication data in request for EPerson > 2022-06-20 13:20:25,405 DEBUG unknown unknown > org.dspace.app.rest.security.jwt.JWTTokenHandler @ Received valid token for > username: > 2022-06-20 13:20:25,405 DEBUG unknown unknown > org.dspace.app.rest.security.StatelessAuthenticationFilter @ Found > authentication data in request for EPerson > 2022-06-20 13:20:25,421 DEBUG unknown unknown > org.dspace.core.LegacyPluginServiceImpl @ Adding Sequence plugin for > interface= org.dspace.authenticate.AuthenticationMethod, > class=org.dspace.authenticate.PasswordAuthentication > 2022-06-20 13:20:25,421 DEBUG unknown unknown > org.dspace.core.LegacyPluginServiceImpl @ Adding Sequence plugin for > interface= org.dspace.authenticate.AuthenticationMethod, > class=org.dspace.authenticate.PasswordAuthentication > 2022-06-20 13:20:25,421 INFO 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > 705a17c7-31c8-4661-835c-950d9b3abf32 > org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request > [GET > /server721/api/core/bitstreams/be3264c9-1263-401e-ad30-2b2f0a2180e2/bundle] > originated from /processes/2 > 2022-06-20 13:20:25,421 INFO 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > 9c5bcc7e-e978-453c-a888-8e91c2d125e2 > org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request > [GET > /server721/api/core/bitstreams/be3264c9-1263-401e-ad30-2b2f0a2180e2/format] > originated from /processes/2 > 2022-06-20 13:20:25,437 DEBUG 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > 9c5bcc7e-e978-453c-a888-8e91c2d125e2 > org.dspace.content.BitstreamServiceImpl @ > ::find_bitstream:bitstream_id=be3264c9-1263-401e-ad30-2b2f0a2180e2 > 2022-06-20 13:20:25,437 DEBUG 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > 705a17c7-31c8-4661-835c-950d9b3abf32 > org.dspace.content.BitstreamServiceImpl @ > ::find_bitstream:bitstream_id=be3264c9-1263-401e-ad30-2b2f0a2180e2 > 2022-06-20 13:20:25,513 DEBUG unknown unknown > org.dspace.app.rest.security.jwt.JWTTokenHandler @ Received valid token for > username: > 2022-06-20 13:20:25,513 DEBUG unknown unknown > org.dspace.app.rest.security.StatelessAuthenticationFilter @ Found > authentication data in request for EPerson > 2022-06-20 13:20:25,513 DEBUG unknown unknown > org.dspace.core.LegacyPluginServiceImpl @ Adding Sequence plugin for > interface= org.dspace.authenticate.AuthenticationMethod, > class=org.dspace.authenticate.PasswordAuthentication > 2022-06-20 13:20:25,513 INFO 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > 26b514ab-1485-4479-9d1d-98bcbb0330d1 > org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request > [POST /server721/api/authn/shortlivedtokens] originated from > /bitstreams/be3264c9-1263-401e-ad30-2b2f0a2180e2/download > 2022-06-20 13:20:25,513 DEBUG 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > 26b514ab-1485-4479-9d1d-98bcbb0330d1 > org.dspace.core.LegacyPluginServiceImpl @ Adding Sequence plugin for > interface= org.dspace.authenticate.AuthenticationMethod, > class=org.dspace.authenticate.PasswordAuthentication > 2022-06-20 13:20:25,513 DEBUG 9cf3d41f-12e5-4b27-ad88-8765b011ab37 > 26b514ab-1485-4479-9d1d-98bcbb0330d1 org.dspace.core.Context @ Cache size > on commit is 22 > 2022-06-20 13:20:27,549 WARN unknown unknown > org.dspace.app.rest.security.jwt.JWTTokenHandler @ 127.0.0.1 tried to use > an expired or non-valid token > 2022-06-20 13:20:27,549 DEBUG unknown unknown > org.dspace.core.LegacyPluginServiceImpl @ Adding Sequence plugin for > interface= org.dspace.authenticate.AuthenticationMethod, > class=org.dspace.authenticate.PasswordAuthentication > 2022-06-20 13:20:27,549 INFO unknown e8f70cdc-d0fd-4645-852a-1428fcb09857 > org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request > [GET > /server721/api/core/bitstreams/be3264c9-1263-401e-ad30-2b2f0a2180e2/content] > originated from http://localhost:4000/ > 2022-06-20 13:20:27,564 DEBUG unknown e8f70cdc-d0fd-4645-852a-1428fcb09857 > org.dspace.content.BitstreamServiceImpl @ > anonymous::find_bitstream:bitstream_id=be3264c9-1263-401e-ad30-2b2f0a2180e2 > 2022-06-20 13:20:27,564 WARN unknown e8f70cdc-d0fd-4645-852a-1428fcb09857 > org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ > Authentication is required (status:401) > > Thanks > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dspace-tech/a3108dcf-637e-4286-9515-866fcea2450an%40googlegroups.com > > <https://groups.google.com/d/msgid/dspace-tech/a3108dcf-637e-4286-9515-866fcea2450an%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/2a41fa79-71c3-4a39-a5d2-e5a67e09e9a0n%40googlegroups.com.
