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.
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to