You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by co...@apache.org on 2017/06/23 12:36:42 UTC

[2/2] syncope git commit: SYNCOPE-1119 - Make it more obvious that the default admin password needs to be changed

SYNCOPE-1119 - Make it more obvious that the default admin password needs to be changed


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/14d5e768
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/14d5e768
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/14d5e768

Branch: refs/heads/master
Commit: 14d5e768734e725d8a0ec2738257a94abb682876
Parents: bdff1fd
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Fri Jun 23 12:37:29 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Fri Jun 23 13:36:31 2017 +0100

----------------------------------------------------------------------
 .../spring/security/UsernamePasswordAuthenticationProvider.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/14d5e768/core/spring/src/main/java/org/apache/syncope/core/spring/security/UsernamePasswordAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/core/spring/src/main/java/org/apache/syncope/core/spring/security/UsernamePasswordAuthenticationProvider.java b/core/spring/src/main/java/org/apache/syncope/core/spring/security/UsernamePasswordAuthenticationProvider.java
index 28cc970..2a5430e 100644
--- a/core/spring/src/main/java/org/apache/syncope/core/spring/security/UsernamePasswordAuthenticationProvider.java
+++ b/core/spring/src/main/java/org/apache/syncope/core/spring/security/UsernamePasswordAuthenticationProvider.java
@@ -50,6 +50,9 @@ public class UsernamePasswordAuthenticationProvider implements AuthenticationPro
     @Autowired
     protected UserProvisioningManager provisioningManager;
 
+    @Autowired
+    private DefaultCredentialChecker credentialChecker;
+
     @Resource(name = "adminUser")
     protected String adminUser;
 
@@ -99,6 +102,7 @@ public class UsernamePasswordAuthenticationProvider implements AuthenticationPro
         } else if (adminUser.equals(authentication.getName())) {
             username[0] = adminUser;
             if (SyncopeConstants.MASTER_DOMAIN.equals(domainKey)) {
+                credentialChecker.checkIsDefaultAdminPasswordInUse();
                 authenticated = ENCRYPTOR.verify(
                         authentication.getCredentials().toString(),
                         CipherAlgorithm.valueOf(adminPasswordAlgorithm),