auth

package
v1.234.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package auth adapts native plugin auth services to the shared Atmos auth authregistry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IdentityConstructor

func IdentityConstructor(definition *Definition, accepts []string, materialize MaterializerFactory) authregistry.IdentityConfigConstructor

IdentityConstructor registers a native identity with explicit accepted credential types.

func ProviderConstructor

func ProviderConstructor(definition *Definition) authregistry.ProviderConfigConstructor

ProviderConstructor supplies the same full-configuration constructor used by built-in auth.

Types

type Definition

type Definition struct {
	Package    string
	Expected   *pluginv1.DescribeResponse
	Executable string
	Directory  string
	Outputs    []string
	Schema     func(any) error
	// SchemaTarget selects principal or spec for identity validation; empty preserves principal.
	SchemaTarget string
	Services     Services
	Credentials  *credential.Registry
	// Timeout bounds every call into the plugin; zero means no deadline.
	Timeout time.Duration
}

Definition binds a statically validated export to its immutable package executable.

type Materializer

type Materializer interface {
	Apply(context.Context, *types.PostAuthenticateParams) error
	Environment() (map[string]string, error)
	Paths() ([]types.Path, error)
	Logout(context.Context) error
	SetRealm(string)
	Load(context.Context) (types.ICredentials, error)
	PrepareEnvironment(map[string]string) (map[string]string, error)
	SetRootProvider(string)
}

Materializer applies decoded credentials to an Atmos execution environment. Credential contracts provide this seam; the plugin runtime never writes cloud files.

func AWSMaterializer

func AWSMaterializer(name string, config *schema.Identity) Materializer

AWSMaterializer reuses the built-in AWS profile and auth-context implementation.

func EnvironmentMaterializer

func EnvironmentMaterializer(string, *schema.Identity) Materializer

EnvironmentMaterializer keeps environment credentials scoped to this identity.

type MaterializerFactory

type MaterializerFactory func(string, *schema.Identity) Materializer

MaterializerFactory creates invocation-local cloud file/environment state.

type Services

type Services struct {
	HTTP            api.HTTP
	Keyring         keyring.Keyring
	CredentialStore types.CredentialStore
	Browser         api.Browser
	Interactive     func() bool
	LockDirectory   string
	Secrets         func(string, map[string]any) bridge.SecretReader
}

Services are Atmos-owned dependencies; plugin configuration cannot replace them.

Jump to

Keyboard shortcuts

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