ITfoxtec SAML with load balanced web servers












1















We are using the ITfoxtec.Identity.Saml2 library to authenticate with our SSO
service.



The problem is we are using this on a load balanced servers. If we turn sticky sessions off, the application no longer functions.



I've tried setting isPersistent= true when we create the session but it has had no affect. I've seen similar issues posted related to storing SAML state across a web farm with suggestions ranging from:



Changing the configuration so all servers on the webfarm use the same machine key
Creating what amounts to a state service to store authentication.



I would think there would be a way to natively store user state in a cookie that would be reusable regardless if load balancing is being used or not.



Any suggestions on how to attack this?










share|improve this question





























    1















    We are using the ITfoxtec.Identity.Saml2 library to authenticate with our SSO
    service.



    The problem is we are using this on a load balanced servers. If we turn sticky sessions off, the application no longer functions.



    I've tried setting isPersistent= true when we create the session but it has had no affect. I've seen similar issues posted related to storing SAML state across a web farm with suggestions ranging from:



    Changing the configuration so all servers on the webfarm use the same machine key
    Creating what amounts to a state service to store authentication.



    I would think there would be a way to natively store user state in a cookie that would be reusable regardless if load balancing is being used or not.



    Any suggestions on how to attack this?










    share|improve this question



























      1












      1








      1








      We are using the ITfoxtec.Identity.Saml2 library to authenticate with our SSO
      service.



      The problem is we are using this on a load balanced servers. If we turn sticky sessions off, the application no longer functions.



      I've tried setting isPersistent= true when we create the session but it has had no affect. I've seen similar issues posted related to storing SAML state across a web farm with suggestions ranging from:



      Changing the configuration so all servers on the webfarm use the same machine key
      Creating what amounts to a state service to store authentication.



      I would think there would be a way to natively store user state in a cookie that would be reusable regardless if load balancing is being used or not.



      Any suggestions on how to attack this?










      share|improve this question
















      We are using the ITfoxtec.Identity.Saml2 library to authenticate with our SSO
      service.



      The problem is we are using this on a load balanced servers. If we turn sticky sessions off, the application no longer functions.



      I've tried setting isPersistent= true when we create the session but it has had no affect. I've seen similar issues posted related to storing SAML state across a web farm with suggestions ranging from:



      Changing the configuration so all servers on the webfarm use the same machine key
      Creating what amounts to a state service to store authentication.



      I would think there would be a way to natively store user state in a cookie that would be reusable regardless if load balancing is being used or not.



      Any suggestions on how to attack this?







      load-balancing saml-2.0 web-farm itfoxtec-identity-saml2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 '18 at 11:57









      Anders Revsgaard

      9111




      9111










      asked Nov 20 '18 at 5:35









      Dean ErlingDean Erling

      61




      61
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Using ITfoxtec.Identity.Saml2.Mvc and ASP.NET MVC the isPersitent is a parameter on the CreateSession method. The CreateSession method used in the
          ASP.NET sample application.



          The method is called after the SAML 2.0 response is accepted to create the user identity cookie handled by the SessionAuthenticationModule.



          Default the user identity cookies is not persistent. Setting the isPersitent=true result in creating persistent user identity cookies.



          It should not be a problem to use load balancing unless the isReferenceMode=true. Reference mode change the user identity cookies from being self contained to being a pointer.




          In reference mode, a simple artifact is produced during serialization and the token material is stored in the token cache that is associated with the token handler. The token cache is an instance of a class that derives from SessionSecurityTokenCache. For Web Farm scenarios, the token cache must operate across all nodes in the farm.




          Maybe you need to implement a token cache.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53386826%2fitfoxtec-saml-with-load-balanced-web-servers%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Using ITfoxtec.Identity.Saml2.Mvc and ASP.NET MVC the isPersitent is a parameter on the CreateSession method. The CreateSession method used in the
            ASP.NET sample application.



            The method is called after the SAML 2.0 response is accepted to create the user identity cookie handled by the SessionAuthenticationModule.



            Default the user identity cookies is not persistent. Setting the isPersitent=true result in creating persistent user identity cookies.



            It should not be a problem to use load balancing unless the isReferenceMode=true. Reference mode change the user identity cookies from being self contained to being a pointer.




            In reference mode, a simple artifact is produced during serialization and the token material is stored in the token cache that is associated with the token handler. The token cache is an instance of a class that derives from SessionSecurityTokenCache. For Web Farm scenarios, the token cache must operate across all nodes in the farm.




            Maybe you need to implement a token cache.






            share|improve this answer




























              0














              Using ITfoxtec.Identity.Saml2.Mvc and ASP.NET MVC the isPersitent is a parameter on the CreateSession method. The CreateSession method used in the
              ASP.NET sample application.



              The method is called after the SAML 2.0 response is accepted to create the user identity cookie handled by the SessionAuthenticationModule.



              Default the user identity cookies is not persistent. Setting the isPersitent=true result in creating persistent user identity cookies.



              It should not be a problem to use load balancing unless the isReferenceMode=true. Reference mode change the user identity cookies from being self contained to being a pointer.




              In reference mode, a simple artifact is produced during serialization and the token material is stored in the token cache that is associated with the token handler. The token cache is an instance of a class that derives from SessionSecurityTokenCache. For Web Farm scenarios, the token cache must operate across all nodes in the farm.




              Maybe you need to implement a token cache.






              share|improve this answer


























                0












                0








                0







                Using ITfoxtec.Identity.Saml2.Mvc and ASP.NET MVC the isPersitent is a parameter on the CreateSession method. The CreateSession method used in the
                ASP.NET sample application.



                The method is called after the SAML 2.0 response is accepted to create the user identity cookie handled by the SessionAuthenticationModule.



                Default the user identity cookies is not persistent. Setting the isPersitent=true result in creating persistent user identity cookies.



                It should not be a problem to use load balancing unless the isReferenceMode=true. Reference mode change the user identity cookies from being self contained to being a pointer.




                In reference mode, a simple artifact is produced during serialization and the token material is stored in the token cache that is associated with the token handler. The token cache is an instance of a class that derives from SessionSecurityTokenCache. For Web Farm scenarios, the token cache must operate across all nodes in the farm.




                Maybe you need to implement a token cache.






                share|improve this answer













                Using ITfoxtec.Identity.Saml2.Mvc and ASP.NET MVC the isPersitent is a parameter on the CreateSession method. The CreateSession method used in the
                ASP.NET sample application.



                The method is called after the SAML 2.0 response is accepted to create the user identity cookie handled by the SessionAuthenticationModule.



                Default the user identity cookies is not persistent. Setting the isPersitent=true result in creating persistent user identity cookies.



                It should not be a problem to use load balancing unless the isReferenceMode=true. Reference mode change the user identity cookies from being self contained to being a pointer.




                In reference mode, a simple artifact is produced during serialization and the token material is stored in the token cache that is associated with the token handler. The token cache is an instance of a class that derives from SessionSecurityTokenCache. For Web Farm scenarios, the token cache must operate across all nodes in the farm.




                Maybe you need to implement a token cache.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 20 '18 at 16:41









                Anders RevsgaardAnders Revsgaard

                9111




                9111






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53386826%2fitfoxtec-saml-with-load-balanced-web-servers%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    MongoDB - Not Authorized To Execute Command

                    How to fix TextFormField cause rebuild widget in Flutter

                    in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith