Exception while using Restful API

15 messages Options
Embed this post
Permalink
Ram Mohan

Exception while using Restful API

Reply Threaded More More options
Print post
Permalink
Changed the subject to an appropriate one

---------- Forwarded message ----------
From: Ram Mohan <[hidden email]>
Date: Fri, Jun 19, 2009 at 12:16 AM
Subject: Re: [cas-dev] Need help in authenticating without using login UI
To: [hidden email]


Thanks Andrew for these pointers. they cleared my concepts about cas and how they handle security.

I have a new problem. I implemented a basic Java Restful Client.
while trying to get the TGT, I am getting the following error
java.lang.IllegalStateException: The Web form cannot be parsed as no fresh content is available. If this entity has been already read once, caching of the entity is required

i thought i could be trying to generate a TGT for the user, who already have a active TGT. but, this wasn't the case.

I am attaching the log and also the java client code. Can someone point me where i am going wrong.

-Ram



On Mon, Jun 15, 2009 at 8:48 PM, Andrew Feller <[hidden email]> wrote:
You might also find the white papers on the actual URL protocols useful, too.

http://www.jasig.org/cas/protocol



On 6/15/09 10:10 AM, "Ram Mohan" <ram.mohan@...> wrote:

Thanks Andrew,
I will go through them.

-Ram

On Mon, Jun 15, 2009 at 7:47 PM, Andrew Feller <afelle1@...> wrote:
Ram,

Two things:

1. I think you should spend some time reading about the CAS architecture so you how it works.

    CAS 1 architecture: http://www.jasig.org/cas/cas1-architecture
    CAS 2 architecture: http://www.jasig.org/cas/cas2-architecture
    Proxy authentication: http://www.jasig.org/cas/proxy-authentication

    The TGT is some information granted by the CAS server and retained by the user as proof the user logged in.
    The ST is some information granted by the CAS server, passed along by the user, and verified by CAS client protecting application to ensure user logged in.

2. Check out the RESTful API

    RESTful API: http://www.ja-sig.org/wiki/display/CASUM/RESTful+API

HTH,
A-


On 6/15/09 8:51 AM, "Ram Mohan" <ram.mohan@... <http://ram.mohan@...> > wrote:

Hi,

I am a newbie to CAS and security. In my case, CAS Server 3.3.2 + Acegi CAS Client is used for Authentication.
I took up a task of providing API for username/password authentication i.e, MyClass.authenticate(Credentials credentials).
I think I dont even need to generate a Service Ticket. TGT  cookie is enough.

For me, its simply looking like authentication without the login UI and sending the credentials as parameters in the request.
am i going in the right direction? also, i think application of this sort would already have been implemented as this is a common scenario. Any pointers in this regard would be very helpful

Thanks in advance,
Ram

--
Andrew Feller, Analyst
LSU University Information Services
200 Frey Computing Services Center
Baton Rouge, LA 70803
Office: 225.578.3737
Fax: 225.578.6400

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev


-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

2009-06-19 00:05:37,993 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating instance of bean 'ticketResource'>
2009-06-19 00:05:37,994 DEBUG [org.springframework.beans.factory.annotation.InjectionMetadata] - <Processing injected field of bean 'ticketResource': AutowiredFieldElement for private org.jasig.cas.CentralAuthenticationService org.jasig.cas.integration.restlet.TicketResource.centralAuthenticationService>
2009-06-19 00:05:37,994 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Returning cached instance of singleton bean 'centralAuthenticationService'>
2009-06-19 00:05:37,994 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Finished creating instance of bean 'ticketResource'>
2009-06-19 00:05:37,994 DEBUG [org.jasig.cas.integration.restlet.TicketResource] - <Obtaining credentials...>
2009-06-19 00:05:37,994 DEBUG [com.noelios.restlet.ext.spring.RestletFrameworkServlet] - <Could not complete request>
java.lang.IllegalStateException: The Web form cannot be parsed as no fresh content is available. If this entity has been already read once, caching of the entity is required
        at com.noelios.restlet.util.FormUtils.parse(FormUtils.java:95)
        at com.noelios.restlet.Engine.parse(Engine.java:975)
        at org.restlet.data.Form.<init>(Form.java:74)
        at org.restlet.data.Form.<init>(Form.java:119)
        at org.restlet.data.Message.getEntityAsForm(Message.java:179)
        at org.jasig.cas.integration.restlet.TicketResource.acceptRepresentation(TicketResource.java:56)
        at org.restlet.resource.Resource.post(Resource.java:678)
        at org.restlet.resource.Resource.handlePost(Resource.java:527)
        at org.restlet.Finder.handle(Finder.java:344)
        at org.restlet.Filter.doHandle(Filter.java:137)
        at org.restlet.Filter.handle(Filter.java:180)
        at org.restlet.Router.handle(Router.java:471)
        at com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:130)
        at com.noelios.restlet.ext.spring.RestletFrameworkServlet.doService(RestletFrameworkServlet.java:92)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.inspektr.common.web.ClientInfoThreadLocalFilter.doFilterInternal(ClientInfoThreadLocalFilter.java:48)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
2009-06-19 00:05:37,995 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] - <Publishing event in context [org.springframework.web.context.support.XmlWebApplicationContext@1abbec4]: ServletRequestHandledEvent: url=[//cas-server-webapp-3.3/v1/tickets/]; client=[127.0.0.1]; method=[POST]; servlet=[restlet]; session=[null]; user=[null]; time=[3ms]; status=[failed: java.lang.IllegalStateException: The Web form cannot be parsed as no fresh content is available. If this entity has been already read once, caching of the entity is required]>
2009-06-19 00:05:37,995 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] - <Publishing event in context [org.springframework.web.context.support.XmlWebApplicationContext@1cbda0a]: ServletRequestHandledEvent: url=[//cas-server-webapp-3.3/v1/tickets/]; client=[127.0.0.1]; method=[POST]; servlet=[restlet]; session=[null]; user=[null]; time=[3ms]; status=[failed: java.lang.IllegalStateException: The Web form cannot be parsed as no fresh content is available. If this entity has been already read once, caching of the entity is required]>
2009-06-19 00:05:38,026 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating instance of bean 'ticketGrantingTicketResource'>
2009-06-19 00:05:38,027 DEBUG [org.springframework.beans.factory.annotation.InjectionMetadata] - <Processing injected field of bean 'ticketGrantingTicketResource': AutowiredFieldElement for private org.jasig.cas.CentralAuthenticationService org.jasig.cas.integration.restlet.TicketGrantingTicketResource.centralAuthenticationService>
2009-06-19 00:05:38,027 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Returning cached instance of singleton bean 'centralAuthenticationService'>
2009-06-19 00:05:38,027 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Finished creating instance of bean 'ticketGrantingTicketResource'>
2009-06-19 00:05:38,027 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Attempting to retrieve ticket [null]>
2009-06-19 00:05:38,027 ERROR [org.jasig.cas.integration.restlet.TicketGrantingTicketResource] - <org.jasig.cas.ticket.InvalidTicketException>
org.jasig.cas.ticket.InvalidTicketException
        at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket(CentralAuthenticationServiceImpl.java:177)
        at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket(CentralAuthenticationServiceImpl.java:245)
        at org.jasig.cas.integration.restlet.TicketGrantingTicketResource.acceptRepresentation(TicketGrantingTicketResource.java:67)
        at org.restlet.resource.Resource.post(Resource.java:678)
        at org.restlet.resource.Resource.handlePost(Resource.java:527)
        at org.restlet.Finder.handle(Finder.java:344)
        at org.restlet.Filter.doHandle(Filter.java:137)
        at org.restlet.Filter.handle(Filter.java:180)
        at org.restlet.Router.handle(Router.java:471)
        at com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:130)
        at com.noelios.restlet.ext.spring.RestletFrameworkServlet.doService(RestletFrameworkServlet.java:92)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.inspektr.common.web.ClientInfoThreadLocalFilter.doFilterInternal(ClientInfoThreadLocalFilter.java:48)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
