Page 1 of 1
admin login failing in production environment
Posted: Sun Nov 23, 2014 3:47 am
by prabhat.kataria
I have noticed one thing about BLC that is when I try to run admin module by setting environment as "development" it works fine. But if I change environment to "production" admin login fails with message "incorrect username and password".
Is it something related to pass through encryption?
My Setup: eclipse + tomcat 7 + MySQL
Re: admin login failing in production environment
Posted: Mon Nov 24, 2014 1:33 am
by songdragon
Definitely. You can find two lines in core/src/main/resources/runtime-properties/production-shared.properties
Code: Select all
password.admin.encoder=org.springframework.security.authentication.encoding.ShaPasswordEncoder
password.site.encoder=org.springframework.security.authentication.encoding.ShaPasswordEncoder
.
Meanwhile, there is an illustration in core/.../sql/load_admin_users.sql
Code: Select all
-- Sample data for use with the org.springframework.security.authentication.encoding.ShaPasswordEncoder which is
-- configured OOB in the 'production' environment. This is the password 'admin' salted with the user's primary key
-- INSERT INTO BLC_ADMIN_USER (ADMIN_USER_ID, EMAIL, LOGIN, NAME, PASSWORD, ACTIVE_STATUS_FLAG) VALUES (-1,'admin@yourdomain.com','admin','Administrator','c25519e7c79bee0b21cb6f3636c4b08e1161a1f9', 1);
Hence, you need to
update passwords in database to encrypted values if you run admin in prooduction environment or
comment settings in production-shared.properties.
Re: admin login failing in production environment
Posted: Mon Nov 24, 2014 2:13 am
by prabhat.kataria
Thanks a lot songdragon ... That made my day....
Re: admin login failing in production environment
Posted: Mon Nov 24, 2014 9:11 am
by phillipuniverse
By the way, an easier way than trying to duplicate the encryption using some other means would be to use 'forgot password' in the admin which would end up generating a new password for you.