Documentation
¶
Overview ¶
Package provision creates tenants for Zitadel organizations on their first login (FA-TEN-03, ADR 0029).
Index ¶
Constants ¶
const (
DefaultMax = 100
)
Defaults of the automatic provisioning (ADR 0029).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provisioner ¶
type Provisioner struct {
// contains filtered or unexported fields
}
Provisioner creates the tenant of a Zitadel organization on its first login (FA-TEN-03, ADR 0029). The caller has verified the token and checked that the user holds a role in the organization. It implements oidc.Provisioner.
func NewProvisioner ¶
func NewProvisioner(opts ProvisionerOptions) (*Provisioner, error)
NewProvisioner returns a provisioner. Max must be at least 1.
type ProvisionerOptions ¶
type ProvisionerOptions struct {
Cluster Applier
// PlanID is the plan of new tenants (OIDC_AUTO_PROVISION_PLAN).
PlanID string
// Max is the highest number of automatically created tenants
// (OIDC_AUTO_PROVISION_MAX); the FSM enforces it cluster-wide.
Max int
Log *slog.Logger
// Now is replaced in tests.
Now func() time.Time
}
ProvisionerOptions configure a Provisioner.