Fórum

liferay 6.0.5 e CAS

antonello grimaldi, modificado 13 Anos atrás.

liferay 6.0.5 e CAS

New Member Postagens: 22 Data de Entrada: 21/01/11 Postagens Recentes
Ciao a tutti,
sto avendo difficoltà nel configuare CAS con Liferay 6.0.5
Dopo aver scaricato e deployato il cas server nel mio tomcat, accedo alla pagina di configurazione di CAS all'interno del pannello di controllo del mio portale, e setto i seguenti parametri:

Seleziono la voce "Enabled"

Login url: https://localhost:8443/cas-web/login
Logout url: https://localhost:8443/cas-web/logout
Server name: localhost:8080
Service URL: http://localhost:8080/c/portal/login

Dopo aver salvato, ogni volta che tento di loggarmi (cliccando su "Sign in" in alto a destra in home page), vengo giustamente reindirizzato sulla pagina di login di CAS. Inserisco le credenziali (ad esempio quelli di amministratore standard del portale (bruno-bruno), perchè effettuo il login tramite screen name), clicco su Login, ma anzichè essere reindirizzato nuovamente alla mia home page del portale (già loggato), vengo reindirizzato ad una pagina bianca con url http://localhost:8080/c/portal/login?ticket=[identificativo-ticket].

Vorrei capire perchè, dato che ho letto su alcuni forum la procedura è corretta e tutto funziona correttamente...

Grazie in anticipo per la risposta
Antonello
thumbnail
Andrea Di Giorgi, modificado 13 Anos atrás.

RE: liferay 6.0.5 e CAS

New Member Postagens: 19 Data de Entrada: 01/06/10 Postagens Recentes
Ciao,
Prova a lasciare vuoto il parametro Service URL. Infatti:
  • ServerName è il nome dell'host di Liferay
  • ServiceURL è l'URL della pagina di Liferay in cui andare; si può lasciare vuoto, perché, se è vuoto, viene generato in automatico. Se invece non è vuoto, si dà questo a CAS e ServerName viene ignorato. Il serviceURL (o quello messo esplicitamente, o quello generato a partire dal serverName) viene passato alla pagina di login di CAS come parametro "service"
vasv kumar, modificado 13 Anos atrás.

RE: liferay 6.0.5 e CAS

Junior Member Postagens: 46 Data de Entrada: 07/02/11 Postagens Recentes
hi,

I'm trying to set CAS with Liferay 6.0.5
After deploying cas server in my tomcat bundle (and after opening 8443 port in server.xml), I set these parameters in Control-Panel->Authentication->CAS

Check "Enabled"

Login url: https://localhost:8443/cas-web/login
Logout url: https://localhost:8443/cas-web/logout
Server name: localhost:8080
Service URL: http://localhost:8080/c/portal/login

After clicking on sigin it is redirecting to the below url

https://localhost:8443/cas-web/login

I entered netId,Password then it is redirecting to the below url and showing balnk page

http://localhost:8080/c/portal/login?ticket=ST-9-XiOWveFA6PfalmKCRuJ2-cas

If i directly enter the below url in browser and submitt form it is showing "Login successful"
https://localhost:8443/cas-web/login

I imported CAS server's https cert to the keystore

In Server.xml the below code i mentioned

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="C:/Users/Liferay/.keystore" keystorePass="changeit" truststoreFile="C:/Java/jdk1.6.0_20/jre/lib/security/cacerts" />

In logs i am getting the below exception :

"javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"


Can you help me? There are another steps of configuration I have to do?

Thanks in advance
thumbnail
Andrea Di Giorgi, modificado 13 Anos atrás.

RE: liferay 6.0.5 e CAS

New Member Postagens: 19 Data de Entrada: 01/06/10 Postagens Recentes
vasv kumar:
hi,
Login url: https://localhost:8443/cas-web/login
Logout url: https://localhost:8443/cas-web/logout
Server name: localhost:8080
Service URL: http://localhost:8080/c/portal/login


Hi,
First of all, you can try to set the Service URL parameter to an empty string: in fact, this URL will be automatically built from the Server name parameter (in Liferay 6.0.5 source, you cat see it in CASFilter.java, line 133).

The blank page problem should disappear... Let's try to solve one problem at a time emoticon
vasv kumar, modificado 13 Anos atrás.

RE: liferay 6.0.5 e CAS

Junior Member Postagens: 46 Data de Entrada: 07/02/11 Postagens Recentes
Hi,

Thanks for your response.I solved that issue now.But here i am getting one more issue.NoSuchUser Exception.Please see the screenshot
thumbnail
Andrea Di Giorgi, modificado 13 Anos atrás.

RE: liferay 6.0.5 e CAS

New Member Postagens: 19 Data de Entrada: 01/06/10 Postagens Recentes
Hi
What's the data source for your CAS instance? Is it a LDAP server?
When you just enable CAS in Liferay, the portal will receive only the username, and nothing else. But Liferay needs some other information to correctly create the User entity in its database (first name, last name, mail address, etc.).
If your CAS is attached to a LDAP server, you can tell Liferay to obtain this sort of information from the same LDAP server:

  • In Control Panel -> Settings -> Authentication -> CAS, you must check "Import from LDAP"
  • In Control Panel -> Settings -> Authentication -> LDAP, you must configure a LDAP server, but keep the "Enabled" flag unchecked (otherwise, you will use the LDAP authentication, bypassing CAS)


And so, when a user logs to the portal via CAS, Liferay receives the username from CAS; after that, it looks for a User entity with this screenname: if it exists, user is logged and can proceed; otherwise, Liferay tries to create a new User with the information obtained from a LDAP server... If there's no servers configured, that error is thrown.

PS: sorry for my bad English!
thumbnail
Wen Ching Chua, modificado 12 Anos atrás.

RE: liferay 6.0.5 e CAS

Junior Member Postagens: 72 Data de Entrada: 18/04/11 Postagens Recentes
Andrea Di Giorgi:
vasv kumar:
hi,
Login url: https://localhost:8443/cas-web/login
Logout url: https://localhost:8443/cas-web/logout
Server name: localhost:8080
Service URL: http://localhost:8080/c/portal/login


Hi,
First of all, you can try to set the Service URL parameter to an empty string: in fact, this URL will be automatically built from the Server name parameter (in Liferay 6.0.5 source, you cat see it in CASFilter.java, line 133).

The blank page problem should disappear... Let's try to solve one problem at a time emoticon



I faced the blank page too. I need help. I like to follow the approach above to remove the service url.

Now after i enabled the CAS, I can't seem to find a way to login using test@liferay.com. Is there a way to undo this from the database?

FYI I can login using the ldap users via the https://192.168.1.7:8443/cas-server-webapp-3.3.5/login ... just not sure why i see the blank page thing.

I went into mysql lportal and there's no data in PortletPreferences. So I am not sure how I can delete the settings if any.

I am using the Liferay 6.0.6 CE bundled with tomcat version. I also believe I got the cert import correctly to cacerts folder too.