question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AdminFaces redirects over http when using a load balancer

See original GitHub issue
Issue 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:closed
  • Created 5 years ago
  • Comments:33 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
danielemaddalunocommented, Jan 11, 2019

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-SNAPSHOT but I don’t think so now.

1reaction
rmpestanocommented, Jan 9, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use an Application Load Balancer to redirect HTTP to HTTPS
I want to redirect HTTP requests to HTTPS using Application Load Balancer ... Under Load Balancing in the sidebar, choose Load Balancers.
Read more >
How can I redirect HTTP requests to HTTPS using ... - YouTube
For more details see the Knowledge Center article with this video: ... redirect HTTP requests to HTTPS using an Application Load Balancer.
Read more >
Using Redirects with the HTTP Load Balancer
Use redirects to redirect a request from one URL to another URL. For example, use redirects to send users to a different web...
Read more >
Server Load Balancer:Redirect HTTP requests to HTTPS
HTTPS is a protocol used to secure data transmission. To achieve end-to-end data transfer over HTTPS, you can configure Classic Load ...
Read more >
Oracle Fusion Middleware High Availability Guide
Configure Access Manager to Work with Oracle HTTP Server . ... member fails, the load balancer detects the failure and automatically redirects.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found