kerberos

package
v0.0.0-...-92dd6e1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package kerberos provides Kerberos/SPNEGO authentication for Bifrost. It supports Windows domain authentication via GSSAPI/SPNEGO tokens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator struct {
	// contains filtered or unexported fields
}

Authenticator provides Kerberos/SPNEGO authentication.

func (*Authenticator) Authenticate

func (a *Authenticator) Authenticate(ctx context.Context, username, password string) (*auth.UserInfo, error)

Authenticate validates a Kerberos ticket. For SPNEGO/Negotiate auth, the SPNEGO token should be passed via context. The password parameter can contain a base64-encoded SPNEGO token for convenience.

func (*Authenticator) GetRealm

func (a *Authenticator) GetRealm() string

GetRealm returns the configured realm.

func (*Authenticator) GetServicePrincipal

func (a *Authenticator) GetServicePrincipal() string

GetServicePrincipal returns the configured service principal.

func (*Authenticator) Name

func (a *Authenticator) Name() string

Name returns the authenticator name.

func (*Authenticator) ReloadKeytab

func (a *Authenticator) ReloadKeytab() error

ReloadKeytab reloads the keytab from the configured source.

func (*Authenticator) Type

func (a *Authenticator) Type() string

Type returns the authenticator type.

type ContextKey

type ContextKey string

ContextKey is a type for context keys used by this package.

const (
	// SPNEGOTokenContextKey is the context key for the SPNEGO token.
	SPNEGOTokenContextKey ContextKey = "kerberos_spnego_token" //nolint:gosec // G101: This is a context key name, not a credential
)

Jump to

Keyboard shortcuts

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