Thanks Dmitriy
​.  I am going to try this out.

I did notice that the code does not work with the Java 3.3.1 client,
however, since the method signature for

CommonUtils.getResponseFromServer
​ changed from previous versions of the Java client.​  For now I will go
against the 3.2.1 client.

Thanks,
Adam

On Fri, Oct 17, 2014 at 2:12 PM, Dmitriy Kopylenko <[email protected]>
wrote:

> Here’s an example of how to interact with clearpass endpoint at the low
> level:
>
>
> https://github.com/Unicon/cas-java-clients-addons/blob/master/src/main/java/net/unicon/casclients/addons/springsecurity/ClearpassRetrievingCasAuthenticationProvider.java#L58
>
> Cheers,
> Dmitriy.
>
> On Oct 17, 2014, at 2:05 PM, Adam Causey <[email protected]> wrote:
>
> Thanks for the reply.  I am not sure I'm going about this the correct
> way.  Are there any example clients that show how to use clearPass?
>
> I think the server piece is now working, but in the test client that I
> wrote I cannot get anything to return.   Using the following code I get a
> 404.
>
>
> String clearPassUrl =
> ​ ​
> "https://mycasserver.com/cas/clearPass";;
> AttributePrincipal principal = (AttributePrincipal)
> request.getUserPrincipal();
> String proxyTicket = principal.getProxyTicketFor(clearPassUrl);
> log.debug("proxyTicket: " + proxyTicket);
> final String clearPassRequestUrl = clearPassUrl + "?" + "ticket="
> ​ ​
> + proxyTicket + "&" + "service="
> ​ ​
> + URLEncoder.encode(clearPassUrl, "UTF-8");
> log.debug("clearPassRequestUrl: " + clearPassRequestUrl);
> final WebClient webClient = new WebClient();
> final HtmlPage page = webClient.getPage(clearPassRequestUrl);
> log.debug(page.getTextContent());
>
>
> If I create a URL with an arbitrary ticket I am getting an 'invalid
> ticket' message in the logs on the server, so I assume the endpoint is
> working.
>
> https://mycasserver.com/cas/clearPass
> ​?​
> ticket=foobar&service=https%3A%2F%2Fmycasserver.com%2Fcas%2FclearPass
>
> org.jasig.cas.client.validation.TicketValidationException: ticket
>> 'foobar' not recognized
>>
>
> On Thu, Oct 16, 2014 at 4:14 PM, Misagh Moayyed <[email protected]>
> wrote:
>
>> Turn on logging for Spring, to DEBUG at least. That should help you
>> determine where the request ends up.
>>
>>
>>
>> *From:* Adam Causey [mailto:[email protected]]
>> *Sent:* Thursday, October 16, 2014 5:22 AM
>> *To:* [email protected]
>> *Subject:* [cas-user] Setting up Clearpass
>>
>>
>>
>> I'm attempting to setup clearpass in CAS 3.5.2.  I've followed the
>> instructions found here: https://wiki.jasig.org/display/casum/clearpass
>> .  However, it my test client when I call the /clearPass endpoint I get a
>> 404 Not Found response.
>>
>>
>>
>> I checked to make sure the /clearPass is being mapping with the defined
>> HandlerMapping in clearpass-configuration.xml, and everything looks fine.
>> There are no errors in my logs.
>>
>>
>>
>> Any advice on getting this setup?
>>
>>
>>
>> Thanks!
>>
>>
>>
>> Adam Causey
>>
>> Virginia Commonwealth University
>>
>>
>>
>>
>>
>> --
>>
>> 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
>
>
> --
> 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

Reply via email to