Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSpace REST login error in SS #123

Closed
J4bbi opened this issue Aug 29, 2018 · 5 comments
Closed

DSpace REST login error in SS #123

J4bbi opened this issue Aug 29, 2018 · 5 comments
Assignees
Milestone

Comments

@J4bbi
Copy link

J4bbi commented Aug 29, 2018

Expected behaviour
When Storage service has been configured to store AIP/DIPs in DSpace using a REST location it should login using credentials provided and return a session id.

Current behaviour
When trying to login to DSpace a 401 error is thrown by the login function.

The same credentials work using curl.

curl -v -X POST --data "email=dspacedemo%2Badmin@gmail.com&password=dspace" https://demo.dspace.org/rest/login

the same credentials set up in SS return a 401.

DSpaceRESTException: Bad response 401 received when attempting to login via the DSpace REST API: 401 Client Error: Unauthorized for url: https://demo.dspace.org:443/rest/login. Using url "https://demo.dspace.org:443/rest/login". Using email "dspacedemo+admin@gmail.com".

Note that when commenting out the cookies and headers lines from the following snippet:
https://github.com/artefactual/archivematica-storage-service/blob/qa/0.x/storage_service/locations/models/dspace_rest.py#L297-L299
the login error does not happen.

Steps to reproduce

Your environment (version of Archivematica, OS version, etc)
SS qa 0.x- 0.12.0 rc
DSpace 6.2

@sromkey sromkey added this to the 1.8.0 milestone Aug 30, 2018
@jrwdunham jrwdunham self-assigned this Aug 31, 2018
@jrwdunham jrwdunham added Status: refining The issue needs additional details to ensure that requirements are clear. Status: ready The issue is sufficiently described/scoped to be picked up by a developer. Status: in progress Issue that is currently being worked on. and removed Status: refining The issue needs additional details to ensure that requirements are clear. Status: ready The issue is sufficiently described/scoped to be picked up by a developer. labels Aug 31, 2018
@sevein sevein added Status: review The issue's code has been merged and is ready for testing/review. and removed Status: in progress Issue that is currently being worked on. labels Sep 11, 2018
@jrwdunham
Copy link

To QA:

  1. DSpace REST space functionality must be enabled by modifying https://github.com/artefactual/archivematica-storage-service/blob/dev/issue-124-fix-dspace-rest-space-form-html/storage_service/locations/models/space.py#L143 so that BETA_PROTOCOLS has the value set(). Then restart the SS service.

  2. Create a DSpace REST space using values and credentials that I have. Contact me for these details.

  3. Confirm that you can create an AIP and store it in the DSpace REST space.

@currmie currmie self-assigned this Oct 4, 2018
@currmie
Copy link

currmie commented Oct 12, 2018

Hi @sevein ,

In short, I'm unable to verify on my local deploy.

More details...
I'm encountering an SSL error: "bad handshake: Error([('SSL routines' , 'tls_process_server_certificate', 'certificate verify failed')],)" after doing the following:

1 .Enabled the DSpace REST space functionality by modifying space.py per jrwdunham's QA notes.
2. Restarted SS service.
3. Created a DSpace REST space using values and credentials that jrwdunham provided.

*I can provide more details about my DSpace Rest space location upon request.

@sevein
Copy link
Contributor

sevein commented Oct 12, 2018

@currmie I believe the certificate verify failed error means that Storage Service could not verify the authenticity of the certificate(s) offered by DSpace or ArchiveSpace. This could be happening for several reasons. You can talk to the ops team to revise the deployment for you, e.g. CA certs installed in the client, server certificates, etc...
A temporary solution is to disable the "Verify SSL certificates?" option which commands Storage Service to trust the server certificate regardless.

@currmie
Copy link

currmie commented Oct 16, 2018

@mamedin was able to confirm that we could create an AIP and store it in the DSpace REST space associated with a test collection. No DSpace REST login errors encountered so calling this issue verified.

@currmie currmie added Status: verified and removed Status: review The issue's code has been merged and is ready for testing/review. labels Oct 16, 2018
@currmie
Copy link

currmie commented Oct 17, 2018

Also, I verified using new credentials for DSpace REST login (given to me for QA purposes). Using local deployment, I am able to create an AIP and store it in the DSpace REST space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants