AdminFaces redirects over http when using a load balancer
See original GitHub issueIssue Overview
admin.loginPage always redirects me over http.
Expected Behaviour
Opening a private page with https should redirect me to the loginPage through https if I’m not logged in.
How to reproduce
My admin-config.properties is like this:
admin.indexPage=index.xhtml
admin.loginPage=/public/sign/signin.xhtml
My AdminSession specialization is like this:
@Named
@SessionScoped
@Specializes
public class LogManager extends AdminSession implements Serializable {
// ...
@Override
public boolean isLoggedIn() {
return isPartialliLoggedIn() && currentUserProvider != null;
}
// ...
}
My deployment root is under nights-web-private.
For example if I open this link in https (I deployed for test purpose the ear on cloudjiffy. It will be available online just for a short period):
https://env-2702045.cloudjiffy.net/nights-web-private
I am redirected to
http://env-2702045.cloudjiffy.net/nights-web-private/public/sign/signin.xhtml over a simple http.
Additional Information
I don’t know if I’m missing something but it seems like the AdminFilter class inside the doFilter method does not take in account that I’m coming to this page from https. Maybe it’s something related to the redirectToLogon method.
- AdminFaces version: admin-template 1.0.0-RC18
- PrimeFaces version: PF 6.2
- JSF implementation: Mojarra 2.2.15
Issue Analytics
- State:
- Created 5 years ago
- Comments:33 (18 by maintainers)

Top Related StackOverflow Question
Can’t see that page now, I’ll open another issue for this thing, I thought that was related with this
1.0.0-RC21-SNAPSHOTbut I don’t think so now.Hi @danielemaddaluno,
I have just reproduced on admin-starter, accessing the login page directly works on https: https://admin-starter-admin-starter.1d35.starter-us-east-1.openshiftapps.com/admin-starter/login.xhtml
But when I only access the application context it redirects through http and don’t work: https://admin-starter-admin-starter.1d35.starter-us-east-1.openshiftapps.com/admin-starter/
I’ll have a look, thanks for reporting.