oidcconfig

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package oidcconfig parses and validates Podplane OIDC server configuration files.

Index

Constants

This section is empty.

Variables

This section is empty.

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.

Types

type Client

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

type Config

type Config struct {
	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