From 5976e69f549a9f8752c926c305ffe50c88d57919 Mon Sep 17 00:00:00 2001
From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com.>
Date: Fri, 29 Nov 2024 10:40:10 +0000
Subject: [PATCH] debugs

---
 .../SPDF/config/security/SecurityConfiguration.java       | 3 ++-
 src/main/resources/application.properties                 | 8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java b/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java
index c28b967e..9652566f 100644
--- a/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java
+++ b/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java
@@ -150,10 +150,11 @@ public class SecurityConfiguration {
             http.sessionManagement(
                     sessionManagement ->
                             sessionManagement
-                                    .sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED)
+                                    .sessionCreationPolicy(SessionCreationPolicy.ALWAYS)
                                     .sessionAuthenticationStrategy(
                                             new RegisterSessionAuthenticationStrategy(
                                                     sessionRegistry)) // ?
+                                    .sessionFixation().changeSessionId()
                                     .maximumSessions(10)
                                     .maxSessionsPreventsLogin(false)
                                     .sessionRegistry(sessionRegistry)
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 4deb7548..07492f9f 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -3,11 +3,11 @@ multipart.enabled=true
 logging.level.org.springframework=WARN
 logging.level.org.hibernate=WARN
 logging.level.org.eclipse.jetty=WARN
-#logging.level.org.springframework.security.saml2=TRACE
+logging.level.org.springframework.security.saml2=TRACE
 #logging.level.org.springframework.security=DEBUG
-#logging.level.org.opensaml: DEBUG
+logging.level.org.opensaml: DEBUG
 logging.level.com.zaxxer.hikari=WARN
-
+logging.level.stirling.software.SPDF.config.security: DEBUG
 spring.jpa.open-in-view=false
 
 server.forward-headers-strategy=NATIVE
@@ -30,7 +30,7 @@ server.servlet.context-path=${SYSTEM_ROOTURIPATH:/}
 
 spring.devtools.restart.enabled=true
 spring.devtools.livereload.enabled=true
-spring.devtools.restart.exclude=stirling/software/SPDF/config/security/saml2/**
+spring.devtools.restart.exclude=stirling.software.SPDF.config.security/**
 
 spring.thymeleaf.encoding=UTF-8