approvedServices.xml and login-webflow.xml
Marcio Migueletto de Andrade
migueletto at lcc.ufmg.br
Thu Apr 19 09:53:30 EDT 2007
Hello,
I am using CAS server 3.0.7 and was trying to use approvedServices.xml.
I inserted "/WEB-INF/approvedServices.xml" in web.xml and configured
services.xml to list my services. When I used a not-approved service,
instead of getting the serviceErrorView page, I got the exception:
java.lang.IllegalArgumentException: Cannot find state with id
'viewServiceErrorView' in flow 'login-webflow' -- Known state ids are
'array<String>['automaticCookiePathSetter',
'ticketGrantingTicketExistsCheckAction', 'gatewayRequestCheck',
'hasServiceCheck', 'renewRequestCheck', 'viewLoginForm', 'bindAndValidate',
'submit', 'sendTicketGrantingTicket', 'serviceCheck',
'generateServiceTicket', 'warn', 'viewGenericLoginSuccess',
'showWarningView', 'redirect']'
Indeed, inside login-webflow.xml there is a transition to
"viewServiceErrorView" but this state is not defined anywhere.
So I added the following state just before <global-transitions>:
<end-state id="viewServiceErrorView" view="serviceErrorView" />
and everything worked as expected. Is this the correct way to fix this
problem ?
Back to my original intent of using approvedServices.xml, I found an issue
that I would like to mention. I am using CAS to authenticate Shibboleth
Identity Provider. But because of the way Shibboleth works, the service URL
that is redirected to CAS is variable, making it impossible to configure it
inside services.xml. The DefaultServiceRegistry implementation uses a
HashMap to store fixed serviceIds, but it will receive a different
serviceId each time Shibboleth redirects to CAS.
For now, I implemented a custom ServiceRegistry that also matches URL
prefixes, but I think a better solution would be a ServiceRegistry that
supports Regexp, or something similar.
Regards,
Marcio.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20070419/c0cc557a/attachment.html
More information about the cas
mailing list