Scott,thank you very much!
>You need both the receptor and the callback in A.
is it means i could modified the web.mxl in A like this below and do
nothing for web.xml in B
web.mxl in A:
<filter>
<filter-name>CAS Validation Filter</filter-name>
<filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
<init-param>
<param-name>casServerUrlPrefix</param-name>
<param-value>https://casserver:8443/cas</param-value>
</init-param>
<init-param>
<param-name>serverName</param-name>
<param-value>http://serverA:8080</param-value>
</init-param>
<init-param>
<param-name>proxyCallbackUrl </param-name>
<param-value>https://serverA:8443/appA/proxy/test.jsp
</param-value>
</init-param>
<init-param>
<param-name>proxyReceptorUrl</param-name>
<param-value>/proxy/test.jsp</param-value>
</init-param>
</filter>
by the way ,is the suffix of "proxyCallbackUrl" must match the
"proxyReceptorUrl"?
>Then you'll need to call the API to get the ticket.
before I call the serviceB from A ,i must add the pt to the URL of
serviceB ,is that right?
String pt =
AssertionHolder.getAssertion().getPrincipal().getProxyTicketFor("
http://serverB:8080/appB/serviceB")
URL urlB= new URL("http://serverB:8080/appB/serviceB?pt="+pt);
....
but when i access "http://serverA:8080/appA/serviceA",
then CAS login first,then run the service A and can't get the servcieB yet.
in the log i can see the the value of "pt" is null and "No Proxy Ticket
found for PGTIOU-7-hkxtdSxngYiu6RxkbVLP-cas" was output.
thanks again.
yours
-------
kevin
2009/10/7 Scott Battaglia <[email protected]>
> You need both the receptor and the callback in A.
>
> Then you'll need to call the API to get the ticket.
>
> Cheers,
> Scott
>
>
> On Tue, Oct 6, 2009 at 9:46 PM, kevin kevin <[email protected]> wrote:
>
>> Hi,all
>> I'm a newbee and puzzled for the CAS proxy.
>> the CAS server:cas-server-3.3.3
>> the CAS client:cas-client-3.1.8
>>
>> The application flow is like the below.
>> Brower -> the service of Web application A -> the service of Web
>> application B
>>
>> Both of Web application "A" and "B" are protected by CAS.
>>
>> The user access the the service of th Web application A used by brower .
>> the service of "A" needs access the the service of "B" for getting the
>> data.
>>
>> for example:
>> access the url "http://serverA:8080/appA/serviceA",
>> then the serviceA get the data from serviceB(
>> http://serverB:8080/appB/serviceB)
>> serviceA is a servlet and get the service B in servlet like this:
>> ....
>> URL urlB= new URL("http://serverB:8080/appB/serviceB");
>>
>> //then get the data according stream
>> BufferedReader br = new BufferedReader(new
>> InputStreamReader(urlB.openStream(),"UTF-8"));
>> ...
>>
>> So I think that i need the CAS Proxy to correctly get the data from "B" in
>> the service of "A".
>>
>> The problem is that i can't clearly known how to configure the web.xml in
>> the "A" and "B".
>>
>> I just put the property "proxyCallbackUrl" in the "B" and put the property
>> "proxyReceptorUrl" in the "A".
>> the value of "proxyCallbackUrl " is "
>> https://serverA:8443/appA/proxy/test.jsp" and it exist in the "A".
>> the "test.jsp" just a exist file and do nothing in it.
>>
>> when i configure that ,but it seems don't work for me while accessing the
>> servceA and can't get the data from serviceB.
>> I think the main difference is in the configureation of CAS Validation
>> Filter,so i list the segment of web.xml.
>> Is it right for CAS proxy?what's the difference between "A" and "B" when I
>> used the CAS Proxy?
>>
>> the web.xml of Web application "A":
>>
>> <filter>
>> <filter-name>CAS Validation Filter</filter-name>
>>
>> <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
>> <init-param>
>> <param-name>casServerUrlPrefix</param-name>
>> <param-value>https://casserver:8443/cas</param-value>
>> </init-param>
>> <init-param>
>> <param-name>serverName</param-name>
>> <param-value>http://serverA:8080</param-value>
>> </init-param>
>> <init-param>
>> <param-name>proxyReceptorUrl</param-name>
>> <param-value>/proxy/test.jsp</param-value>
>> </init-param>
>> </filter>
>>
>>
>> the web.xml of Web application "B" :
>> <filter>
>> <filter-name>CAS Validation Filter</filter-name>
>>
>> <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
>> <init-param>
>> <param-name>casServerUrlPrefix</param-name>
>> <param-value>https://casserver:8443/cas</param-value>
>> </init-param>
>> <init-param>
>> <param-name>serverName</param-name>
>> <param-value>http://serverB:8080</param-value>
>> </init-param>
>> <init-param>
>> <param-name>acceptAnyProxy</param-name>
>> <param-value>true</param-value>
>> </init-param>
>> <init-param>
>> <param-name>proxyCallbackUrl </param-name>
>> <param-value>https://serverA:8443/appA/proxy/test.jsp
>> </param-value>
>> </init-param>
>> </filter>
>>
>>
>> Thanks in advance
>>
>> ----
>> kevin
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> You are currently subscribed to [email protected] as:
>> [email protected]
>>
>>
>> To unsubscribe, change settings or access archives, see
>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>
>>
> --
> You are currently subscribed to [email protected] as: [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>
>
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user