OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OAI validation fails when using SSL?

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

OAI validation fails when using SSL?

Postby piotreba » Sat Mar 01, 2014 3:14 pm

Hello,

I am trying to configure repository in the WorldCat but the base url testing fails. I also performed validation test through http://www.openarchives.org/Register/ValidateSite and I get the following error:
"Bad Location specified in 302 response ('https://xxx/oai?verb=Identify'). The HTTPS protocol is not specified in the OAI-PMH and is not currently supported"

I put base URL with "http" although my OJS is configured to work fully via SSL. Using https in the base URL also results with failure.

So is it possible to configure repository via OAI of the OJS working via SSL?


Thanks.
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: OAI validation fails when using SSL?

Postby JasonNugent » Mon Mar 03, 2014 7:40 am

Hi piotreba,

This isn't a specific issue with OJS, but rather a general one with OAI. From what I can gather, the OAI-PMH protocol is designed to work over HTTP, and not SSL. See, for example, this rather old email thread on the OAI implementation mailing list:

http://www.openarchives.org/pipermail/o ... 01416.html

I think that this is the case because, quite often, harvesters don't always have the ability to request documents via SSL. This is often due to self-signed certificates or certificates that were signed with trust partners that may not be supported widely.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 893
Joined: Tue Jan 10, 2006 6:20 am

Re: OAI validation fails when using SSL?

Postby piotreba » Tue Mar 04, 2014 2:57 am

So does it mean I am no able to provide the OJS content via SSL?
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: OAI validation fails when using SSL?

Postby JasonNugent » Tue Mar 04, 2014 6:58 am

Hi piotreba,

You can provide it via SSL as an additional feature if you like, but your validation and harvesting needs to also happen via regular HTTP. That's the specification.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 893
Joined: Tue Jan 10, 2006 6:20 am

Re: OAI validation fails when using SSL?

Postby piotreba » Tue Mar 04, 2014 8:00 am

I try to configure repository in the WorldCat, but the validation fails.
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: OAI validation fails when using SSL?

Postby JasonNugent » Tue Mar 04, 2014 8:43 am

Hi piotreba,

Are you doing it via HTTP or HTTPS? It won't validate with HTTPS.

Regards
Jason
JasonNugent
Site Admin
 
Posts: 893
Joined: Tue Jan 10, 2006 6:20 am

Re: OAI validation fails when using SSL?

Postby piotreba » Tue Mar 04, 2014 8:54 am

Although the OJS works via SSL (I don't want to change it) I put http://***/index.php/index/oai for the base url, but the test fails. The same with http://www.openarchives.org/Register/ValidateSite
WorldCat support claims there is something wrong with XML, but I am not sure how to check it. This issue applies to other OJS too.
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: OAI validation fails when using SSL?

Postby JasonNugent » Tue Mar 04, 2014 9:13 am

Can you PM me the URL of your OJS installation so I can test validation to see the error?

Thanks,
Jason
JasonNugent
Site Admin
 
Posts: 893
Joined: Tue Jan 10, 2006 6:20 am

Re: OAI validation fails when using SSL?

Postby JasonNugent » Wed Mar 05, 2014 10:41 am

Hi piotreba,

Thanks for the PM -- the problem is that your http requests redirect to https ones, so the OAI validator tries to validate the https version of your repository. You're going to need to allow http for this. Whether you allow http for everything, or else you craft some sort of mod_rewrite or redirection rule in Apache to relax the restriction for OAI is up to you, but it won't validate otherwise.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 893
Joined: Tue Jan 10, 2006 6:20 am

Re: OAI validation fails when using SSL?

Postby piotreba » Thu Mar 06, 2014 10:29 am

Thanks Jason.

I would appreciate any hint with mod_rewrite for OAI if possible, bacause I wouldn't like to resign from SSL.
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: OAI validation fails when using SSL?

Postby JasonNugent » Thu Mar 06, 2014 11:15 am

Hi again, piotreba,

Before I start suggesting things, I just want to understand how this is all put together. Are you forcing SSL in Apache, or are you using the force_ssl options in your OJS config.inc.php file? If it's only the latter, that might be an OJS bug, since we'd obviously have to relax the SSL restriction for OAI requests (but only for those).

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 893
Joined: Tue Jan 10, 2006 6:20 am

Re: OAI validation fails when using SSL?

Postby piotreba » Thu Mar 06, 2014 3:54 pm

Jason, I only use force_ssl in the OJS configuration file, no other option to force SSL in the Apache .htaccess file has been enabled.
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: OAI validation fails when using SSL?

Postby JasonNugent » Fri Mar 07, 2014 12:26 pm

Hi piotreba,

If the 'force_ssl' config setting is forcing OAI to use SSL, that's probably an OJS bug. I'll do some digging. My time will be a bit limited next week because of a PKP Code Sprint, but I'll try to find some time.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 893
Joined: Tue Jan 10, 2006 6:20 am

Re: OAI validation fails when using SSL?

Postby piotreba » Mon Mar 31, 2014 1:36 pm

Jason, did you manage to figure out the issue with ssl and oai?


Thanks
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: OAI validation fails when using SSL?

Postby JasonNugent » Wed Apr 02, 2014 4:59 pm

Hi piotreba,

Sorry for the delay. I'm including two patches on this post. One goes against your pkp/lib directory and the other goes against your base OJS directory. They add a check to remove the SSL requirement from the OAI handler. If you can test those two patches and see if that solves your problem, that'd be great. They are small.

Regards,
Jason
Attachments
pkp-lib.diff
(1.03 KiB) Downloaded 23 times
ojs.diff
(582 Bytes) Downloaded 14 times
JasonNugent
Site Admin
 
Posts: 893
Joined: Tue Jan 10, 2006 6:20 am

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot] and 1 guest