enhancement: same site strict cookies (#8716)

To enhance the security of our application and prevent Cross-Site Request Forgery (CSRF) attacks, we have updated the
SameSite attribute of the build in Identity Provider (IDP) cookies to Strict.
This commit is contained in:
Florian Schade
2024-03-25 10:16:10 +01:00
committed by GitHub
parent 65f77c2aa0
commit 6840de574a
18 changed files with 136 additions and 56 deletions
@@ -1,6 +1,7 @@
package defaults
import (
"net/http"
"path/filepath"
"strings"
@@ -64,6 +65,7 @@ func DefaultConfig() *config.Config {
ValidationKeysPath: "",
CookieBackendURI: "",
CookieNames: nil,
CookieSameSite: http.SameSiteStrictMode,
AccessTokenDurationSeconds: 60 * 5, // 5 minutes
IDTokenDurationSeconds: 60 * 5, // 5 minutes
RefreshTokenDurationSeconds: 60 * 60 * 24 * 30, // 30 days