RE: [cas-user] Problem with CAS 4.1.1 and log4j2

2015-11-12 Thread Borys Pogoreło
Hi,

> See the requirements here:
> http://jasig.github.io/cas/4.1.x/planning/Installation-Requirements.html

I read this page and everything related to this problem that I was able to
google. But I see that I might have had lower version of Maven and Tomcat.
After upgrading Maven to 3.3.1, Tomcat and Debian to 8, rebuilding
everyting, deploying cas-server-webapp and a lot of obscenities I got it
running :)

Now the configuration...

cheers,
Borys


-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user


[cas-user] "CAS is Unavailable" error when trying to edit service registry

2015-11-12 Thread Alexander Willman
I am upgrading our CAS infrastructure to version 3.6.0 and to include support 
for Duo authentication.  It authenticates users and records their tickets in 
its SQL Server database fine.  I may view its service registry via its Services 
Management interface, but get a "CAS is Unavailable" error when trying to edit 
the services.

Attached are copies of its deployerConfigContext.xml file and the log file 
containing the error that is produced when trying to edit the services.

Please help me resolve this problem.  Thank you.

Alex
-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

http://www.springframework.org/schema/beans;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
   xmlns:p="http://www.springframework.org/schema/p;
   xmlns:c="http://www.springframework.org/schema/c;
   xmlns:sec="http://www.springframework.org/schema/security;
   xmlns:tx="http://www.springframework.org/schema/tx;
   xmlns:aop="http://www.springframework.org/schema/aop;
   xmlns:cas="http://unicon.net/schema/cas;
   xsi:schemaLocation="http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
   http://www.springframework.org/schema/security
   http://www.springframework.org/schema/security/spring-security-3.1.xsd
   http://www.springframework.org/schema/tx
   http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
   http://www.springframework.org/schema/aop
   http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
   http://unicon.net/schema/cas
   http://unicon.net/schema/cas/cas-addons.xsd;>

























  
  
  
  
  




  

  




  
  
  
  

  ${ldap.url1}
  ${ldap.url2}
  ${ldap.url3}
  ${ldap.url4}

  
  
  

  
  
  

  



 

  

  



  
  
  
  
  

  

  
  

  
  
  
  
  
  
  
  

  
















   











org.hibernate.dialect.SQLServerDialect
update















localhost.log
Description: Binary data


Re: [cas-user] need some design inputs

2015-11-12 Thread Christopher Myers
Hi Prasad,

You may be able to do an alternate CAS login page that you could set up basic 
auth on, and then pass the credentials (along with the service name) to the CAS 
login page for authentication? You could start with something like the 
following, and then  modify it to meet your needs. In this case, you could just 
post a service, username, and password parameters to the page, which would then 
to the authentication to CAS and redirect to the service.

You would store this file on your CAS server, probably in Tomcat's ROOT webapp 
folder. (This has been tested working for us with CAS 3.4.x, 3.5.x, and 4.0.1, 
but the usual "use at your own risk, your mileage may vary" disclaimer applies.)






<%@page contentType="text/html; charset=windows-1252" isELIgnored="false"
import="java.net.URL"
import="java.net.HttpURLConnection"
import="java.io.InputStream"
import="java.io.BufferedReader"
import="java.io.InputStreamReader"
%>

<%
  response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
  response.setHeader("Pragma","no-cache"); //HTTP 1.0
  response.setDateHeader ("Expires", -1); //prevents caching at the proxy server

  String testURL = "https://; + String.valueOf(request.getServerName()) + 
"/cas/login";
  String myService = request.getParameter("service");
  String username = request.getParameter("username");
  String password = request.getParameter("password");

  if ((myService != null) && (myService != "")) {
testURL = testURL + "?service=" + myService;
  }

  String myLT = "";
  String myExecution = "";
  URL myUrl = new URL(testURL);
  HttpURLConnection myUrlConnection = (HttpURLConnection)myUrl.openConnection();

  myUrlConnection.setDoInput(true);
  myUrlConnection.setDoOutput(false);
  String myCookie = myUrlConnection.getHeaderField("Set-Cookie");
  myUrlConnection = (HttpURLConnection)myUrl.openConnection();
  if (myCookie != null) {
myUrlConnection.setRequestProperty("Cookie", myCookie);
  }

  myUrlConnection.setDoInput(true);
  myUrlConnection.setDoOutput(false);

  response.addHeader("Set-Cookie", myCookie);
  response.setContentType("text/html");
  if (null != (myCookie = myUrlConnection.getHeaderField("Set-Cookie"))) {
response.addHeader("Set-Cookie", myCookie);
  }

  InputStream webContent = (InputStream)myUrlConnection.getInputStream();
  BufferedReader pageStream = new BufferedReader (new InputStreamReader 
(webContent));
  String currentLine = "";
  String debugOutput = "";

  if(myUrlConnection.getResponseCode() == 200){ //Makes sure that the page 
pulled correctly and didn't give an error
while ((currentLine = pageStream.readLine()) != null) {
  if (currentLine.toLowerCase().indexOf("name=\"lt\"") > -1) {
myLT = currentLine.substring(currentLine.indexOf("value=") + 
7,currentLine.length() - 4);
  } else if (currentLine.toLowerCase().indexOf("name=\"execution\"") > -1) {
myExecution = currentLine.substring(currentLine.indexOf("value=") + 
7,currentLine.length() - 4);
  }
}
  }
  pageStream.close();

