Documentation
¶
Index ¶
- func RenderJWTAuthConf(operatorJWT, resolverDir string) string
- func RenderJWTAuthConfWithPreload(operatorJWT string, accounts []AccountJWT) string
- func RenderMixedAuthConf(operatorJWT, resolverDir string, tokenUsers []TokenUser) string
- func RenderTokenAuthConf(users []TokenUser) string
- type AccountJWT
- type TokenUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderJWTAuthConf ¶
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 ¶
RenderMixedAuthConf generates configuration for mixed mode (both token and JWT)
func RenderTokenAuthConf ¶
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
Click to show internal directories.
Click to hide internal directories.