oidcconfig

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package oidcconfig parses and validates Podplane OIDC server configuration files.

Index

Constants

View Source
const DefaultSchemaRef = "./" + SchemaFileName

DefaultSchemaRef is the relative schema reference embedded in new OIDC configs.

View Source
const SchemaFileName = "podplane.oidc.schema.json"

SchemaFileName is the local JSON Schema file written next to OIDC configs.

Variables

SchemaJSON is the JSON Schema for podplane.oidc.jsonc files.

Functions

func Validate

func Validate(cfg *Config) error

func Write

func Write(path string, cfg *Config) error

Write writes a formatted OIDC configuration file to disk.

func WriteSchema added in v0.2.0

func WriteSchema(dir string) error

WriteSchema writes the local JSON Schema file used by editors for offline validation, completion, and hover documentation.

Types

type Client

type Client struct {
	GroupsOverride string   `json:"groups_override,omitempty"`
	RedirectURIs   []string `json:"redirect_uris,omitempty"`
}

type Config

type Config struct {
	Schema string `json:"$schema,omitempty"`
	OIDC   OIDC   `json:"oidc"`
}

func Load

func Load(path string) (*Config, error)

Load reads an OIDC config file, strips JSONC comments, and validates the parsed configuration.

func NewDraftConfig

func NewDraftConfig(providerKind string) *Config

NewDraftConfig returns a mutable draft Easy OIDC config for the requested provider.

func (*Config) IssuerURL

func (c *Config) IssuerURL() string

IssuerURL returns the HTTPS issuer URL for the configured OIDC hostname.

type Connector

type Connector struct {
	Kind            string `json:"kind"`
	ClientSecretARN string `json:"client_secret_arn"`
}

type Domain

type Domain struct {
	Zone     string         `json:"zone,omitempty"`
	Provider DomainProvider `json:"provider,omitempty"`
}

type DomainProvider

type DomainProvider struct {
	Kind         string `json:"kind,omitempty"`
	HostedZoneID string `json:"hosted_zone_id,omitempty"`
}

type GroupsOverride

type GroupsOverride map[string][]string

type OIDC

type OIDC struct {
	Provider            Provider                  `json:"provider"`
	Hostname            string                    `json:"hostname"`
	Domain              Domain                    `json:"domain"`
	Connector           Connector                 `json:"connector"`
	SigningKeySecretARN string                    `json:"signing_key_secret_arn"`
	DefaultRedirectURIs []string                  `json:"default_redirect_uris,omitempty"`
	Clients             map[string]Client         `json:"clients,omitempty"`
	GroupsOverrides     map[string]GroupsOverride `json:"groups_overrides,omitempty"`
}

type Provider

type Provider struct {
	Kind    string `json:"kind"`
	Region  string `json:"region,omitempty"`
	Account string `json:"account,omitempty"`
	Profile string `json:"profile,omitempty"`
	Project string `json:"project,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL