[cas-user] [CAS 6.2.0-SNAPSHOT] - Password management errors

2019-12-11 Thread Nicola Boldrin
Hi all,
my DB is PostgreSQL and the application server is Tomcat.

My configuration is

spring.mail.host=127.0.0.1
spring.mail.port=25
spring.mail.testConnection=true
spring.mail.properties.mail.smtp.auth=false
#spring.mail.properties.mail.smtp.starttls.enable=true
${configurationKey}.mail.from=no-replay@...
${configurationKey}.mail.text=Reset password email subject
${configurationKey}.mail.subject=Reset password


cas.authn.pm.enabled=true

cas.authn.pm.jdbc.sqlSecurityQuestions=...
cas.authn.pm.jdbc.sqlFindEmail=...
cas.authn.pm.jdbc.sqlFindPhone=...
cas.authn.pm.jdbc.sqlFindUser=...
cas.authn.pm.jdbc.sqlChangePassword=...
cas.authn.pm.reset.mail.from=no-replay@...
cas.authn.pm.reset.mail.text=Reset your password with this link: %s
cas.authn.pm.reset.mail.subject=Password Reset Request
cas.authn.pm.jdbc.autocommit=true



When I use the *"Reset your password"* feature I receive the following 
error after email sent

ERROR [org.apereo.cas.ticket.registry.JpaTicketRegistry] - 
 javax.persistence.PersistenceException: org.hibernate.HibernateException: 
org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit 
mode.

I have tried to set

 cas.authn.pm.jdbc.autocommit=false

without success.


When I use the *"Forgot your username?"* feature, instead, I can't send 
email due to the following error

WARN [org.apereo.cas.util.io.CommunicationsManager] - 
ERROR [org.apereo.cas.pm.web.flow.actions.
SendForgotUsernameInstructionsAction] - 
WARN [org.apereo.cas.web.view.CasReloadableMessageBundle] - 


Any idea?

Thanks



-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/bfb8cbb6-0a9a-4bba-a1bc-420b18ce66f7%40apereo.org.


[cas-user] [CAS 6.1.0-RC6] [CAS MANAGEMENT 6.1.0-RC4] - Application run failed: java.lang.IllegalArgumentException: java.lang.ClassCastException

2019-11-14 Thread Nicola Boldrin
Hi all,
Im' trying to deploy the CAS 6.1.0-RC6 and the CAS MANAGEMENT 6.1.0-RC4 to 
the same Application Server.


=


  JBoss Bootstrap Environment


  JBOSS_HOME: /home/user/Documents/eclipse-workspace/P4CARDS-CAS/wildfly-
15.0.1.Final


  JAVA: /usr/lib/jvm/java-11-openjdk-amd64/bin/java


  JAVA_OPTS:  -server -Xms128m -Xmx1024m -XX:MetaspaceSize=192M -XX:
MaxMetaspaceSize=512m -Djava.net.preferIPv4Stack=true -Djboss.modules.system
.pkgs=org.jboss.byteman -Djava.awt.headless=true  --add-exports=java.base/
sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --
add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED --add-modules=java.se -
XX:TieredStopAtLevel=1 -Xverify:none --add-modules=java.se --add-exports=
java.base/jdk.internal.ref=ALL-UNNAMED 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=
ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-
opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-modules 
jdk.unsupported  -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+
UseJVMCICompiler -Djdk.reflect.allowGetCallerClass=true -Detc.cas.dir=/home/
user/eclipse-workspace/dev_resources/etc/cas


=



The CAS MANAGEMENT deploy fails due to the error below

10:02:00,752 INFO  [org.springframework.context.support.
PostProcessorRegistrationDelegate$BeanPostProcessorChecker] (ServerService 
Thread Pool -- 80) Bean 
'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration'
 
of type [org.springframework.cloud.autoconfigure.
ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$5498811
] is not eligible for getting processed by all BeanPostProcessors (for 
example: not eligible for auto-proxying)
10:02:01,809 ERROR [org.springframework.boot.SpringApplication] (
ServerService Thread Pool -- 80) Application run failed: java.lang.
IllegalArgumentException: java.lang.ClassCastException@42598f0f
 at jdk.internal.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
 at deployment.cas-mgmt.war
//org.springframework.core.io.VfsUtils.invokeVfsMethod(VfsUtils.java:101)
 at deployment.cas-mgmt.war
//org.springframework.core.io.VfsUtils.getFile(VfsUtils.java:173)
 at deployment.cas-mgmt.war
//org.springframework.core.io.VfsResource.getFile(VfsResource.java:95)
 at deployment.cas-mgmt.war
//org.apereo.cas.util.CasVersion.getDateTime(CasVersion.java:70)
 at deployment.cas-mgmt.war
//org.apereo.cas.util.SystemUtils.getSystemInfo(SystemUtils.java:46)
 at deployment.cas-mgmt.war
//org.apereo.cas.util.spring.boot.AbstractCasBanner.collectEnvironmentInfo(AbstractCasBanner.java:61)
 at deployment.cas-mgmt.war
//org.apereo.cas.util.spring.boot.AbstractCasBanner.printBanner(AbstractCasBanner.java:35)
 at deployment.cas-mgmt.war
//org.springframework.boot.SpringApplicationBannerPrinter.print(SpringApplicationBannerPrinter.java:71)
 at deployment.cas-mgmt.war
//org.springframework.boot.SpringApplication.printBanner(SpringApplication.java:582)
 at deployment.cas-mgmt.war
//org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
 at deployment.cas-mgmt.war
//org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:159)
 at deployment.cas-mgmt.war
//org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:139)
 at deployment.cas-mgmt.war
//org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:92)
 at deployment.cas-mgmt.war
//org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171)
 at io.undertow.servlet@2.0.15.Final
//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:203)
 at io.undertow.servlet@2.0.15.Final
//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:185)
 at io.undertow.servlet@2.0.15.Final
//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
 at io.undertow.servlet@2.0.15.Final
//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
 at org.wildfly.extension.undertow@15.0.1.Final
//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
 at org.wildfly.extension.undertow@15.0.1.Final

[cas-user] Re: CAS 6.0.1 & Wildfly 14

2019-10-30 Thread Nicola Boldrin
I have the same problem . any solution ?

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/62c80b06-01e2-4dac-8928-ed36994c1c70%40apereo.org.


Re: [cas-user] [CAS-6.1.x] Where is the old "/cas/status/dashboard" url?

2019-10-29 Thread Nicola Boldrin
Thanks a lot Travis.



Il giorno giovedì 24 ottobre 2019 17:18:39 UTC+2, Travis Schmidt ha scritto:
>
> The dashboard UI has been removed from CAS Server, but the APIs are still 
> there and have been expanded.  There is a new /dashboard endpoint in the 
> CAS Management application that is is still being constructed as a 
> replacement.  
>
> On Thu, Oct 24, 2019 at 6:11 AM Nicola Boldrin  > wrote:
>
>> Someone could give me the documentation references to activate the old 
>> url *"/cas/status/dashboard"* or an example settings' file?
>>
>>
>> Thanks
>>
>> -- 
>> - Website: https://apereo.github.io/cas
>> - Gitter Chatroom: https://gitter.im/apereo/cas
>> - List Guidelines: https://goo.gl/1VRrw7
>> - Contributions: https://goo.gl/mh7qDG
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "CAS Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to cas-...@apereo.org .
>> To view this discussion on the web visit 
>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/3ebe3671-362c-42ef-95e1-e6b9ff176fbf%40apereo.org
>>  
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/3ebe3671-362c-42ef-95e1-e6b9ff176fbf%40apereo.org?utm_medium=email_source=footer>
>> .
>>
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/34039cd2-9208-4040-9641-0bcf8846faa2%40apereo.org.


[cas-user] [CAS-6.1.x] Where is the old "/cas/status/dashboard" url?

2019-10-24 Thread Nicola Boldrin
Someone could give me the documentation references to activate the old url 
*"/cas/status/dashboard"* or an example settings' file?


Thanks

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/3ebe3671-362c-42ef-95e1-e6b9ff176fbf%40apereo.org.


[cas-user] CAS 5.3.8 - Encrypted JWT and pac4j/jee-pac4j

2019-06-19 Thread Nicola Boldrin
Hi all,
I'm testing JWT Service Tickets with a simple javax-rs WebApp based on 
https://github.com/pac4j/jee-pac4j
After login redirect, my application returns an Unauthorized response due 
to the fact that the JWT is not recognized as a JWE token.
Debugging application, I've noticed that it is due to the method 
*parseAlgorithm(final 
JSONObject json)* of the  *com.nimbusds.jose.Header* class because "*enc*" 
property is not present into JWT header.


 if (algName.equals(Algorithm.NONE.getName())) {
 // Plain
 return Algorithm.NONE;
 } else if (json.containsKey("enc")) {
 // JWE
 return JWEAlgorithm.parse(algName);
 } else {
 // JWS
 return JWSAlgorithm.parse(algName);
 }



Any suggestions ? 

Why CAS doesn't put "*enc*" property into the JWT?


My CAS configuration for the JWT Service Tickets is 

cas.authn.token.crypto.enabled=true
cas.authn.token.crypto.encryptionEnabled=true
cas.authn.token.crypto.signingEnabled=true
cas.authn.token.crypto.signing.key=*<**the 512 byte key>*
cas.authn.token.crypto.encryption.key=*<**the 256 bytes key>*



Thanks all.

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/00663a72-fbc4-4ad5-998d-e719e5efce17%40apereo.org.


Re: [cas-user] CAS 5.3.8 - SAML2 IdP - match found for service in registry but the match is not defined as a SAML service

2019-05-20 Thread Nicola Boldrin
Hi Ray,
the first declaration of serviceId was "https://localhost:/saml/login; 
as you suggested but the error was the same.

The file SAML2_client5-109005.xml  contains the demo app metadata and is 
imported by the service's JSON with declaration

"metadataLocation": 
"/home/user/Documents/eclipse-workspace/DEV_CERTIFICATE_UTIL/SAML2_client5-109005.xml"

Thanks


Il giorno venerdì 17 maggio 2019 21:33:50 UTC+2, rbon ha scritto:
>
> Nicola,
>
> I assume you have imported SP metadata.
> Perhaps you have to name your service registry entry "serviceId" : "
> https://localhost:/saml/login; to match the entityId.
>
> Ray
>
> On Fri, 2019-05-17 at 01:55 -0700, Nicola Boldrin wrote:
>
> Hi all,
> I'm trying to configure CAS 3.5.8 to be SAML2 IdP; I'm trying to do an SSO 
> login with a Spring sample app too (
> https://github.com/spring-projects/spring-security-saml).
> When the sample app send auth request, CAS says "Application Not 
> Authorized to Use CAS".
>
> Below the log's messages
>
> INFO [org.apereo.cas.support.saml.web.idp.profile.sso.request.
> DefaultSSOSamlHttpRequestExtractor] Received SAML profile request [
> /cas-jpa/idp/profile/SAML2/POST/SSO]
> DEBUG [org.apereo.cas.support.saml.web.idp.profile.sso.request.
> DefaultSSOSamlHttpRequestExtractor] Locating SAML object from message 
> context...
> DEBUG [org.apereo.cas.support.saml.web.idp.profile.sso.request.
> DefaultSSOSamlHttpRequestExtractor] Decoded SAML object [{urn:oasis:names:
> tc:SAML:2.0:protocol}AuthnRequest] from http request
> INFO [org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] 
> Audit trail record BEGIN
> =
> WHO: audit:unknown
> WHAT: [issuer=https:
> //localhost:/saml/login,binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST]
> ACTION: SAML2_REQUEST_CREATED
> APPLICATION: CAS
> WHEN: Thu May 16 17:27:10 CEST 2019
> CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1
> SERVER IP ADDRESS: 0:0:0:0:0:0:0:1
> =
>
>
>
>
> DEBUG [org.apereo.cas.support.saml.web.idp.profile.
> AbstractSamlProfileHandlerController] Located issuer 
> [https://localhost:/saml/login] 
> from authentication request
> DEBUG [org.apereo.cas.support.saml.web.idp.profile.
> AbstractSamlProfileHandlerController] Checking service access in CAS 
> service registry for [https://localhost:/saml/login]
> ERROR [org.apereo.cas.support.saml.web.idp.profile.
> AbstractSamlProfileHandlerController] CAS has found a match for service [
> https://localhost:/saml/login] in registry but the match is not 
> defined as a SAML service
> WARN [org.springframework.web.servlet.mvc.method.annotation.
> ExceptionHandlerExceptionResolver] Resolved [org.apereo.cas.services.
> UnauthorizedServiceException: screen.service.error.message] to 
> ModelAndView: reference to view with name 'casServiceErrorView'; model is 
> {rootCauseException=org.apereo.cas.services.UnauthorizedServiceException: 
> }
> INFO [org.apereo.cas.support.oauth.services.
> OAuth20AuthenticationServiceSelectionStrategy] service='null', svc='null', 
> this.callbackUrl='
> https://localhost:6443/cas-jpa/oauth2.0/callbackAuthorize'
> DEBUG [org.apereo.cas.support.oauth.services.
> OAuth20AuthenticationServiceSelectionStrategy] Authentication request is 
> not identified as an OAuth request
> INFO [org.apereo.cas.support.oauth.services.
> OAuth20AuthenticationServiceSelectionStrategy] service='null', svc='null', 
> this.callbackUrl='
> https://localhost:6443/cas-jpa/oauth2.0/callbackAuthorize'
> DEBUG [org.apereo.cas.support.oauth.services.
> OAuth20AuthenticationServiceSelectionStrategy] Authentication request is 
> not identified as an OAuth request
>
>
>
> Below my configuration
>
> # === SAML 2 Idp
>
>
> cas.authn.samlIdp.entityId=https://localhost:6443/cas-jpa/idp
> cas.authn.samlIdp.metadata.location=file:${etc.cas.dir}saml
> cas.authn.samlIdp.attributeQueryProfileEnabled=true
>
>
>
> Thanks
>
> -- 
>
> Ray Bon
> Programmer Analyst
> Development Services, University Systems
> 2507218831 | CLE 019 | rb...@uvic.ca 
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/3e1438cb-cfce-48cc-8cf1-e3e93e403610%40apereo.org.


[cas-user] CAS 5.3.8 - SAML2 IdP - match found for service in registry but the match is not defined as a SAML service

2019-05-17 Thread Nicola Boldrin
Hi all,
I'm trying to configure CAS 3.5.8 to be SAML2 IdP; I'm trying to do an SSO 
login with a Spring sample app too (
https://github.com/spring-projects/spring-security-saml).
When the sample app send auth request, CAS says "Application Not Authorized 
to Use CAS".

Below the log's messages

INFO [org.apereo.cas.support.saml.web.idp.profile.sso.request.
DefaultSSOSamlHttpRequestExtractor] Received SAML profile request [/cas-jpa/
idp/profile/SAML2/POST/SSO]
DEBUG [org.apereo.cas.support.saml.web.idp.profile.sso.request.
DefaultSSOSamlHttpRequestExtractor] Locating SAML object from message 
context...
DEBUG [org.apereo.cas.support.saml.web.idp.profile.sso.request.
DefaultSSOSamlHttpRequestExtractor] Decoded SAML object [{urn:oasis:names:tc
:SAML:2.0:protocol}AuthnRequest] from http request
INFO [org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] Audit 
trail record BEGIN
=
WHO: audit:unknown
WHAT: [issuer=https:
//localhost:/saml/login,binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST]
ACTION: SAML2_REQUEST_CREATED
APPLICATION: CAS
WHEN: Thu May 16 17:27:10 CEST 2019
CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1
SERVER IP ADDRESS: 0:0:0:0:0:0:0:1
=




DEBUG [org.apereo.cas.support.saml.web.idp.profile.
AbstractSamlProfileHandlerController] Located issuer 
[https://localhost:/saml/login] 
from authentication request
DEBUG [org.apereo.cas.support.saml.web.idp.profile.
AbstractSamlProfileHandlerController] Checking service access in CAS 
service registry for [https://localhost:/saml/login]
ERROR [org.apereo.cas.support.saml.web.idp.profile.
AbstractSamlProfileHandlerController] CAS has found a match for service [
https://localhost:/saml/login] in registry but the match is not defined 
as a SAML service
WARN [org.springframework.web.servlet.mvc.method.annotation.
ExceptionHandlerExceptionResolver] Resolved [org.apereo.cas.services.
UnauthorizedServiceException: screen.service.error.message] to ModelAndView: 
reference to view with name 'casServiceErrorView'; model is {
rootCauseException=org.apereo.cas.services.UnauthorizedServiceException: }
INFO [org.apereo.cas.support.oauth.services.
OAuth20AuthenticationServiceSelectionStrategy] service='null', svc='null', 
this.callbackUrl='https://localhost:6443/cas-jpa/oauth2.0/callbackAuthorize'
DEBUG [org.apereo.cas.support.oauth.services.
OAuth20AuthenticationServiceSelectionStrategy] Authentication request is not 
identified as an OAuth request
INFO [org.apereo.cas.support.oauth.services.
OAuth20AuthenticationServiceSelectionStrategy] service='null', svc='null', 
this.callbackUrl='https://localhost:6443/cas-jpa/oauth2.0/callbackAuthorize'
DEBUG [org.apereo.cas.support.oauth.services.
OAuth20AuthenticationServiceSelectionStrategy] Authentication request is not 
identified as an OAuth request



Below my configuration

# === SAML 2 Idp


cas.authn.samlIdp.entityId=https://localhost:6443/cas-jpa/idp
cas.authn.samlIdp.metadata.location=file:${etc.cas.dir}saml
cas.authn.samlIdp.attributeQueryProfileEnabled=true



Thanks

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/1ded45e8-7b70-42f6-b3d3-c9a55bbdd22c%40apereo.org.


CASSAML2CallbackProfile-999020.json
Description: application/json


idp-metadata.xml
Description: XML document


SAML2_client5-109005.json
Description: application/json


SAML2_client5-109005.xml
Description: XML document


Re: [cas-user] CAS 5.3.8 - Password Management - JDBC - Password's change does not update DB

2019-05-15 Thread Nicola Boldrin
Thank you Martin.
I have repeated tests, you are right, the autocommit=true is the definitive 
solution to the problem.




Il giorno sabato 11 maggio 2019 15:09:08 UTC+2, Martin Böhmer ha scritto:
>
> I experienced the exact same behaviour and solved it by setting autocommit 
> = true. Don't think it is your IDE causing the problem.
>
> Am Donnerstag, 9. Mai 2019 10:38:23 UTC+2 schrieb Nicola Boldrin:
>>
>> Hi Ray,
>> I've verified that the SQL is ok. After trying the 
>> cas.authn.pm.jdbc.autocommit property needlessly, the application did work 
>> perfectly. I suppose that I had a build problem with my Eclipse.
>>
>> Thanks for your suggestion.
>>
>> Nicola
>>
>>
>> Il giorno mercoledì 8 maggio 2019 19:13:43 UTC+2, rbon ha scritto:
>>>
>>> Nicola,
>>>
>>> You can get hibernate to show the sql that it is sending to the database:
>>>
>>> https://apereo.github.io/cas/5.3.x/installation/Configuration-Properties-Common.html#hibernate--jdbc
>>>
>>> This may provide some more insight into your problem.
>>>
>>> Ray
>>>
>>> On Wed, 2019-05-08 at 00:57 -0700, Nicola Boldrin wrote:
>>>
>>> Hi all,
>>> I'm using CAS 5.3.8 and I'm trying to change my expired password.
>>> I can specify my new password in form and submit it; the application 
>>> shows the "Password Change Successful" message but DB is not updated.
>>>
>>> In the debug mode I see that the method 
>>> *org.apereo.cas.pm.jdbc.JdbcPasswordManagementService.changeInternal() 
>>> *returns 1.
>>>
>>> @Override
>>> public boolean changeInternal(final Credential credential, final 
>>> PasswordChangeBean bean) {
>>> final UsernamePasswordCredential c = (UsernamePasswordCredential
>>> ) credential;
>>> final PasswordEncoder encoder = PasswordEncoderUtils.
>>> newPasswordEncoder(properties.getJdbc().getPasswordEncoder());
>>> final String password = encoder.encode(bean.getPassword());
>>> final int count = this.jdbcTemplate.update(properties.getJdbc().
>>> getSqlChangePassword(), password, c.getId());
>>> return count > 0;
>>> }
>>>
>>>
>>>
>>> What's wrong?
>>>
>>> Thanks all.
>>>
>>> -- 
>>>
>>> Ray Bon
>>> Programmer Analyst
>>> Development Services, University Systems
>>> 2507218831 | CLE 019 | rb...@uvic.ca
>>>
>>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/4be1009f-70a1-44d2-8fc0-a705a485e080%40apereo.org.


Re: [cas-user] CAS 5.3.8 - Password Management - JDBC - Password's change does not update DB

2019-05-09 Thread Nicola Boldrin
Hi Ray,
I've verified that the SQL is ok. After trying the 
cas.authn.pm.jdbc.autocommit property needlessly, the application did work 
perfectly. I suppose that I had a build problem with my Eclipse.

Thanks for your suggestion.

Nicola


Il giorno mercoledì 8 maggio 2019 19:13:43 UTC+2, rbon ha scritto:
>
> Nicola,
>
> You can get hibernate to show the sql that it is sending to the database:
>
> https://apereo.github.io/cas/5.3.x/installation/Configuration-Properties-Common.html#hibernate--jdbc
>
> This may provide some more insight into your problem.
>
> Ray
>
> On Wed, 2019-05-08 at 00:57 -0700, Nicola Boldrin wrote:
>
> Hi all,
> I'm using CAS 5.3.8 and I'm trying to change my expired password.
> I can specify my new password in form and submit it; the application shows 
> the "Password Change Successful" message but DB is not updated.
>
> In the debug mode I see that the method 
> *org.apereo.cas.pm.jdbc.JdbcPasswordManagementService.changeInternal() 
> *returns 1.
>
> @Override
> public boolean changeInternal(final Credential credential, final 
> PasswordChangeBean bean) {
> final UsernamePasswordCredential c = (UsernamePasswordCredential) 
> credential;
> final PasswordEncoder encoder = PasswordEncoderUtils.
> newPasswordEncoder(properties.getJdbc().getPasswordEncoder());
> final String password = encoder.encode(bean.getPassword());
> final int count = this.jdbcTemplate.update(properties.getJdbc().
> getSqlChangePassword(), password, c.getId());
> return count > 0;
> }
>
>
>
> What's wrong?
>
> Thanks all.
>
> -- 
>
> Ray Bon
> Programmer Analyst
> Development Services, University Systems
> 2507218831 | CLE 019 | rb...@uvic.ca 
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/bee9dfba-9226-4831-92e6-b08cee4565c0%40apereo.org.