2009-06-19 00:05:38,028 DEBUG [com.noelios.restlet.ext.spring.RestletFrameworkServlet] - <Successfully completed request>
2009-06-19 00:05:38,028 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] - <Publishing event in context [org.springframework.web.context.support.XmlWebApplicationContext@1abbec4]: ServletRequestHandledEvent: url=[//cas-server-webapp-3.3/v1/tickets/null]; client=[127.0.0.1]; method=[POST]; servlet=[restlet]; session=[null]; user=[null]; time=[2ms]; status=[OK]>
2009-06-19 00:05:38,028 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] - <Publishing event in context [org.springframework.web.context.support.XmlWebApplicationContext@1cbda0a]: ServletRequestHandledEvent: url=[//cas-server-webapp-3.3/v1/tickets/null]; client=[127.0.0.1]; method=[POST]; servlet=[restlet]; session=[null]; user=[null]; time=[2ms]; status=[OK]>


[Authenticator.java]

package com.cxps.authenticator;

import java.io.IOException;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.PostMethod;


public class Authenticator {

        public final String CAS_CONTEXT = "cas-server-webapp-3.3";
        public final String RESTLET_SERVLET = "/v1/tickets/";
       
    private static HttpClient client = null;
        private static PostMethod method = null;

        public Authenticator(){
                client = new HttpClient();
        }
       
        public String getTGTString(String CASServiceURL, String username, String password){
                String TGTString = null;
                int returnCode;
               
                CASServiceURL = CASServiceURL + "/"+ CAS_CONTEXT + RESTLET_SERVLET;
               
                PostMethod method = new PostMethod(CASServiceURL);
                //method.addParameter("username", username);
                //method.addParameter("password",password);
                method.addRequestHeader("Content-type", "application/x-www-form-urlencoded");
                method.addRequestHeader("Accept", "text/plain");
               
                try {
                        returnCode = client.executeMethod(method);

                        if (returnCode == HttpStatus.SC_NOT_IMPLEMENTED) {
                System.err.println("The Post method is not implemented by this URI");
            } else {
           
            System.out.println("Return Code of the Post Method: "+ returnCode);
            System.out.println(method.getResponseBodyAsString());
            //String location = method.getResponseHeader("location").toString();
            //TGTString = location.substring(location.lastIndexOf('/')+1);
            System.out.println("The TGTString obtained is"+TGTString);
            }
                       
                } catch (HttpException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } finally {
                        method.releaseConnection();
                }
               
               
                return TGTString;
        }
       
        public String getServiceTicket(String CASServiceURL, String TGT, String service){
                String ServiceTicket = null;
                int returnCode;

                CASServiceURL = CASServiceURL + "/"+ CAS_CONTEXT + RESTLET_SERVLET + TGT;
               
                PostMethod method = new PostMethod(CASServiceURL);
                method.addParameter("service", service);
                method.addRequestHeader("Content-type", "application/x-www-form-urlencoded");
                method.addRequestHeader("Accept", "text/plain");

                try {
                        returnCode = client.executeMethod(method);

                        if (returnCode == HttpStatus.SC_NOT_IMPLEMENTED) {
                System.err.println("The Post method is not implemented by this URI");
            } else {
            System.out.println("Return Code of the Post Method: "+ returnCode);
            ServiceTicket = method.getResponseBodyAsString();
            System.out.println("The ST String obtained is: "+ ServiceTicket);
            }
                       
                } catch (HttpException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } finally {
                        method.releaseConnection();
                }
                return ServiceTicket;
        }

        public static void main(String[] args){
               
                Authenticator auth = new Authenticator();
                String TGT = auth.getTGTString("https://localhost:8443/", "victor", "victor123$");
                System.out.println("TGT string is "+ TGT);
                String ST = auth.getServiceTicket("https://localhost:8443/", TGT, "http://localhost:5000/Seer-Gab/noesis-process");
                System.out.println("ServiceTicket is "+ ST);
               
        }
}

Bryan Wooten

New to CAS, need some help

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi all,

 

I am just trying to get started with CAS and need some guidance and clarifications.

 

I have downloaded cas-server-3.3.2 to my Solaris server. And went to this URL:

 

http://www.jasig.org/cas/using-maven

 

and read this:

 

CAS currently only supports the Maven 1.x releases.  You can download the latest version of Maven from the Maven download site. After installing Maven, be sure to define your MAVEN_HOME environment variable and add Maven to the required path (so it can be run from any directory).

So we download and installed Maven 1.x.  I could not get any of the goals on the page to build.

 

So I go here: http://www.ja-sig.org/wiki/display/CASUM/Building+and+Deploying

 

And read this:

 

As of CAS 3.1, CAS builds exclusively with the Maven 2 Build Management System. This system provides a common build and directory structure across all projects that use Maven 2 and defines common goals that can be applied to any project type (JAR, WAR, EAR, etc.).

 

So now I guess I need to install Maven 2?

 

Lastly can I just deploy modules/cas-server-webapp-3.3.2.war from the tar file on a Glassfish server or must I actually build the code and use the

War file in cas-server-webapp folder as describe on the wiki page:

 

“If you've built CAS as above, you will find a WAR file in the cas-server-webapp folder that you can use to deploy CAS. That's the simple demo case.”

Thanks in advance for any help / advice,

 

Bryan

 

 

 

 

 

 

 

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Scott Battaglia-2

Re: New to CAS, need some help

Reply Threaded More More options
Print post
Permalink
You should follow the instructions in the wiki and use Maven2 to build.  We use probably remove that old documentation (I wasn't aware it was copied over).

If you use the demonstration WAR file that comes with the release, its great for demonstrations, not so great for integrating with your existing Identity Management System.

-Scott


On Thu, Jun 18, 2009 at 4:29 PM, Bryan Wooten <[hidden email]> wrote:

Hi all,

 

I am just trying to get started with CAS and need some guidance and clarifications.

 

I have downloaded cas-server-3.3.2 to my Solaris server. And went to this URL:

 

http://www.jasig.org/cas/using-maven

 

and read this:

 

CAS currently only supports the Maven 1.x releases.  You can download the latest version of Maven from the Maven download site. After installing Maven, be sure to define your MAVEN_HOME environment variable and add Maven to the required path (so it can be run from any directory).

So we download and installed Maven 1.x.  I could not get any of the goals on the page to build.

 

So I go here: http://www.ja-sig.org/wiki/display/CASUM/Building+and+Deploying

 

And read this:

 

As of CAS 3.1, CAS builds exclusively with the Maven 2 Build Management System. This system provides a common build and directory structure across all projects that use Maven 2 and defines common goals that can be applied to any project type (JAR, WAR, EAR, etc.).

 

So now I guess I need to install Maven 2?

 

Lastly can I just deploy modules/cas-server-webapp-3.3.2.war from the tar file on a Glassfish server or must I actually build the code and use the

War file in cas-server-webapp folder as describe on the wiki page:

 

“If you've built CAS as above, you will find a WAR file in the cas-server-webapp folder that you can use to deploy CAS. That's the simple demo case.”

Thanks in advance for any help / advice,

 

Bryan

 

 

 

 

 

 

 

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Bryan Wooten

RE: New to CAS, need some help

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Thanks for the feedback, but I am still have some problems after install maven 2.

 

I’ve set my CAS_HOME to /cas/ cas-server-3.3.2.

 

Following the instructions on the wiki page I entered “mvn package install”.

 

Unfortunately the build fails with many errors.

 

Downloading: http://developer.ja-sig.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

[INFO] Unable to find resource 'asm:asm-attrs:pom:1.5.3' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

821b downloaded  (asm-attrs-1.5.3.pom)

Downloading: http://developer.ja-sig.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

[INFO] Unable to find resource 'dom4j:dom4j:pom:1.6.1' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

 

These type of errors continue for a long time.  My server is not behind a proxy.

 

Any ideas for my next step?

 

Thanks,

 

Bryan

From: Scott Battaglia [mailto:[hidden email]]
Sent: Thursday, June 18, 2009 2:47 PM
To: [hidden email]
Subject: Re: [cas-dev] New to CAS, need some help

 

You should follow the instructions in the wiki and use Maven2 to build.  We use probably remove that old documentation (I wasn't aware it was copied over).

If you use the demonstration WAR file that comes with the release, its great for demonstrations, not so great for integrating with your existing Identity Management System.

-Scott

On Thu, Jun 18, 2009 at 4:29 PM, Bryan Wooten <[hidden email]> wrote:

Hi all,

 

I am just trying to get started with CAS and need some guidance and clarifications.

 

I have downloaded cas-server-3.3.2 to my Solaris server. And went to this URL:

 

http://www.jasig.org/cas/using-maven

 

and read this:

 

CAS currently only supports the Maven 1.x releases.  You can download the latest version of Maven from the Maven download site. After installing Maven, be sure to define your MAVEN_HOME environment variable and add Maven to the required path (so it can be run from any directory).

So we download and installed Maven 1.x.  I could not get any of the goals on the page to build.

 

So I go here: http://www.ja-sig.org/wiki/display/CASUM/Building+and+Deploying

 

And read this:

 

As of CAS 3.1, CAS builds exclusively with the Maven 2 Build Management System. This system provides a common build and directory structure across all projects that use Maven 2 and defines common goals that can be applied to any project type (JAR, WAR, EAR, etc.).

 

So now I guess I need to install Maven 2?

 

Lastly can I just deploy modules/cas-server-webapp-3.3.2.war from the tar file on a Glassfish server or must I actually build the code and use the

War file in cas-server-webapp folder as describe on the wiki page:

 

“If you've built CAS as above, you will find a WAR file in the cas-server-webapp folder that you can use to deploy CAS. That's the simple demo case.”

Thanks in advance for any help / advice,

 

Bryan

 

 

 

 

 

 

 

-- 
You are currently subscribed to [hidden email] as: [hidden email]

 
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

 

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Scott Battaglia-2

Re: New to CAS, need some help

Reply Threaded More More options
Print post
Permalink
Those errors aren't stopping your build.  There should be a final error at the end if you build is failing.


On Fri, Jun 19, 2009 at 10:10 AM, Bryan Wooten <[hidden email]> wrote:

Thanks for the feedback, but I am still have some problems after install maven 2.

 

I’ve set my CAS_HOME to /cas/ cas-server-3.3.2.

 

Following the instructions on the wiki page I entered “mvn package install”.

 

Unfortunately the build fails with many errors.

 

Downloading: http://developer.ja-sig.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

[INFO] Unable to find resource 'asm:asm-attrs:pom:1.5.3' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

821b downloaded  (asm-attrs-1.5.3.pom)

Downloading: http://developer.ja-sig.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

[INFO] Unable to find resource 'dom4j:dom4j:pom:1.6.1' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

 

These type of errors continue for a long time.  My server is not behind a proxy.

 

Any ideas for my next step?

 

Thanks,

 

Bryan

From: Scott Battaglia [mailto:[hidden email]]
Sent: Thursday, June 18, 2009 2:47 PM
To: [hidden email]
Subject: Re: [cas-dev] New to CAS, need some help

 

You should follow the instructions in the wiki and use Maven2 to build.  We use probably remove that old documentation (I wasn't aware it was copied over).

If you use the demonstration WAR file that comes with the release, its great for demonstrations, not so great for integrating with your existing Identity Management System.

-Scott

On Thu, Jun 18, 2009 at 4:29 PM, Bryan Wooten <[hidden email]> wrote:

Hi all,

 

I am just trying to get started with CAS and need some guidance and clarifications.

 

I have downloaded cas-server-3.3.2 to my Solaris server. And went to this URL:

 

http://www.jasig.org/cas/using-maven

 

and read this:

 

CAS currently only supports the Maven 1.x releases.  You can download the latest version of Maven from the Maven download site. After installing Maven, be sure to define your MAVEN_HOME environment variable and add Maven to the required path (so it can be run from any directory).

So we download and installed Maven 1.x.  I could not get any of the goals on the page to build.

 

So I go here: http://www.ja-sig.org/wiki/display/CASUM/Building+and+Deploying

 

And read this:

 

As of CAS 3.1, CAS builds exclusively with the Maven 2 Build Management System. This system provides a common build and directory structure across all projects that use Maven 2 and defines common goals that can be applied to any project type (JAR, WAR, EAR, etc.).

 

So now I guess I need to install Maven 2?

 

Lastly can I just deploy modules/cas-server-webapp-3.3.2.war from the tar file on a Glassfish server or must I actually build the code and use the

War file in cas-server-webapp folder as describe on the wiki page:

 

“If you've built CAS as above, you will find a WAR file in the cas-server-webapp folder that you can use to deploy CAS. That's the simple demo case.”

Thanks in advance for any help / advice,

 

Bryan

 

 

 

 

 

 

 

-- 
You are currently subscribed to [hidden email] as: [hidden email]

 
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

 

-- 
You are currently subscribed to [hidden email] as: [hidden email]

To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Bryan Wooten

RE: New to CAS, need some help

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Ok, those were the first errors and I thought those led to all the following errors.  I re-ran mvn package install and get errors like this now:

 

 

INFO] ------------------------------------------------------------------------

[ERROR] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Compilation failure

 

/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/web/ProxyController.java:[14,46] cannot find symbol

symbol  : class SimpleWebApplicationServiceImpl

location: package org.jasig.cas.authentication.principal

 

/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/CentralAuthenticationService.java:[8,46] cannot find symbol

symbol  : class Credentials

location: package org.jasig.cas.authentication.principal

 

/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/CentralAuthenticationService.java:[44,38] cannot find symbol

symbol  : class Credentials

location: interface org.jasig.cas.CentralAuthenticationService

 

etc….

 

 

From: Scott Battaglia [mailto:[hidden email]]
Sent: Friday, June 19, 2009 8:52 AM
To: [hidden email]
Subject: Re: [cas-dev] New to CAS, need some help

 

Those errors aren't stopping your build.  There should be a final error at the end if you build is failing.

On Fri, Jun 19, 2009 at 10:10 AM, Bryan Wooten <[hidden email]> wrote:

Thanks for the feedback, but I am still have some problems after install maven 2.

 

I’ve set my CAS_HOME to /cas/ cas-server-3.3.2.

 

Following the instructions on the wiki page I entered “mvn package install”.

 

Unfortunately the build fails with many errors.

 

Downloading: http://developer.ja-sig.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

[INFO] Unable to find resource 'asm:asm-attrs:pom:1.5.3' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

821b downloaded  (asm-attrs-1.5.3.pom)

Downloading: http://developer.ja-sig.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

[INFO] Unable to find resource 'dom4j:dom4j:pom:1.6.1' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

 

These type of errors continue for a long time.  My server is not behind a proxy.

 

Any ideas for my next step?

 

Thanks,

 

Bryan

From: Scott Battaglia [mailto:[hidden email]]
Sent: Thursday, June 18, 2009 2:47 PM
To: [hidden email]
Subject: Re: [cas-dev] New to CAS, need some help

 

You should follow the instructions in the wiki and use Maven2 to build.  We use probably remove that old documentation (I wasn't aware it was copied over).

If you use the demonstration WAR file that comes with the release, its great for demonstrations, not so great for integrating with your existing Identity Management System.

-Scott

On Thu, Jun 18, 2009 at 4:29 PM, Bryan Wooten <[hidden email]> wrote:

Hi all,

 

I am just trying to get started with CAS and need some guidance and clarifications.

 

I have downloaded cas-server-3.3.2 to my Solaris server. And went to this URL:

 

http://www.jasig.org/cas/using-maven

 

and read this:

 

CAS currently only supports the Maven 1.x releases.  You can download the latest version of Maven from the Maven download site. After installing Maven, be sure to define your MAVEN_HOME environment variable and add Maven to the required path (so it can be run from any directory).

So we download and installed Maven 1.x.  I could not get any of the goals on the page to build.

 

So I go here: http://www.ja-sig.org/wiki/display/CASUM/Building+and+Deploying

 

And read this:

 

As of CAS 3.1, CAS builds exclusively with the Maven 2 Build Management System. This system provides a common build and directory structure across all projects that use Maven 2 and defines common goals that can be applied to any project type (JAR, WAR, EAR, etc.).

 

So now I guess I need to install Maven 2?

 

Lastly can I just deploy modules/cas-server-webapp-3.3.2.war from the tar file on a Glassfish server or must I actually build the code and use the

War file in cas-server-webapp folder as describe on the wiki page:

 

“If you've built CAS as above, you will find a WAR file in the cas-server-webapp folder that you can use to deploy CAS. That's the simple demo case.”

Thanks in advance for any help / advice,

 

Bryan

 

 

 

 

 

 

 

-- 

You are currently subscribed to [hidden email] as: [hidden email]



 
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

 

-- 

You are currently subscribed to [hidden email] as: [hidden email]
 
 


To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
-- 
You are currently subscribed to [hidden email] as: [hidden email]

 
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

 

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Scott Battaglia-2

Re: New to CAS, need some help

Reply Threaded More More options
Print post
Permalink
From which directory are you executing Maven2?  Also, make sure there is nothing else on your classpath accidentally.

Cheers,
Scott

On Fri, Jun 19, 2009 at 11:26 AM, Bryan Wooten <[hidden email]> wrote:

Ok, those were the first errors and I thought those led to all the following errors.  I re-ran mvn package install and get errors like this now:

 

 

INFO] ------------------------------------------------------------------------

[ERROR] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Compilation failure

 

/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/web/ProxyController.java:[14,46] cannot find symbol

symbol  : class SimpleWebApplicationServiceImpl

location: package org.jasig.cas.authentication.principal

 

/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/CentralAuthenticationService.java:[8,46] cannot find symbol

symbol  : class Credentials

location: package org.jasig.cas.authentication.principal

 

/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/CentralAuthenticationService.java:[44,38] cannot find symbol

symbol  : class Credentials

location: interface org.jasig.cas.CentralAuthenticationService

 

etc….

 

 

From: Scott Battaglia [mailto:[hidden email]]
Sent: Friday, June 19, 2009 8:52 AM


To: [hidden email]
Subject: Re: [cas-dev] New to CAS, need some help

 

Those errors aren't stopping your build.  There should be a final error at the end if you build is failing.

On Fri, Jun 19, 2009 at 10:10 AM, Bryan Wooten <[hidden email]> wrote:

Thanks for the feedback, but I am still have some problems after install maven 2.

 

I’ve set my CAS_HOME to /cas/ cas-server-3.3.2.

 

Following the instructions on the wiki page I entered “mvn package install”.

 

Unfortunately the build fails with many errors.

 

Downloading: http://developer.ja-sig.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

[INFO] Unable to find resource 'asm:asm-attrs:pom:1.5.3' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

821b downloaded  (asm-attrs-1.5.3.pom)

Downloading: http://developer.ja-sig.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

[INFO] Unable to find resource 'dom4j:dom4j:pom:1.6.1' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

 

These type of errors continue for a long time.  My server is not behind a proxy.

 

Any ideas for my next step?

 

Thanks,

 

Bryan

From: Scott Battaglia [mailto:[hidden email]]
Sent: Thursday, June 18, 2009 2:47 PM
To: [hidden email]
Subject: Re: [cas-dev] New to CAS, need some help

 

You should follow the instructions in the wiki and use Maven2 to build.  We use probably remove that old documentation (I wasn't aware it was copied over).

If you use the demonstration WAR file that comes with the release, its great for demonstrations, not so great for integrating with your existing Identity Management System.

-Scott

On Thu, Jun 18, 2009 at 4:29 PM, Bryan Wooten <[hidden email]> wrote:

Hi all,

 

I am just trying to get started with CAS and need some guidance and clarifications.

 

I have downloaded cas-server-3.3.2 to my Solaris server. And went to this URL:

 

http://www.jasig.org/cas/using-maven

 

and read this:

 

CAS currently only supports the Maven 1.x releases.  You can download the latest version of Maven from the Maven download site. After installing Maven, be sure to define your MAVEN_HOME environment variable and add Maven to the required path (so it can be run from any directory).

So we download and installed Maven 1.x.  I could not get any of the goals on the page to build.

 

So I go here: http://www.ja-sig.org/wiki/display/CASUM/Building+and+Deploying

 

And read this:

 

As of CAS 3.1, CAS builds exclusively with the Maven 2 Build Management System. This system provides a common build and directory structure across all projects that use Maven 2 and defines common goals that can be applied to any project type (JAR, WAR, EAR, etc.).

 

So now I guess I need to install Maven 2?

 

Lastly can I just deploy modules/cas-server-webapp-3.3.2.war from the tar file on a Glassfish server or must I actually build the code and use the

War file in cas-server-webapp folder as describe on the wiki page:

 

“If you've built CAS as above, you will find a WAR file in the cas-server-webapp folder that you can use to deploy CAS. That's the simple demo case.”

Thanks in advance for any help / advice,

 

Bryan

 

 

 

 

 

 

 

-- 

You are currently subscribed to [hidden email] as: [hidden email]



 
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

 

-- 

You are currently subscribed to [hidden email] as: [hidden email]
 
 


To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
-- 
You are currently subscribed to [hidden email] as: [hidden email]

 
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

 

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Bryan Wooten

RE: New to CAS, need some help

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

I am running maven from this directory:

 

$ pwd

/u/dpbw/cas/cas-server-3.3.2

$ ls

INSTALL.txt                        cas-server-support-generic         cas-server-support-x509

README.txt                         cas-server-support-jdbc            cas-server-webapp

assembly.xml                       cas-server-support-ldap            license.txt

cas-server-core                    cas-server-support-legacy          modules

cas-server-integration-berkeleydb  cas-server-support-openid          notice.txt

cas-server-integration-jboss       cas-server-support-radius          pom.xml

cas-server-integration-memcached   cas-server-support-spnego

cas-server-integration-restlet     cas-server-support-trusted

 

I also have these settings:

 

JAVA_HOME=/usr/java

CAS_HOME=/u/dpbw/cas/cas-server-3.3.2

MAVEN_HOME=/usr/local/maven-2.1.0

 

 

I run this:

 

cliff-->mvn package install

[INFO] Scanning for projects...

[INFO] Reactor build order:

[INFO]   JA-SIG Central Authentication Service

[INFO]   JA-SIG CAS Core

[INFO]   JA-SIG CAS Generic Support

[INFO]   JA-SIG CAS JDBC Support

[INFO]   JA-SIG CAS LDAP Support

[INFO]   JA-SIG CAS Legacy Support

[INFO]   JA-SIG CAS OpenId Support

[INFO]   JA-SIG CAS RADIUS Support

[INFO]   JA-SIG CAS SPNEGO/NTLM Support

[INFO]   JA-SIG CAS Trusted User Support

[INFO]   JA-SIG CAS X.509 Client Certificate Support

[INFO]   JA-SIG CAS JBoss Cache Integration

[INFO]   JA-SIG CAS BerkeleyDB Integration

[INFO]   JA-SIG CAS Memcached Integration

[INFO]   JA-SIG CAS Restlet Integration

[INFO]   JA-SIG CAS Web Application

[INFO] ------------------------------------------------------------------------

[INFO] Building JA-SIG Central Authentication Service

[INFO]    task-segment: [package, install]

[INFO] ------------------------------------------------------------------------

[INFO] [enforcer:enforce {execution: enforce-versions}]

[INFO] [site:attach-descriptor]

[INFO] Preparing source:jar

[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.

[INFO] [enforcer:enforce {execution: enforce-versions}]

[INFO] [source:jar {execution: attach-sources}]

[INFO] [enforcer:enforce {execution: enforce-versions}]

[INFO] [site:attach-descriptor]

[INFO] Preparing source:jar

[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.

[INFO] [enforcer:enforce {execution: enforce-versions}]

[INFO] [source:jar {execution: attach-sources}]

[INFO] [install:install]

[INFO] Installing /u/dpbw/cas/cas-server-3.3.2/target/pom-transformed.xml to /u/dpbw/.m2/repository/org/jasig/cas/cas-server/3.3.2/cas-server-3.3.2.pom

[INFO] ------------------------------------------------------------------------

[INFO] Building JA-SIG CAS Core

[INFO]    task-segment: [package, install]

[INFO] ------------------------------------------------------------------------

Downloading: http://developer.ja-sig.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom

[INFO] Unable to find resource 'org.apache.santuario:xmlsec:pom:1.4.0' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom

[INFO] Unable to find resource 'org.apache.santuario:xmlsec:pom:1.4.0' in repository central (http://repo1.maven.org/maven2)

Downloading: http://developer.ja-sig.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom

[INFO] Unable to find resource 'org.opensaml:opensaml:pom:1.1b' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom

[INFO] Unable to find resource 'org.opensaml:opensaml:pom:1.1b' in repository central (http://repo1.maven.org/maven2)

[INFO] [enforcer:enforce {execution: enforce-versions}]

[INFO] [resources:resources]

[WARNING] Using platform encoding (ISO646-US actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] Copying 1 resource

[INFO] [compiler:compile]

[INFO] Compiling 62 source files to /u/dpbw/cas/cas-server-3.3.2/cas-server-core/target/classes

[INFO] ------------------------------------------------------------------------

[ERROR] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Compilation failure

 

/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/web/ProxyController.java:[14,46] cannot find symbol

symbol  : class SimpleWebApplicationServiceImpl

location: package org.jasig.cas.authentication.principal

 

 

 

 

 

 

From: Scott Battaglia [mailto:[hidden email]]
Sent: Saturday, June 20, 2009 12:55 PM
To: [hidden email]
Subject: Re: [cas-dev] New to CAS, need some help

 

From which directory are you executing Maven2?  Also, make sure there is nothing else on your classpath accidentally.

Cheers,
Scott

On Fri, Jun 19, 2009 at 11:26 AM, Bryan Wooten <[hidden email]> wrote:

Ok, those were the first errors and I thought those led to all the following errors.  I re-ran mvn package install and get errors like this now:

 

 

INFO] ------------------------------------------------------------------------

[ERROR] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Compilation failure

 

/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/web/ProxyController.java:[14,46] cannot find symbol

symbol  : class SimpleWebApplicationServiceImpl

location: package org.jasig.cas.authentication.principal

 

/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/CentralAuthenticationService.java:[8,46] cannot find symbol

symbol  : class Credentials

location: package org.jasig.cas.authentication.principal

 

/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/CentralAuthenticationService.java:[44,38] cannot find symbol

symbol  : class Credentials

location: interface org.jasig.cas.CentralAuthenticationService

 

etc….

 

 

From: Scott Battaglia [mailto:[hidden email]]
Sent: Friday, June 19, 2009 8:52 AM


To: [hidden email]
Subject: Re: [cas-dev] New to CAS, need some help

 

Those errors aren't stopping your build.  There should be a final error at the end if you build is failing.

On Fri, Jun 19, 2009 at 10:10 AM, Bryan Wooten <[hidden email]> wrote:

Thanks for the feedback, but I am still have some problems after install maven 2.

 

I’ve set my CAS_HOME to /cas/ cas-server-3.3.2.

 

Following the instructions on the wiki page I entered “mvn package install”.

 

Unfortunately the build fails with many errors.

 

Downloading: http://developer.ja-sig.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

[INFO] Unable to find resource 'asm:asm-attrs:pom:1.5.3' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

821b downloaded  (asm-attrs-1.5.3.pom)

Downloading: http://developer.ja-sig.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

[INFO] Unable to find resource 'dom4j:dom4j:pom:1.6.1' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

 

These type of errors continue for a long time.  My server is not behind a proxy.

 

Any ideas for my next step?

 

Thanks,

 

Bryan

From: Scott Battaglia [mailto:[hidden email]]
Sent: Thursday, June 18, 2009 2:47 PM
To: [hidden email]
Subject: Re: [cas-dev] New to CAS, need some help

 

You should follow the instructions in the wiki and use Maven2 to build.  We use probably remove that old documentation (I wasn't aware it was copied over).

If you use the demonstration WAR file that comes with the release, its great for demonstrations, not so great for integrating with your existing Identity Management System.

-Scott

On Thu, Jun 18, 2009 at 4:29 PM, Bryan Wooten <[hidden email]> wrote:

Hi all,

 

I am just trying to get started with CAS and need some guidance and clarifications.

 

I have downloaded cas-server-3.3.2 to my Solaris server. And went to this URL:

 

http://www.jasig.org/cas/using-maven

 

and read this:

 

CAS currently only supports the Maven 1.x releases.  You can download the latest version of Maven from the Maven download site. After installing Maven, be sure to define your MAVEN_HOME environment variable and add Maven to the required path (so it can be run from any directory).

So we download and installed Maven 1.x.  I could not get any of the goals on the page to build.

 

So I go here: http://www.ja-sig.org/wiki/display/CASUM/Building+and+Deploying

 

And read this:

 

As of CAS 3.1, CAS builds exclusively with the Maven 2 Build Management System. This system provides a common build and directory structure across all projects that use Maven 2 and defines common goals that can be applied to any project type (JAR, WAR, EAR, etc.).

 

So now I guess I need to install Maven 2?

 

Lastly can I just deploy modules/cas-server-webapp-3.3.2.war from the tar file on a Glassfish server or must I actually build the code and use the

War file in cas-server-webapp folder as describe on the wiki page:

 

“If you've built CAS as above, you will find a WAR file in the cas-server-webapp folder that you can use to deploy CAS. That's the simple demo case.”

Thanks in advance for any help / advice,

 

Bryan

 

 

 

 

 

 

 

-- 



You are currently subscribed to [hidden email] as: [hidden email]

 
 






 
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

 

-- 



You are currently subscribed to [hidden email] as: [hidden email]
 
 




To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
-- 

You are currently subscribed to [hidden email] as: [hidden email]



 
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

 

-- 

You are currently subscribed to [hidden email] as: [hidden email]

To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
-- 
You are currently subscribed to [hidden email] as: [hidden email]

 
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

 

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Andrew Feller

Re: New to CAS, need some help

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Re: [cas-dev] New to CAS, need some help Bryan,

I don’t know if this something big or not, but I know that Maven2 typically expects an environment variable of M2_HOME rather than MAVEN_HOME as MAVEN_HOME is expected by Maven1.  Other than that, I am not a Maven expert, so I am sorry if that proves no help.

A-


On 6/22/09 8:06 AM, "Bryan Wooten" <bwooten@...> wrote:

I am running maven from this directory:
 
$ pwd
/u/dpbw/cas/cas-server-3.3.2
$ ls
INSTALL.txt                       cas-server-support-generic        cas-server-support-x509
README.txt                        cas-server-support-jdbc           cas-server-webapp
assembly.xml                      cas-server-support-ldap           license.txt
cas-server-core                   cas-server-support-legacy         modules
cas-server-integration-berkeleydb cas-server-support-openid         notice.txt
cas-server-integration-jboss      cas-server-support-radius         pom.xml
cas-server-integration-memcached  cas-server-support-spnego
cas-server-integration-restlet    cas-server-support-trusted
 
I also have these settings:
 
JAVA_HOME=/usr/java
CAS_HOME=/u/dpbw/cas/cas-server-3.3.2
MAVEN_HOME=/usr/local/maven-2.1.0
 
 
I run this:
 
cliff-->mvn package install
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   JA-SIG Central Authentication Service
[INFO]   JA-SIG CAS Core
[INFO]   JA-SIG CAS Generic Support
[INFO]   JA-SIG CAS JDBC Support
[INFO]   JA-SIG CAS LDAP Support
[INFO]   JA-SIG CAS Legacy Support
[INFO]   JA-SIG CAS OpenId Support
[INFO]   JA-SIG CAS RADIUS Support
[INFO]   JA-SIG CAS SPNEGO/NTLM Support
[INFO]   JA-SIG CAS Trusted User Support
[INFO]   JA-SIG CAS X.509 Client Certificate Support
[INFO]   JA-SIG CAS JBoss Cache Integration
[INFO]   JA-SIG CAS BerkeleyDB Integration
[INFO]   JA-SIG CAS Memcached Integration
[INFO]   JA-SIG CAS Restlet Integration
[INFO]   JA-SIG CAS Web Application
[INFO] ------------------------------------------------------------------------
[INFO] Building JA-SIG Central Authentication Service
[INFO]    task-segment: [package, install]
[INFO] ------------------------------------------------------------------------
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [site:attach-descriptor]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [source:jar {execution: attach-sources}]
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [site:attach-descriptor]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [source:jar {execution: attach-sources}]
[INFO] [install:install]
[INFO] Installing /u/dpbw/cas/cas-server-3.3.2/target/pom-transformed.xml to /u/dpbw/.m2/repository/org/jasig/cas/cas-server/3.3.2/cas-server-3.3.2.pom
[INFO] ------------------------------------------------------------------------
[INFO] Building JA-SIG CAS Core
[INFO]    task-segment: [package, install]
[INFO] ------------------------------------------------------------------------
Downloading: http://developer.ja-sig.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom
[INFO] Unable to find resource 'org.apache.santuario:xmlsec:pom:1.4.0' in repository jasig-repository (http://developer.ja-sig.org/maven2)
Downloading: http://repo1.maven.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom
[INFO] Unable to find resource 'org.apache.santuario:xmlsec:pom:1.4.0' in repository central (http://repo1.maven.org/maven2)
Downloading: http://developer.ja-sig.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom
[INFO] Unable to find resource 'org.opensaml:opensaml:pom:1.1b' in repository jasig-repository (http://developer.ja-sig.org/maven2)
Downloading: http://repo1.maven.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom
[INFO] Unable to find resource 'org.opensaml:opensaml:pom:1.1b' in repository central (http://repo1.maven.org/maven2)
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [resources:resources]
[WARNING] Using platform encoding (ISO646-US actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] [compiler:compile]
[INFO] Compiling 62 source files to /u/dpbw/cas/cas-server-3.3.2/cas-server-core/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
 
/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/web/ProxyController.java:[14,46] cannot find symbol
symbol  : class SimpleWebApplicationServiceImpl
location: package org.jasig.cas.authentication.principal
 
 
 
 
 
 

From: Scott Battaglia [[hidden email]]
Sent: Saturday, June 20, 2009 12:55 PM
To: cas-dev@...
Subject: Re: [cas-dev] New to CAS, need some help

From which directory are you executing Maven2?  Also, make sure there is nothing else on your classpath accidentally.

Cheers,
Scott

On Fri, Jun 19, 2009 at 11:26 AM, Bryan Wooten <bwooten@...> wrote:

Ok, those were the first errors and I thought those led to all the following errors.  I re-ran mvn package install and get errors like this now:





INFO] ------------------------------------------------------------------------

[ERROR] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Compilation failure



/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/web/ProxyController.java:[14,46] cannot find symbol

symbol  : class SimpleWebApplicationServiceImpl

location: package org.jasig.cas.authentication.principal



/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/CentralAuthenticationService.java:[8,46] cannot find symbol

symbol  : class Credentials

location: package org.jasig.cas.authentication.principal



/u/dpbw/cas/cas-server-3.3.2/cas-server-core/src/main/java/org/jasig/cas/CentralAuthenticationService.java:[44,38] cannot find symbol

symbol  : class Credentials

location: interface org.jasig.cas.CentralAuthenticationService



etc….





From: Scott Battaglia [[hidden email]]
Sent: Friday, June 19, 2009 8:52 AM


To: cas-dev@...
Subject: Re: [cas-dev] New to CAS, need some help



Those errors aren't stopping your build. There should be a final error at the end if you build is failing.

On Fri, Jun 19, 2009 at 10:10 AM, Bryan Wooten <bwooten@...> wrote:

Thanks for the feedback, but I am still have some problems after install maven 2.



I’ve set my CAS_HOME to /cas/
cas-server-3.3.2.



Following the instructions on the wiki page I entered “mvn package install”.



Unfortunately the build fails with many errors.



Downloading: http://developer.ja-sig.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

[INFO] Unable to find resource 'asm:asm-attrs:pom:1.5.3' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.pom

821b downloaded (asm-attrs-1.5.3.pom)

Downloading: http://developer.ja-sig.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

[INFO] Unable to find resource 'dom4j:dom4j:pom:1.6.1' in repository jasig-repository (http://developer.ja-sig.org/maven2)

Downloading: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom



These type of errors continue for a long time.  My server is not behind a proxy.



Any ideas for my next step?



Thanks,



Bryan

From: Scott Battaglia [[hidden email]]
Sent: Thursday, June 18, 2009 2:47 PM
To: cas-dev@...
Subject: Re: [cas-dev] New to CAS, need some help



You should follow the instructions in the wiki and use Maven2 to build.  We use probably remove that old documentation (I wasn't aware it was copied over).

If you use the demonstration WAR file that comes with the release, its great for demonstrations, not so great for integrating with your existing Identity Management System.

-Scott

On Thu, Jun 18, 2009 at 4:29 PM, Bryan Wooten <bwooten@...> wrote:

Hi all,



I am just trying to get started with CAS and need some guidance and clarifications.



I have downloaded cas-server-3.3.2 to my Solaris server. And went to this URL:



http://www.jasig.org/cas/using-maven



and read this:



CAS currently only supports the Maven 1.x releases.  You can download the latest version of Maven from the Maven download site <http://maven.apache.org/maven-1.x/start/download.html> . After installing Maven, be sure to define your MAVEN_HOME environment variable and add Maven to the required path (so it can be run from any directory).
So we download and installed Maven 1.x.  I could not get any of the goals on the page to build.



So I go here: http://www.ja-sig.org/wiki/display/CASUM/Building+and+Deploying



And read this:



As of CAS 3.1, CAS builds exclusively with the Maven 2 Build Management System. This system provides a common build and directory structure across all projects that use Maven 2 and defines common goals that can be applied to any project type (JAR, WAR, EAR, etc.).


So now I guess I need to install Maven 2?



Lastly can I just deploy modules/cas-server-webapp-3.3.2.war from the tar file on a Glassfish server or must I actually build the code and use the

War file in cas-server-webapp folder as describe on the wiki page:



“If you've built CAS as above, you will find a WAR file in the cas-server-webapp folder that you can use to deploy CAS. That's the simple demo case.”
Thanks in advance for any help / advice,
 
Bryan














--
Andrew Feller, Analyst
LSU University Information Services
200 Frey Computing Services Center
Baton Rouge, LA 70803
Office: 225.578.3737
Fax: 225.578.6400

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Ram Mohan

Re: Exception while using Restful API

Reply Threaded More More options
Print post
Permalink
In reply to this post by Ram Mohan
Hi,

Any idea why this problem is coming up? is there an issue on how i am accessing the API calls.
Java client code for restful APIs would have been implemented before. is there a chance for me to have a look at these examples.

-Ram

On Fri, Jun 19, 2009 at 1:40 AM, Ram Mohan <[hidden email]> wrote:
Changed the subject to an appropriate one

---------- Forwarded message ----------
From: Ram Mohan <[hidden email]>
Date: Fri, Jun 19, 2009 at 12:16 AM
Subject: Re: [cas-dev] Need help in authenticating without using login UI
To: [hidden email]


Thanks Andrew for these pointers. they cleared my concepts about cas and how they handle security.

I have a new problem. I implemented a basic Java Restful Client.
while trying to get the TGT, I am getting the following error
java.lang.IllegalStateException: The Web form cannot be parsed as no fresh content is available. If this entity has been already read once, caching of the entity is required

i thought i could be trying to generate a TGT for the user, who already have a active TGT. but, this wasn't the case.

I am attaching the log and also the java client code. Can someone point me where i am going wrong.

-Ram



On Mon, Jun 15, 2009 at 8:48 PM, Andrew Feller <[hidden email]> wrote:
You might also find the white papers on the actual URL protocols useful, too.

http://www.jasig.org/cas/protocol



On 6/15/09 10:10 AM, "Ram Mohan" <ram.mohan@...> wrote:

Thanks Andrew,
I will go through them.

-Ram

On Mon, Jun 15, 2009 at 7:47 PM, Andrew Feller <afelle1@...> wrote:
Ram,

Two things:

1. I think you should spend some time reading about the CAS architecture so you how it works.

    CAS 1 architecture: http://www.jasig.org/cas/cas1-architecture
    CAS 2 architecture: http://www.jasig.org/cas/cas2-architecture
    Proxy authentication: http://www.jasig.org/cas/proxy-authentication

    The TGT is some information granted by the CAS server and retained by the user as proof the user logged in.
    The ST is some information granted by the CAS server, passed along by the user, and verified by CAS client protecting application to ensure user logged in.

2. Check out the RESTful API

    RESTful API: http://www.ja-sig.org/wiki/display/CASUM/RESTful+API

HTH,
A-


On 6/15/09 8:51 AM, "Ram Mohan" <ram.mohan@... <http://ram.mohan@...> > wrote:

Hi,

I am a newbie to CAS and security. In my case, CAS Server 3.3.2 + Acegi CAS Client is used for Authentication.
I took up a task of providing API for username/password authentication i.e, MyClass.authenticate(Credentials credentials).
I think I dont even need to generate a Service Ticket. TGT  cookie is enough.

For me, its simply looking like authentication without the login UI and sending the credentials as parameters in the request.
am i going in the right direction? also, i think application of this sort would already have been implemented as this is a common scenario. Any pointers in this regard would be very helpful

Thanks in advance,
Ram

--
Andrew Feller, Analyst
LSU University Information Services
200 Frey Computing Services Center
Baton Rouge, LA 70803
Office: 225.578.3737
Fax: 225.578.6400

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev



-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

2009-06-19 00:05:37,993 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating instance of bean 'ticketResource'>
2009-06-19 00:05:37,994 DEBUG [org.springframework.beans.factory.annotation.InjectionMetadata] - <Processing injected field of bean 'ticketResource': AutowiredFieldElement for private org.jasig.cas.CentralAuthenticationService org.jasig.cas.integration.restlet.TicketResource.centralAuthenticationService>
2009-06-19 00:05:37,994 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Returning cached instance of singleton bean 'centralAuthenticationService'>
2009-06-19 00:05:37,994 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Finished creating instance of bean 'ticketResource'>
2009-06-19 00:05:37,994 DEBUG [org.jasig.cas.integration.restlet.TicketResource] - <Obtaining credentials...>
2009-06-19 00:05:37,994 DEBUG [com.noelios.restlet.ext.spring.RestletFrameworkServlet] - <Could not complete request>
java.lang.IllegalStateException: The Web form cannot be parsed as no fresh content is available. If this entity has been already read once, caching of the entity is required
        at com.noelios.restlet.util.FormUtils.parse(FormUtils.java:95)
        at com.noelios.restlet.Engine.parse(Engine.java:975)
        at org.restlet.data.Form.<init>(Form.java:74)
        at org.restlet.data.Form.<init>(Form.java:119)
        at org.restlet.data.Message.getEntityAsForm(Message.java:179)
        at org.jasig.cas.integration.restlet.TicketResource.acceptRepresentation(TicketResource.java:56)
        at org.restlet.resource.Resource.post(Resource.java:678)
        at org.restlet.resource.Resource.handlePost(Resource.java:527)
        at org.restlet.Finder.handle(Finder.java:344)
        at org.restlet.Filter.doHandle(Filter.java:137)
        at org.restlet.Filter.handle(Filter.java:180)
        at org.restlet.Router.handle(Router.java:471)
        at com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:130)
        at com.noelios.restlet.ext.spring.RestletFrameworkServlet.doService(RestletFrameworkServlet.java:92)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.inspektr.common.web.ClientInfoThreadLocalFilter.doFilterInternal(ClientInfoThreadLocalFilter.java:48)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
2009-06-19 00:05:37,995 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] - <Publishing event in context [org.springframework.web.context.support.XmlWebApplicationContext@1abbec4]: ServletRequestHandledEvent: url=[//cas-server-webapp-3.3/v1/tickets/]; client=[127.0.0.1]; method=[POST]; servlet=[restlet]; session=[null]; user=[null]; time=[3ms]; status=[failed: java.lang.IllegalStateException: The Web form cannot be parsed as no fresh content is available. If this entity has been already read once, caching of the entity is required]>
2009-06-19 00:05:37,995 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] - <Publishing event in context [org.springframework.web.context.support.XmlWebApplicationContext@1cbda0a]: ServletRequestHandledEvent: url=[//cas-server-webapp-3.3/v1/tickets/]; client=[127.0.0.1]; method=[POST]; servlet=[restlet]; session=[null]; user=[null]; time=[3ms]; status=[failed: java.lang.IllegalStateException: The Web form cannot be parsed as no fresh content is available. If this entity has been already read once, caching of the entity is required]>
2009-06-19 00:05:38,026 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating instance of bean 'ticketGrantingTicketResource'>
2009-06-19 00:05:38,027 DEBUG [org.springframework.beans.factory.annotation.InjectionMetadata] - <Processing injected field of bean 'ticketGrantingTicketResource': AutowiredFieldElement for private org.jasig.cas.CentralAuthenticationService org.jasig.cas.integration.restlet.TicketGrantingTicketResource.centralAuthenticationService>
2009-06-19 00:05:38,027 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Returning cached instance of singleton bean 'centralAuthenticationService'>
2009-06-19 00:05:38,027 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Finished creating instance of bean 'ticketGrantingTicketResource'>
2009-06-19 00:05:38,027 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Attempting to retrieve ticket [null]>
2009-06-19 00:05:38,027 ERROR [org.jasig.cas.integration.restlet.TicketGrantingTicketResource] - <org.jasig.cas.ticket.InvalidTicketException>
org.jasig.cas.ticket.InvalidTicketException
        at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket(CentralAuthenticationServiceImpl.java:177)
        at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket(CentralAuthenticationServiceImpl.java:245)
        at org.jasig.cas.integration.restlet.TicketGrantingTicketResource.acceptRepresentation(TicketGrantingTicketResource.java:67)
        at org.restlet.resource.Resource.post(Resource.java:678)
        at org.restlet.resource.Resource.handlePost(Resource.java:527)
        at org.restlet.Finder.handle(Finder.java:344)
        at org.restlet.Filter.doHandle(Filter.java:137)
        at org.restlet.Filter.handle(Filter.java:180)
        at org.restlet.Router.handle(Router.java:471)
        at com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:130)
        at com.noelios.restlet.ext.spring.RestletFrameworkServlet.doService(RestletFrameworkServlet.java:92)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.inspektr.common.web.ClientInfoThreadLocalFilter.doFilterInternal(ClientInfoThreadLocalFilter.java:48)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
2009-06-19 00:05:38,028 DEBUG [com.noelios.restlet.ext.spring.RestletFrameworkServlet] - <Successfully completed request>
2009-06-19 00:05:38,028 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] - <Publishing event in context [org.springframework.web.context.support.XmlWebApplicationContext@1abbec4]: ServletRequestHandledEvent: url=[//cas-server-webapp-3.3/v1/tickets/null]; client=[127.0.0.1]; method=[POST]; servlet=[restlet]; session=[null]; user=[null]; time=[2ms]; status=[OK]>
2009-06-19 00:05:38,028 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] - <Publishing event in context [org.springframework.web.context.support.XmlWebApplicationContext@1cbda0a]: ServletRequestHandledEvent: url=[//cas-server-webapp-3.3/v1/tickets/null]; client=[127.0.0.1]; method=[POST]; servlet=[restlet]; session=[null]; user=[null]; time=[2ms]; status=[OK]>


[Authenticator.java]

package com.cxps.authenticator;

import java.io.IOException;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.PostMethod;


public class Authenticator {

        public final String CAS_CONTEXT = "cas-server-webapp-3.3";
        public final String RESTLET_SERVLET = "/v1/tickets/";
       
    private static HttpClient client = null;
        private static PostMethod method = null;

        public Authenticator(){
                client = new HttpClient();
        }
       
        public String getTGTString(String CASServiceURL, String username, String password){
                String TGTString = null;
                int returnCode;
               
                CASServiceURL = CASServiceURL + "/"+ CAS_CONTEXT + RESTLET_SERVLET;
               
                PostMethod method = new PostMethod(CASServiceURL);
                //method.addParameter("username", username);
                //method.addParameter("password",password);
                method.addRequestHeader("Content-type", "application/x-www-form-urlencoded");
                method.addRequestHeader("Accept", "text/plain");
               
                try {
                        returnCode = client.executeMethod(method);

                        if (returnCode == HttpStatus.SC_NOT_IMPLEMENTED) {
                System.err.println("The Post method is not implemented by this URI");
            } else {
           
            System.out.println("Return Code of the Post Method: "+ returnCode);
            System.out.println(method.getResponseBodyAsString());
            //String location = method.getResponseHeader("location").toString();
            //TGTString = location.substring(location.lastIndexOf('/')+1);
            System.out.println("The TGTString obtained is"+TGTString);
            }
                       
                } catch (HttpException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } finally {
                        method.releaseConnection();
                }
               
               
                return TGTString;
        }
       
        public String getServiceTicket(String CASServiceURL, String TGT, String service){
                String ServiceTicket = null;
                int returnCode;

                CASServiceURL = CASServiceURL + "/"+ CAS_CONTEXT + RESTLET_SERVLET + TGT;
               
                PostMethod method = new PostMethod(CASServiceURL);
                method.addParameter("service", service);
                method.addRequestHeader("Content-type", "application/x-www-form-urlencoded");
                method.addRequestHeader("Accept", "text/plain");

                try {
                        returnCode = client.executeMethod(method);

                        if (returnCode == HttpStatus.SC_NOT_IMPLEMENTED) {
                System.err.println("The Post method is not implemented by this URI");
            } else {
            System.out.println("Return Code of the Post Method: "+ returnCode);
            ServiceTicket = method.getResponseBodyAsString();
            System.out.println("The ST String obtained is: "+ ServiceTicket);
            }
                       
                } catch (HttpException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } finally {
                        method.releaseConnection();
                }
                return ServiceTicket;
        }

        public static void main(String[] args){
               
                Authenticator auth = new Authenticator();
                String TGT = auth.getTGTString("https://localhost:8443/", "victor", "victor123$");
                System.out.println("TGT string is "+ TGT);
                String ST = auth.getServiceTicket("https://localhost:8443/", TGT, "http://localhost:5000/Seer-Gab/noesis-process");
                System.out.println("ServiceTicket is "+ ST);
               
        }
}

Marvin Addison

Re: Exception while using Restful API

Reply Threaded More More options
Print post
Permalink
I see you have some print statements for printing out the TGT.  Can
you even get that far?  In the stack trace you sent, it appears you
aren't sending a TGT, thus the line:

<Attempting to retrieve ticket [null]>

M

--
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Ram Mohan

Re: Exception while using Restful API

Reply Threaded More More options
Print post
Permalink
yes, these statements are getting printed.
the return code of TGT is 501. and the exception reported is the message body.
as there was an exception while TGT generation, TGT is returned as null.
the log, which Marvin is talking about is generated while trying to get ST with this TGT.

-Ram

On Mon, Jun 22, 2009 at 8:34 PM, Marvin Addison <[hidden email]> wrote:
I see you have some print statements for printing out the TGT.  Can
you even get that far?  In the stack trace you sent, it appears you
aren't sending a TGT, thus the line:

<Attempting to retrieve ticket [null]>

M

--
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Ram Mohan

Re: Exception while using Restful API

Reply Threaded More More options
Print post
Permalink
The problem is resolved. It seems i provided incorrect parameters and also my customized beans are not supporting this restful API.
the necessary corrections were made in the bean. its working fine.

Thanks,
Ram

On Mon, Jun 22, 2009 at 11:06 PM, Ram Mohan <[hidden email]> wrote:
yes, these statements are getting printed.
the return code of TGT is 501. and the exception reported is the message body.
as there was an exception while TGT generation, TGT is returned as null.
the log, which Marvin is talking about is generated while trying to get ST with this TGT.

-Ram


On Mon, Jun 22, 2009 at 8:34 PM, Marvin Addison <[hidden email]> wrote:
I see you have some print statements for printing out the TGT.  Can
you even get that far?  In the stack trace you sent, it appears you
aren't sending a TGT, thus the line:

<Attempting to retrieve ticket [null]>

M

--
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev


-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Koby Ram

Sample web.aml

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi,

Can anyone send me an example of his web.xml file?

I have the entire thing working until I try to validate a ticket I always get  an exception saying the ticket is not recognized.

 

This is how the CAS part of my web.xml look like

 

<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://kobyr-desktop.kenshootlv.local:8443/cas</param-value>

  </init-param>

  <init-param>

    <param-name>serverName</param-name>

    <param-value>http://kobyr-desktop.kenshootlv.local:8080</param-value>

  </init-param>

</filter>

 

 

 

   <filter>

           <filter-name>CAS Filter</filter-name>

           <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>

           <init-param>

               <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>

               <param-value>https://kobyr-desktop.kenshootlv.local:8443/cas/login</param-value>

           </init-param>

           <init-param>

               <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>

               <param-value>https://kobyr-desktop.kenshootlv.local:8443/cas/serviceValidate</param-value>

           </init-param>

           <init-param>

               <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>

               <param-value>kobyr-desktop.kenshootlv.local:8080</param-value>

           </init-param>

           <init-param>

             <param-name>edu.yale.its.tp.cas.client.filter.wrapRequest</param-name>

             <param-value>true</param-value>

            </init-param>

       </filter>

 

 

       <filter-mapping>

           <filter-name>CAS Filter</filter-name>

           <url-pattern>/*</url-pattern>

       </filter-mapping>

 

 

 

Many thanks.

 

From: Ram Mohan [mailto:[hidden email]]
Sent: Wednesday, June 24, 2009 8:35 AM
To: [hidden email]
Subject: Re: [cas-dev] Exception while using Restful API

 

The problem is resolved. It seems i provided incorrect parameters and also my customized beans are not supporting this restful API.
the necessary corrections were made in the bean. its working fine.

Thanks,
Ram

On Mon, Jun 22, 2009 at 11:06 PM, Ram Mohan <[hidden email]> wrote:

yes, these statements are getting printed.
the return code of TGT is 501. and the exception reported is the message body.
as there was an exception while TGT generation, TGT is returned as null.
the log, which Marvin is talking about is generated while trying to get ST with this TGT.

-Ram

 

On Mon, Jun 22, 2009 at 8:34 PM, Marvin Addison <[hidden email]> wrote:

I see you have some print statements for printing out the TGT.  Can
you even get that far?  In the stack trace you sent, it appears you
aren't sending a TGT, thus the line:

<Attempting to retrieve ticket [null]>


M

--
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

 

 

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Scott Battaglia-2

Re: Sample web.aml

Reply Threaded More More options
Print post
Permalink
This question is more appropriate for the user list.  Please move the conversation there (the list has been added to the TO). 

Also, please follow the directions for the CAS client in the wiki:
http://www.ja-sig.org/wiki/display/CASC/CAS+Client+for+Java+3.1

It even has examples.

Cheers,
Scott


On Wed, Jun 24, 2009 at 4:08 AM, Koby Ram <[hidden email]> wrote:

Hi,

Can anyone send me an example of his web.xml file?

I have the entire thing working until I try to validate a ticket I always get  an exception saying the ticket is not recognized.

 

This is how the CAS part of my web.xml look like

 

<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://kobyr-desktop.kenshootlv.local:8443/cas</param-value>

  </init-param>

  <init-param>

    <param-name>serverName</param-name>

    <param-value>http://kobyr-desktop.kenshootlv.local:8080</param-value>

  </init-param>

</filter>

 

 

 

   <filter>

           <filter-name>CAS Filter</filter-name>

           <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>

           <init-param>

               <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>

               <param-value>https://kobyr-desktop.kenshootlv.local:8443/cas/login</param-value>

           </init-param>

           <init-param>

               <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>

               <param-value>https://kobyr-desktop.kenshootlv.local:8443/cas/serviceValidate</param-value>

           </init-param>

           <init-param>

               <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>

               <param-value>kobyr-desktop.kenshootlv.local:8080</param-value>

           </init-param>

           <init-param>

             <param-name>edu.yale.its.tp.cas.client.filter.wrapRequest</param-name>

             <param-value>true</param-value>

            </init-param>

       </filter>

 

 

       <filter-mapping>

           <filter-name>CAS Filter</filter-name>

           <url-pattern>/*</url-pattern>

       </filter-mapping>

 

 

 

Many thanks.

 

From: Ram Mohan [mailto:[hidden email]]
Sent: Wednesday, June 24, 2009 8:35 AM
To: [hidden email]
Subject: Re: [cas-dev] Exception while using Restful API

 

The problem is resolved. It seems i provided incorrect parameters and also my customized beans are not supporting this restful API.
the necessary corrections were made in the bean. its working fine.

Thanks,
Ram

On Mon, Jun 22, 2009 at 11:06 PM, Ram Mohan <[hidden email]> wrote:

yes, these statements are getting printed.
the return code of TGT is 501. and the exception reported is the message body.
as there was an exception while TGT generation, TGT is returned as null.
the log, which Marvin is talking about is generated while trying to get ST with this TGT.

-Ram

 

On Mon, Jun 22, 2009 at 8:34 PM, Marvin Addison <[hidden email]> wrote:

I see you have some print statements for printing out the TGT.  Can
you even get that far?  In the stack trace you sent, it appears you
aren't sending a TGT, thus the line:

<Attempting to retrieve ticket [null]>


M

--
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

 

 

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev