Re: Are prefix+target starting URLs required?

Andrew Anderson <[email protected]> Fri, 13 Dec 2019 01:45:13 -0500
Newsgroups gmane.education.ezproxy
Message-ID <CAOuKRWvYq4356X_EgoVbL=0LjDfsXBO9sMke4b9eV_6Swq5R0A@mail.gmail.com>
Hi David,

ABC-CLIO is another example of a dashed hostname that you may run into.

When I was updating the ProxyPrefix jQuery plugin to add https hostname
support, I had asked OCLC how EZproxy handled hostnames with dashes in
them.  Unfortunately, I did not receive a sufficiently satisfactory answer
to implement the functionality that would "dash" an EZproxy hostname in the
same way that EZproxy does based exclusively on the target URL as input.

EZproxy used (and probably still uses) the following embedded hostname for
ABC-CLIO when using HTTPS:

www-abc-clio-com.proxy.example.edu


The algorithm appears to be a simple search and replace of "." with "-" in
the hostname, which gives no indication that there was a dash in the
original target URL's hostname if there is a need to massage the embedded
hostname later.

In contrast, Muse Proxy, uses double dashes when it translates a dashed
website name into the embedded hostname format, e.g.:

...www-abc--clio-com.proxy.example.edu


which makes it quite clear how to translate to or from the original
hostname and back.

As it was explained to me at the time by OCLC support, EZproxy maintains an
internal mapping that is not available for external programs to use, the
format of the proxy-by-host hostnames are undocumented, the embedded
hostname algorithm is considered proprietary, and that embedded hostname
format should not be relied upon to be consistent between releases.

Now, I have seen EZproxy use the exact same embedded hostname format for
over a decade, and I do not anticipate that it will change anytime soon,
but since there was no way to cleanly reverse the "dashing" of the
hostname, I had to punt and implement a lookup table that ProxyPrefix users
on EZproxy could use to add their own mappings by hand instead.

Caveat emptor.

Regarding the use of proxy prefixes, one major benefit to using prefixed
links instead of embedded hostname links is that many library platforms
have the concept of a proxy prefix and will permit you to use pristine
permalink/citation/856$u URLs and have the platform add the prefix for
you.  These systems support defining the target URL separately from the
proxy server, which means that if your proxy server hostname changes in the
future, you simply change the prefix value and the target URL does not have
to be updated en masse.  This decouples the target URL from the access
platform, so if you move from self-hosted EZproxy to hosted EZproxy or
OpenAthens or Muse Proxy, or even back to WAM, you can change the prefix
and the rest of your system URL data should not need to change.

Finally, as to migration strategies, we setup the load balancers in front
of our Muse Proxy servers to recognize the EZproxy embedded hostname style
links and translate them into prefixed links on the fly as the requests
traverse the load balancer.  This has been incredibly successful in helping
sites that had a large number of embedded hostname links in their library
web pages to transition more smoothly to the new platform, and gave them
the ability to perform link maintenance as time permits, rather than a
frantic rush to find and fix every link before THE BIG DAY(tm) when the
migration occurs.

This may be a tactic that you want to explore for your situation as well,
as you can also setup rewriting rules for the WAM style embedded hostnames
to catch any links that you have not updated prior to the migration date
and minimize the impact of links that were not identified prior to the
cutover.

Andrew

On Thu, Dec 12, 2019 at 7:57 PM Laszlo Gercsov <[email protected]>
wrote:

