Hi ALL, I finally solved how to retrieve attributes from my users database (MySQL). Now, I have my map full with my attributes:
2015-05-11 17:28:43,891 INFO [org.jasig.cas.authentication.PolicyBasedAuthenticationManager] - <SearchModeSearchDatabaseAuthenticationHandler successfully authenticated [email protected]+password> 2015-05-11 17:28:43,891 DEBUG [org.jasig.cas.authentication.principal.PersonDirectoryPrincipalResolver] - <Attempting to resolve a principal...> 2015-05-11 17:28:43,891 DEBUG [org.jasig.cas.authentication.principal.PersonDirectoryPrincipalResolver] - <Creating SimplePrincipal for [[email protected]]> 2015-05-11 17:28:43,892 DEBUG [org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao] - <Created seed map='{username=[[email protected]]}' for uid='[email protected]'> 2015-05-11 17:28:43,892 DEBUG [org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao] - <Adding attribute 'email' with value '[[email protected]]' to query builder 'null'> 2015-05-11 17:28:43,892 DEBUG [org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao] - <Generated query builder 'sql=[email = ?] args=[[email protected]]' from query Map {username=[[email protected]]}.> 2015-05-11 17:28:43,899 DEBUG [org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao] - <Executed 'SELECT first_name, last_name, email, user_type, mobile, age, gender FROM user WHERE {0}' with arguments [[email protected]] and got results [{first_name=Gianluca, last_name=Diodato, [email protected], user_type=CNR_EMPLOYEE, mobile=333333333, age=37, gender=male}]> 2015-05-11 17:28:43,902 DEBUG [org.jasig.cas.authentication.PolicyBasedAuthenticationManager] - <org.jasig.cas.authentication.principal.PersonDirectoryPrincipalResolver@1d28f1be resolved [email protected] from [email protected]+password> 2015-05-11 17:28:43,903 INFO [org.jasig.cas.authentication.PolicyBasedAuthenticationManager] - <Authenticated [email protected] with credentials [[email protected]+password].> 2015-05-11 17:28:43,903 DEBUG [org.jasig.cas.authentication.PolicyBasedAuthenticationManager] - <Attribute map for [email protected]: {first_name=Gianluca, user_type=CNR_EMPLOYEE, age=37, last_name=Diodato, gender=male, mobile=333333333}> 2015-05-11 17:28:43,904 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN ============================================================= WHO: audit:unknown WHAT: supplied credentials: [[email protected]+password] ACTION: AUTHENTICATION_SUCCESS APPLICATION: CAS WHEN: Mon May 11 17:28:43 CEST 2015 CLIENT IP ADDRESS: 78.13.147.9 SERVER IP ADDRESS: 146.48.89.199 ============================================================= > 2015-05-11 17:28:43,906 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Added ticket [TGT-1-HIQdOuYrragbxkV9a7odgQ4HzQUi35RWzHaiMFmyw4oQPxkaSb-cassso.smartcampus.org] to registry.> 2015-05-11 17:28:43,906 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN ============================================================= WHO: audit:unknown WHAT: TGT-1-HIQdOuYrragbxkV9a7odgQ4HzQUi35RWzHaiMFmyw4oQPxkaSb-cassso.smartcampus.org ACTION: TICKET_GRANTING_TICKET_CREATED APPLICATION: CAS WHEN: Mon May 11 17:28:43 CEST 2015 CLIENT IP ADDRESS: 78.13.147.9 SERVER IP ADDRESS: 146.48.89.199 ============================================================= > 2015-05-11 17:28:43,906 DEBUG [org.jasig.cas.web.support.CookieRetrievingCookieGenerator] - <Removed cookie with name [CASPRIVACY]> 2015-05-11 17:28:43,906 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Attempting to retrieve ticket [TGT-1-HIQdOuYrragbxkV9a7odgQ4HzQUi35RWzHaiMFmyw4oQPxkaSb-cassso.smartcampus.org]> 2015-05-11 17:28:43,906 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Ticket [TGT-1-HIQdOuYrragbxkV9a7odgQ4HzQUi35RWzHaiMFmyw4oQPxkaSb-cassso.smartcampus.org] found in registry.> 2015-05-11 17:28:43,907 DEBUG [org.jasig.cas.web.support.CookieRetrievingCookieGenerator] - <Added cookie with name [CASTGC] and value [TGT-1-HIQdOuYrragbxkV9a7odgQ4HzQUi35RWzHaiMFmyw4oQPxkaSb-cassso.smartcampus.org]> 2015-05-11 17:28:43,910 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Attempting to retrieve ticket [TGT-1-HIQdOuYrragbxkV9a7odgQ4HzQUi35RWzHaiMFmyw4oQPxkaSb-cassso.smartcampus.org]> 2015-05-11 17:28:43,910 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Ticket [TGT-1-HIQdOuYrragbxkV9a7odgQ4HzQUi35RWzHaiMFmyw4oQPxkaSb-cassso.smartcampus.org] found in registry.> 2015-05-11 17:28:43,913 DEBUG [org.jasig.cas.CentralAuthenticationServiceImpl] - <Generated service ticket id [AAFwh2SmEkJ3dfLX9qXYPPU6ah+bngWOzMwLnUNNBgCZxuaeigSEhkLx] for ticket granting ticket [TGT-1-HIQdOuYrragbxkV9a7odgQ4HzQUi35RWzHaiMFmyw4oQPxkaSb-cassso.smartcampus.org]> 2015-05-11 17:28:43,914 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Added ticket [AAFwh2SmEkJ3dfLX9qXYPPU6ah+bngWOzMwLnUNNBgCZxuaeigSEhkLx] to registry.> 2015-05-11 17:28:43,914 INFO [org.jasig.cas.CentralAuthenticationServiceImpl] - <Granted service ticket [AAFwh2SmEkJ3dfLX9qXYPPU6ah+bngWOzMwLnUNNBgCZxuaeigSEhkLx] for service [http://localhost:8080/webssotest1/] for user [[email protected]]> 2015-05-11 17:28:43,914 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Attempting to retrieve ticket [TGT-1-HIQdOuYrragbxkV9a7odgQ4HzQUi35RWzHaiMFmyw4oQPxkaSb-cassso.smartcampus.org]> 2015-05-11 17:28:43,914 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Ticket [TGT-1-HIQdOuYrragbxkV9a7odgQ4HzQUi35RWzHaiMFmyw4oQPxkaSb-cassso.smartcampus.org] found in registry.> 2015-05-11 17:28:43,914 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN ============================================================= WHO: [email protected] WHAT: AAFwh2SmEkJ3dfLX9qXYPPU6ah+bngWOzMwLnUNNBgCZxuaeigSEhkLx for http://localhost:8080/webssotest1/ ACTION: SERVICE_TICKET_CREATED APPLICATION: CAS WHEN: Mon May 11 17:28:43 CEST 2015 CLIENT IP ADDRESS: 78.13.147.9 SERVER IP ADDRESS: 146.48.89.199 ============================================================= I use SAML 1.1 protocol in my java clients application as explained here https://wiki.jasig.org/display/CASC/Saml11TicketValidationFilter+Example. But after login successful my user with attributes when I redirect on my index.jsp I have NullPointer Exception on this line: <p><%= request.getRemoteUser() %></p> I've tried to retrieve attributes with soap request: https://cassso.smartcampus.org:8443/cas/samlValidate?TARGET=http%3A%2F%2Flocalhost%3A8080%2Fwebssotest1%2F&ticket=AAFwh2SmEkJ3dfLX9qXYPPU6ah%2BbngWOzMwLnUNNBgCZxuaeigSEhkLx and this: https://cassso.smartcampus.org:8443/cas/samlValidate?TARGET=http%3A%2F%2Flocalhost%3A8080%2Fwebssotest1%2F&ticket=TGT-1-HIQdOuYrragbxkV9a7odgQ4HzQUi35RWzHaiMFmyw4oQPxkaSb-cassso.smartcampus.org But i had always this answer: "saml1p:RequestDenied" <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <saml1p:Response xmlns:saml1p="urn:oasis:names:tc:SAML:1.0:protocol" IssueInstant="2015-05-11T16:17:58.074Z" MajorVersion="1" MinorVersion="1" Recipient="http://localhost:8080/webssotest1/" ResponseID="_ad4f2fb5b81a979460328071e370dbf0"> <saml1p:Status> <saml1p:StatusCode Value="saml1p:RequestDenied"/> <saml1p:StatusMessage> 'service' and 'ticket' parameters are both required </saml1p:StatusMessage> </saml1p:Status> </saml1p:Response> </SOAP-ENV:Body> </SOAP-ENV:Envelope> What is wrong? Best Gianluca -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
