Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This document is not expected to be used by ordinary users. It has a slightly higher level of technical content, but everything is explained and it requires no special background. You must be an administrator of your own desktop test computer. The process is fairly simple, but it involves making a temporary administrative change to a laptop or desktop computer under your control. You add one line to a system file, test, and then restore the original version of the file. It doesn't matter what computer you use, so if you don't like doing this on your important machine, find something that boots up at all and run the test there.

Tip
titleQuick Summary

For the technically advanced users who know what a "hosts" file is:

Change your "hosts" file on your desktop client machine to add the line "128.36.64.90  auth.yale.edu".

Browsers have a DNS lookup cache that remembers the IP address of recently used hosts. Google for something like "firefox dns cache" and choose an article that tells you how to use "about:config" to flush or disable it, or use a Browser you don't normally use that will not have a recent entry for "auth.yale.edu".

From a Browser on the desktop client machine, login to your application. If it works, the test is done. If there is a problem, report it.

Now delete or comment out the change just made to the "hosts" file.

 

What about TEST?

There is a TEST version of Shibboleth on the network at "https://auth-test.yale.edu/idp". If you have a TEST version of your application, you can configure it to use TEST Shibboleth and then your problem is solved. Just login through the TEST environment.

...

So the only thing you need to change do is the Browser, although to make this particular change it is best to change a system file on the computer on which the Browser is runningto configure the Browser on a desktop machine that "auth.yale.edu" is the name of the Pre-Production server instead of the name of the Production server. You do not need to change any of the servers or applications, just the client desktop.

But is it Shibboleth?

When a Browser goes to any "https://" URL, the server at the other end has to have a Certificate and Key that proves that it is the computer with the name the Browser expected to talk to. The Certificate and key of Yale servers are protected by ITS, but we can install the same files on two different network addresses as long as we control both of them and they do the same thing.

...

These two addresses are the only computers in the world that have both the "https"//" Certificate/Key for the name "auth.yale.edu" and also the Certificate/Key to digitally sign messages in a way that other applications will trust that the message came from the Yale Shibboleth server, so using any other address here will not work.

In Windows: Copy, Edit, Copy Back

In Windows, the "hosts" file can generally not be correctly changed in place using a text editor. There are a number of system protections here, and when the editor tries to save the new file, the data is rerouted to a new file in some other location where it does no good. You should copy it to another directory, edit it in the other directory, and then copy it back.

Testing

It is generally a good idea to make two copies of the "hosts" file to two subdirectories, which I will call "saved" and "test" . Edit "test\hosts" to add the one line with "128.36.64.90  auth.yale.edu". To copy "test\hosts" to "C:\windows\system32\drivers\etc" (or to copy test/hosts to "/etc") you need administrative (or root) privileges. On Windows, simply copy and paste or drag and drop the file from test\hosts to C:\windows\system32\drivers\etc. First you will be asked if you want to replace the old file. Then you will be asked to approve the use of administrative privilege to change a system directory.

...

  1. Copy the test "hosts" file to the "etc" directory. To make sure it is working, issue the command "ping auth.yale.edu" and verify that the address being used is 128.36.64.90.
  2. Most Browsers have a DNS cache that remembers the IP address of recently visited servers. If you have an installed browser you don't normally use, then use it for testing. Otherwise, you have to Google for "firefox dns cache" (for FireFox or replace with your browser) choose an article that tells you how to turn DSN caching off.
  3. Launch a "Private Browser Window" so you have no existing session with CAS, Shib, or your application.
  4. Login to your application using the browser. If it works, the test is successful.
  5. Copy the original saved file to the "etc" directory.

There is no directIf the login is not successful, then send mail with the URL you used to do the login, the netid you used, and contact information to Howard.Gilbert@yale.edu.

What happens if you do not restore the original copy of the file? It is possible to run for weeks using the Pre-Production version of Shibboleth and everything will work. Unfortunately, there are a few other applications Yale services that you can access that appear to be running on the "same server name. A few applications have obsolete references to CAS as https://auth.yale.edu" server, but only Shibboleth (that is "https:///cas/login. This isn't an actual version of CAS, but a small program that sends the user to the correct server name. These other minor functions nominally on auth.yale.edu /idp") is supported by the test machine at 128.36.64.90. are not simulated by the Pre-Production Shibboleth server address. So if you leave the hosts file pointing to the test configuration, and then a few days later you use some application that was configured years ago to use a obscure alias of CAS as "https://auth.yale.edu/cas" then that CAS URL will not be found. So generally it is a good idea to run one quick test and put things back to normaladdress and happen to follow a link to one of these old URLs, then you will get a Not Found error message.

Security

The hosts file has been in every system that uses the Internet. On Windows it goes back at least as far as the mid 1990's. What we are doing here was once very common.

Them Then malware came along, and today a lot of malware programs try, among other things, to change the hosts file. So this file is somewhat more carefully protected, and it is certainly regarded as evil for some program to try and change it behind your back. If you go to edit the file, and you did not make any intentional changes, and it is full of non-comment lines, then you may have been hacked.

...

Is There Another Way to Do This?

All Browsers have an Advanced section of their Options where under Network you can configure a Proxy Server. When we have the time, we will set up a Proxy Server and then you can test Shibboleth using a change to the Browser configuration instead of a change to the hosts file. Doing this is actually a bit more complicated, but because of the bad association of hosts file changes and malware, some people today may feel better about this change.We have not yet set up the proxydesktop Browers have a configuration option to specify the network address of a Proxy Server. We could create a special Proxy Server that reroutes requests for "auth.yale.edu" to the Pre-Production machine. However, after messing with a hosts file, the second most popular malware trick is to mess with the Proxy configuration. Routing Web traffic, particularly traffic to high security applications like CAS and Shibboleth, through a Proxy machine is not a good practice and we do not want to encourage it. You are certainly free to use Proxy servers that you control in your own testing.

We have created a Windows VM and permanently set the hosts file to point to Pre-Production. If someone were unable to make changes to their own machine, we could add their Netid to the list of users who can use Remote Desktop to login to the machine and test their application using one of the Browsers. Again this does not appear to be an optimal solution, and again you are free to install a VM host on your desktop (we recommend Virtualbox from Oracle) and run test cases in a VM that you would rather not run on your regular operating system.

Generally speaking, it is not possible to change the hosts file on a normal (non "rooted") phone or tablet computer.

Changing the hosts file is simple and easy to understand, and it is completely under your control. Many people still have some laptop they replaced 6 years ago sitting on a shelf, and it is perfectly acceptable to run the test on that machine.