authconf

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderJWTAuthConf

func RenderJWTAuthConf(operatorJWT, resolverDir string) string

RenderJWTAuthConf generates the JWT resolver configuration

func RenderJWTAuthConfWithPreload

func RenderJWTAuthConfWithPreload(operatorJWT string, accounts []AccountJWT) string

RenderJWTAuthConfWithPreload generates JWT config with resolver_preload This eliminates the need for emptyDir or shared filesystem

func RenderMixedAuthConf

func RenderMixedAuthConf(operatorJWT, resolverDir string, tokenUsers []TokenUser) string

RenderMixedAuthConf generates configuration for mixed mode (both token and JWT)

func RenderTokenAuthConf

func RenderTokenAuthConf(users []TokenUser) string

RenderTokenAuthConf generates the authorization section for token-based auth

Types

type AccountJWT

type AccountJWT struct {
	AccountName string // Kubernetes resource name
	AccountID   string // NATS public key (starts with AC...)
	JWT         string // The signed JWT
}

AccountJWT represents an account JWT for preload

type TokenUser

type TokenUser struct {
	Username    string
	Password    string
	Token       string
	Permissions *natsv1alpha1.Permissions
}

TokenUser represents a token-based user for auth.conf

Jump to

Keyboard shortcuts

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