test: fix SAML integration tests (#11241)

# Which Problems Are Solved

Some SAML integration tests used a hardcoded certificate, which expired
on the 25th December 2025.

# How the Problems Are Solved

Added helper functions to the integration package to create and store a
private key and certificate for SAML, which can be used in SAML SP/IDP
integration tests.

# Additional Changes

none

# Additional Context

- noted on #11196
- requires backport to at least v4.x
This commit is contained in:
Livio Spring
2025-12-29 13:08:37 +00:00
committed by GitHub
parent 03916cd0f2
commit 72c8f0192c
3 changed files with 77 additions and 62 deletions
+6
View File
@@ -4,6 +4,8 @@ package integration
import (
"bytes"
"context"
"crypto/rsa"
"crypto/x509"
_ "embed"
"errors"
"fmt"
@@ -94,6 +96,10 @@ type Instance struct {
Client *Client
WebAuthN *webauthn.Client
SAML struct {
PrivateKey *rsa.PrivateKey
Certificate *x509.Certificate
}
}
// NewInstance returns a new instance that can be used for integration tests.