%>







Loading...
  





  



























>>> Mahantesh Prasad Katti  11/12/15 12:37 AM >>>
  Hi All,
  
 I am working on an application that runs on glassfish. There are some web 
services exposed on this application. These are accessed using basic HTTP 
authentication by external applications. Recently this app [that runs on 
glassfish] was  casified. This meant that the external applications cannot 
access the application by providing the http basic auth as they used to do 
earlier.  [They do not want to get CAS tokens and supply them while invoking 
the services].
  
 The requirement is to retain previous auth model for external applications 
while having the CASification in place. We are using JSR-196 for the 
CASification. I wanted to know if this is really possible. JEE only allows us 
to have one active  realm at any point in time. Is it possible to have a filter 
layer before JASPIC which based on the user agent header will determine if the 
request needs to be authenticated with http basic method? If so it will fire a 
request to CAS and get the token and redirect  to the service being inviked.
  
 I can provide more details in case I was not able to explain the scenario 
properly.
  
 Regards
 Prasad 
 
 -- 
You are currently subscribed to cas-user@lists.jasig.org as: 
cmy...@mail.millikin.edu
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user   

-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user


[cas-user] Problem with CAS 4.1.1 and log4j2

2015-11-12 Thread Borys Pogoreło
Hi,

I'm trying to run CAS 4.1.1 and have problems with log4j2. I'm deploying
the cas-server-webapp using Maven and making the basic changes to the
deployed WAR config files. The result is a big crash and not a single clue
what's going on. Unfortunately I don't have much experience with Spring
Framework, so this may have an easy fix, but I can't find it.

Here's the stack trace and rest of the log:
http://pastebin.com/Jng7xkFX

I tried setting the absolute path to log4j2.xml, but with no luck. Here's
the classes/log4j2.xml:
http://pastebin.com/xqUEDLGr

And spring-configuration/log4jConfiguration.xml:
http://pastebin.com/EUyc2Qh6

The cas4.log and perfStats4.log are created and even the first one logs
"Welcome to CAS" + "Loaded 2 services", but it's not working.

Maybe the problem is somewhere else?

cheers,
Borys



-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user


RE: [cas-user] Problem with CAS 4.1.1 and log4j2

2015-11-12 Thread Misagh Moayyed
See the requirements here:
http://jasig.github.io/cas/4.1.x/planning/Installation-Requirements.html


> -Original Message-
> From: "Borys Pogoreło" [mailto:bo...@ue.wroc.pl]
> Sent: Thursday, November 12, 2015 8:46 AM
> To: cas-user@lists.jasig.org
> Subject: [cas-user] Problem with CAS 4.1.1 and log4j2
>
> Hi,
>
> I'm trying to run CAS 4.1.1 and have problems with log4j2. I'm deploying
> the cas-server-webapp using Maven and making the basic changes to the
> deployed WAR config files. The result is a big crash and not a single
clue
> what's going on. Unfortunately I don't have much experience with Spring
> Framework, so this may have an easy fix, but I can't find it.
>
> Here's the stack trace and rest of the log:
> http://pastebin.com/Jng7xkFX
>
> I tried setting the absolute path to log4j2.xml, but with no luck.
Here's
> the classes/log4j2.xml:
> http://pastebin.com/xqUEDLGr
>
> And spring-configuration/log4jConfiguration.xml:
> http://pastebin.com/EUyc2Qh6
>
> The cas4.log and perfStats4.log are created and even the first one logs
> "Welcome to CAS" + "Loaded 2 services", but it's not working.
>
> Maybe the problem is somewhere else?
>
> cheers,
> Borys
>
>
>
> --
> You are currently subscribed to cas-user@lists.jasig.org as:
> mmoay...@unicon.net To unsubscribe, change settings or access archives,
> see http://www.ja-sig.org/wiki/display/JSG/cas-user

-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user