Documentation
¶
Overview ¶
Package ssotest provides a backend-agnostic conformance suite for the sso.Store interface. Every backend (memory, sqlite, postgres, mongo) is expected to pass the same contract, so behavioral drift between them is caught here rather than in production.
SSO connections route by domain, so most of the risk in this store is tenancy: a domain lookup that forgets its app predicate hands one tenant's users to another tenant's identity provider.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fixture ¶
type Fixture struct {
Store sso.Store
AppID id.AppID
// EnvID is the app's default environment. Postgres declares a foreign key
// on it; memory, sqlite and mongo do not, so a fixture that omits it
// passes on three backends and fails on the fourth.
EnvID string
// OtherAppID is a second tenant, used to prove that domain, provider and
// listing lookups are all scoped to one app.
OtherAppID id.AppID
// OtherEnvID is that second tenant's default environment.
OtherEnvID string
// OrgID and OtherOrgID are two organizations inside AppID. Connections
// route per organization as well as per app, so proving that lookup needs
// two orgs under one tenant rather than two tenants. org_id carries no
// foreign key on any backend, so these need no row of their own.
OrgID id.OrgID
OtherOrgID id.OrgID
}
Fixture is one backend ready to test, plus the tenants its rows hang off.
Click to show internal directories.
Click to hide internal directories.