FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    FusionAuth with haproxy

    Scheduled Pinned Locked Moved
    Q&A
    3
    6
    777
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      chandandas.dh
      last edited by

      Hi Guys,
      I am new to FusionAuth and i need some help. Can i use FusionAuth tool with haproxy? For example, i have two application running ( say for Grafana and one web page in nginx) . I have one haproxy server also. So haproxy is configured like, when i browse haproxy IP/grafana => it will open Grafana application and when i will browse haproxy IP/nginx => it will open my web page. So i want like, i want to install and configure FusionAuth such a way, when i will try to open my any of application, it will first show FusionAuth login page and once authentication done - it will open my application. is it possible?

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        I'm not familiar with HAProxy's configuration, but there's no reason you couldn't do this with some of the other proxy's I've used, so I'm hopeful.

        You'll want to create two applications in FA and specify the redirect to be different for each one (say https://server/grafana and https://server/nginx). Then when a request is sent to your server, you'll want to check for a cookie: https://serverfault.com/questions/228823/haproxy-check-if-cookie-is-set . If that cookie isn't set, send them to FA. If it is, send them on to the application they requested.

        FA sets a couple of cookies on successful authentication, depending on the method you are authenticating, though these are undocumented. If you'd like the ability to be able to set a specific cookie on authentication for this use case, please open a github issue: https://github.com/fusionauth/fusionauth-issues/issues

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • C
          chandandas.dh
          last edited by chandandas.dh

          Thanks for your reply. Can you please let me know full code or command? i am fully new to this, and my client has given requirement.

          danD 1 Reply Last reply Reply Quote 0
          • danD
            dan @chandandas.dh
            last edited by

            I'm sorry, I can't provide a full working solution as that would require a fair bit of time to set up the environment, learn HAProxy and test it out.

            If you'd like to discuss professional services, please let us know.

            Here's more information about that option: https://fusionauth.io/community/forum/topic/51/i-need-feature-abc-and-am-willing-to-pay-you-to-build-it-how-can-i-get-in-touch

            --
            FusionAuth - Auth for devs, built by devs.
            https://fusionauth.io

            1 Reply Last reply Reply Quote 0
            • I
              icsnyder42
              last edited by

              Hey there! I just configured haproxy to pass traffic to fusionauth today! Everything is working hokey pokey! 😄

              1 Reply Last reply Reply Quote 0
              • danD
                dan
                last edited by

                Here's a contrib project where community members have added proxy configs: https://github.com/FusionAuth/fusionauth-contrib

                --
                FusionAuth - Auth for devs, built by devs.
                https://fusionauth.io

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post