Files
authelia/internal/suites/suite_envoy.go
T
James Elliott 847afd67db test(suites): oidc conformance (#13097)
This adds the official OpenID Connect 1.0 Conformance Suites used by the
OpenID Foundation to assert conformance for certification to our test
suites. This allows us to offer the quality guarantee that every single
commit of Authelia conforms to the OpenID Connect 1.0 and related
specifications.

The tests allow the following results to indicate success automatically:
`PASSED`, `REVIEW` (result that manual review must occur), `SKIPPED`
(result that indicates the conformance test is not needed due to
reasonable criteria). In addition only the `FINISHED` status is
accepted.

If the result is `WARNING` which is just an informative result which
does not indicate lack of conformance it can be manually allowed on a
per module basis with an explanation. This allows both detecting new
`WARNING` results and necessitates documenting them for future
improvements.

All of the result and status checks align entirely with the standard
conformance certification process, ensuring that each commit would be
certifiable. The storage for the suites is able to be configured for
persistence, and every plan created carries the commit sha or tag;
allowing for historical evidence of conformance.
2026-09-12 11:56:33 +00:00

70 lines
2.0 KiB
Go

// SPDX-FileCopyrightText: 2026 Authelia
//
// SPDX-License-Identifier: Apache-2.0
package suites
import (
"os"
"time"
)
var envoySuiteName = "Envoy"
func init() {
dockerEnvironment := NewDockerEnvironment([]string{
"internal/suites/compose.yml",
"internal/suites/Envoy/compose.yml",
"internal/suites/example/compose/authelia/compose.backend.{}.yml",
"internal/suites/example/compose/authelia/compose.frontend.{}.yml",
"internal/suites/example/compose/nginx/backend/compose.yml",
"internal/suites/example/compose/envoy/compose.yml",
"internal/suites/example/compose/smtp/compose.yml",
"internal/suites/example/compose/httpbin/compose.yml",
})
if os.Getenv("CI") == t {
dockerEnvironment = NewDockerEnvironment([]string{
"internal/suites/compose.yml",
"internal/suites/Envoy/compose.yml",
"internal/suites/example/compose/authelia/compose.backend.{}.yml",
"internal/suites/example/compose/nginx/backend/compose.yml",
"internal/suites/example/compose/envoy/compose.yml",
"internal/suites/example/compose/smtp/compose.yml",
"internal/suites/example/compose/httpbin/compose.yml",
})
}
setup := func(suitePath string) (err error) {
if err = dockerEnvironment.Up(); err != nil {
return err
}
if err = waitUntilAutheliaIsReady(dockerEnvironment, envoySuiteName); err != nil {
return err
}
return updateDevEnvFileForDomain(BaseDomain, dockerEnvironment)
}
displayAutheliaLogs := func() error {
return dockerEnvironment.PrintLogs("authelia-backend", "authelia-frontend", "envoy")
}
teardown := func(suitePath string) error {
err := dockerEnvironment.Down()
return err
}
GlobalRegistry.Register(envoySuiteName, Suite{
SetUp: setup,
SetUpTimeout: 2 * time.Minute,
OnSetupTimeout: displayAutheliaLogs,
OnError: displayAutheliaLogs,
TestTimeout: 150 * time.Second,
TearDown: teardown,
TearDownTimeout: 1 * time.Minute,
Description: "This suite has been created to test Authelia as an authorization server behind the Envoy reverse proxy.",
})
}