Distiguishing between apps by URL parameter?
Kevin LaBarre
Kevin.LaBarre at Assetworks.com
Mon Dec 19 17:37:33 GMT 2011
I took a break from this in an attempt to avoid going insane, so now that I'm prepared for eminent mental collapse, I'm back.
Due to my configuration I would like to proceed with the Query feature within the RequestMapper in the shibboleth2.xml file, but I seem to be able to get one app or the other working just fine, but not both. It seems only "default" works and it's got to be something with the way I'm defining things.
Right now my RequestMapper definition looks something like this:
<RequestMapper type="Native">
<RequestMap applicationId="default">
<Host name="test.domain.com" >
<PathRegex regex="ssoshib">
<Query name="p" regex="1001:901" authType="shibboleth" requireSession="true" />
</PathRegex>
</Host>
</RequestMap>
</RequestMapper>
I need to be able to distinguish between two applications by the query. I've searched extensively but have not been able to find any examples on how this should be done. My first attempt (which failed) looks something like this:
<RequestMapper type="Native">
<RequestMap applicationId="default">
<Host name="test.domain.com" >
<PathRegex regex="ssoshib">
<Query name="p" regex="1001:901" authType="shibboleth" requireSession="true" />
</PathRegex>
<PathRegex regex="ssoshib" applicationId="app2">
<Query name="p" regex="1006:901" authType="shibboleth" requireSession="true" />
</PathRegex>
</Host>
</RequestMap>
</RequestMapper>
I then proceed with the ApplicationDefaults section where again I'm confused about how things work. From the documentation it looks like I should declare the defaults first, then setup an ApplicationOverride section. Is ApplicationOverride defined within the ApplicationDefaults section or outside of those tags altogether?
For instance:
<ApplicationDefaults...
... stuff...
<ApplicationOverride...
... stuff...
</ApplicationOverride>
</ApplicationDefaults>
- or -
<ApplicationDefaults...
... stuff...
</ApplicationDefaults>
<ApplicationOverride...
... stuff...
</ApplicationOverride>
Unfortunately I found examples both ways and I know one has to be wrong so I figured I'd ask anyway. I don't expect hand-holding (though I'll graciously accept it). Even just pointing me towards relevant examples would help as I feel like I'm randomly "trying things" at this point.
Best regards,
Kevin F. La Barre
Senior IT Engineer
AssetWorks, Inc.
512-347-7400 x1860
-----users-bounces at shibboleth.net wrote: -----
To: "users at shibboleth.net" <users at shibboleth.net>
From: "Cantor, Scott" <cantor.2 at osu.edu>
Sent by: users-bounces at shibboleth.net
Date: 11/02/2011 10:23AM
Subject: Re: Distiguishing between apps by URL parameter?
On 11/2/11 11:00 AM, "Kevin LaBarre" <Kevin.LaBarre at Assetworks.com> wrote:
>These two URLs point to different applications. The issue is that I
>cannot use the host, nor the rest of the URL to differentiate between
>applications for Shibboleth purposes. I would appreciate any ideas in
>how I can make this work. I have Shibboleth working with a single
>customer just fine, so I know I have the basics configured correctly.
>Thanks in advance!
I don't know if Apache can apply settings based on the query string or
not. If it can, that's the safest approach. Otherwise, there is a <Query>
feature in the RequestMap, as documented. It can be very dangerous to use
because query string parameters are case sensitive, but many apps don't
treat them that way, so you can get around the mapping in some cases.
It also depends what the failure scenario is. If all you do is use it to
assign the override, and a failure to do that doesn't hurt anything, then
it's probably fine.
-- Scott
--
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/users/attachments/20111219/70f9ef26/attachment.html
More information about the users
mailing list