WontProtect
A common early problem with SP configuration is getting it to "run" and actively protect content. There are a lot of different reasons the filter/module might not appear to be doing anything, depending on the platform.
Usually, you can isolate this up front based on whether shibd is runnable or not. This can be done from the command line by running the shibd command (it's in sbin) using the -check
(Windows) or -t
(Unix) option. If you get reasonable output, then there's a pretty good chance the filter/module is "working", it's just not configured to do what you want yet. If not, then you need to fix the shibd problem first, usually by correcting configuration file syntax.
Otherwise, move on by platform...
- 1 IIS
- 1.1 Check Permissions
- 1.2 Green Arrow
- 1.3 Site and Request Mapping
- 1.4 Logging
- 2 Apache
IIS
Before getting too far into debugging, please make sure to read the IIS Configuration topic thoroughly and make sure you understand it and that you've done the necessary setup work.
Check Permissions
With IIS, the first thing to do is to check the Windows Event Log. If you access a site with the filter installed, you should get event log messages saying that the filter initialized. If so, the filter is running, and there's a decent chance permissions are OK. If not, start by making sure that the anonymous IIS user (IUSR_<machine>
) has read access the \opt\shibboleth-sp tree. There may be other accounts that need access if you have ASP.NET AppPool identities configured.
Green Arrow
All those steps should lead to the wondrous "green arrow". Once you access a web page on a site with the filter installed, you should get the arrow in the IIS GUI on the Filters tab. If there's no arrow, or it's red, or Unknown status, something's not right. But that only matters if you've accessed the site. Until you do, restarting will leave the filter in an Unknown state on IIS 6+.
Unfortunately, if the problem isn't permissions, and shibd is running as a service, things get messy. You could try restarting the machine or IIS, but ultimately, you'll have to play with it and hope. One thing I find is that you often need to install the filter directly on the web site. Sometimes installing it up above doesn't work well.
Once you get that green arrow, the rest is going to be SP configuration work.
Site and Request Mapping
The first thing to check is for the proper <Site>
elements defined in the <ISAPI>
configuration element. You MUST create them for each web site you're using the filter with by mapping from the IIS Site Instance ID to the right hostname(s). You can find the ID on the GUI in the list of Web Sites. It's often a large number.
The rest of the protection trickery is in the <RequestMapper>
. If you did all the above, but it's still not triggering for you, you've got something wrong in the map. Make sure you have the requireSession="true"
attribute placed into the right <Host>
or <Path>
element for your choice of host or directory names.
Logging
If you still have no joy, the next step is to try collecting some logging detail. You need to raise the native logging level to DEBUG by editing native.logger and changing the default INFO level to DEBUG. Then you'll want to restart IIS. You should get more verbose information in syslog or the Windows event log (or in older/upgraded systems, the native.log file).
It will include a line each time you access the site that tells you what URL has been "mapped" by the filter. If it doesn't look right, you should get a hint on what to fix. If you get nothing, despite raising the level to DEBUG, then the filter isn't running, or isn't configured to process requests for the affected site.
Apache
Before getting into debugging, please make sure to read the Apache topic thoroughly and make sure you understand it and that you've done the necessary setup work.
Apache is much simpler when it comes to getting at least initial interception to function, but it depends on how you choose to configure it. If you use .htaccess files, things are pretty automatic, you just have to do:
|
If you're relying on the <RequestMapper>
instead, then you'll run into issues based on server name configuration details. The Apache ServerName
command MUST be set to match what you put in the map's <Host>
element and you'll need to make sure UseCanonicalName On
is set. But additionally you'll need to get the module running for those requests by globally activating the module for those resources, using this kind of approach:
|
This activates the module in a passive mode for all requests, while allowing specific content to force a session using the <RequestMapper>
or an Apache command someplace else.