> Hi David.
>
> I think you will have a problem if the destination HTTPS URL has "-"
> hyphens in it. For example, I believe this will work :-
>
>
> http://yourproxy.uni.edu/login?url=https://macquarie-primoprod.hosted.exlibrisgroup.com
>
> but I think there will be issues with this :-
>
> https://macquarie-primoprod-hosted-exlibrisgroup-com.yourproxy.uni.edu
>
> In the first case, ezproxy would save the correct destination host name,
> but in the second case the correct hostname would not already be saved by
> ezproxy, so it would be unreliable to guess which '"-" hyphens to replace
> with "." dots.
>
> Best,
>
> Laszlo.
>
>
> ------------------------------
> *From:* EZproxy List <[email protected]> on behalf of Noe, David <
> [email protected]>
> *Sent:* Friday, 13 December 2019 10:43 AM
> *To:* [email protected] <[email protected]>
> *Subject:* [EZPROXY-L] Are prefix+target starting URLs required?
>
> Hello,
>
> I have been at a library using WAM (iii) for a proxy for some time now. We
> are moving to EZproxy and are configured to proxy by hostname. I would like
> to clarify a point on best practices.
>
> In the document, "Starting point URLs and config.txt" (
> help.oclc.org/Library_Management/EZproxy/EZproxy_configuration/Starting_point_URLs_and_config_txt
> <https://protect-au.mimecast.com/s/hvZhC81Vq2CQDx91Uo28-5?domain=help.oclc.org>),
> the method for constructing starting URLs is described. Having run EZproxy
> at a couple of other sites some years ago, this format was familiar to me.
>
> That said, is there a reason to not write starting point URLs in links as
> they will ultimately be resolved? e.g.
> https://www-somedb-com.ezproxy.ocls.info
> <https://protect-au.mimecast.com/s/6Og6C91W8rCxLP8Qi1pwp9?domain=www-somedb-com.ezproxy.ocls.info>
> ? Is there a reason that URLs necessarily be constructed with a prefix and
> target? e.g. https://ezproxy.ocls.info/login?url=http://www.somedb.com/
> <https://protect-au.mimecast.com/s/nRw7C0YKgRs4qljVuLOMXq?domain=ezproxy.ocls.info>
> ?
>
> I probably misread a document and thought it suggested that this would
> work fine, so I constructed the URLs as I would have logically expected
> them to work. This is also how URLs are constructed in WAM on Sierra (and
> Millennium). It both made sense that it would work like this since we are
> configured for proxy by hostname and seemed like an easier transition for
> staff to adjust to EZproxy. My testing would seem to suggest the answer is
> this is perfectly fine, but this assumption is not supported by the
> available documentation.
>
> I asked OCLC support and was told that the URL has to be cached in
> ezproxy.hst or it will not work, and if we were to have to delete this host
> file and start over, these URLs will not work; however, every time we have
> added a new stanza, all URLs have worked upon first and continued use
> throughout this implementation without having ever used the prefix+target
> construct. Ostensibly, these hosts should not even be in ezproxy.hst until
> someone has successfully logged in based on this response, right?
>
> If it's the proper way to go, we can certainly adjust our links to the
> prefix+target format. It would just be an easier transition
> organizationally if we actually did not have to.
>
>
> Thank you,
>
> David
>
> ********************************************************************
> If you wish to stop receiving messages from EZPROXY-L or otherwise amend
> your preferences,
> you can do so <a href="
> https://www.oclc.org/forms/internet-subscription.en.html
> <https://protect-au.mimecast.com/s/8ejrCgZ05JfNOn89cKXgtj?domain=oclc.org>
> ">here</a>.
> Or email [email protected] including the relevant text below in the
> body of the email:
> • To unsubscribe: "unsubscribe EZPROXY-L"
> • To receive EZPROXY-L in digest form: "set EZPROXY-L digest"
> • To set your options to no mail: "set EZPROXY-L nomail"
> • To receive these messages in the future "set EZPROXY-L mail"
> To contact the list owners directly please send your message to
> [email protected].
> If you unsubscribe from EZPROXY-L, you will no longer be able to
> participate in any of its features, including the public forum.
> To unsubscribe from all OCLC marketing email communications
> (including all OCLC listervs, OCLC Connect emails, OCLC event
> notifications, product/service/cooperative updates and newsletters),
> please email us at [email protected].
>
> ------------------------------
>
> To unsubscribe from the EZPROXY-L list, click the following link:
> http://listserv.oclclists.org/scripts/wa.exe?SUBED1=EZPROXY-L&A=1
>


-- 

Andrew Anderson
President & CEO
[email protected]
t: +1 (727) 536-0214 x100
f: +1 (727) 530-3126
w: www.lirn.net
Library & Information Resources Network
25400 US Hwy 19 North, Ste. #220
Clearwater, FL 33763
LinkedIn
<http://www.linkedin.com/company/library-and-information-resources-network-inc->
 | Facebook <http://www.facebook.com/LIRNnotes> | Twitter
<http://www.twitter.com/LIRNNotes> | YouTube
<http://www.youtube.com/user/LIRNnotes>


********************************************************************
If you wish to stop receiving messages from EZPROXY-L or otherwise amend your preferences,
you can do so <a href="https://www.oclc.org/forms/internet-subscription.en.html">here</a>.
Or email [email protected] including the relevant text below in the body of the email:
• To unsubscribe: "unsubscribe EZPROXY-L"
• To receive EZPROXY-L in digest form: "set EZPROXY-L digest"
• To set your options to no mail: "set EZPROXY-L nomail"
• To receive these messages in the future "set EZPROXY-L mail"
To contact the list owners directly please send your message to [email protected].
If you unsubscribe from EZPROXY-L, you will no longer be able to participate in any of its features, including the public forum.
To unsubscribe from all OCLC marketing email communications
(including all OCLC listervs, OCLC Connect emails, OCLC event notifications, product/service/cooperative updates and newsletters),
please email us at [email protected].