identity

package
v0.157.5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package identity is who calls `beekeeper serve`: a person, from the Dex ID token muster forwards (or an installation exchanged), validated against the issuer's JWKS. A person is their verified email, never the token's subject, which Dex scopes to a connector and which differs between installations; their team comes from their groups.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller

type Caller struct {
	// Email is the token's verified email: the person's key in every record.
	Email string
	// Team is the team of the first configured group the person is in.
	Team   string
	Groups []string
}

Caller is a verified person.

func (Caller) In

func (c Caller) In(group string) bool

In reports whether the caller is a member of group.

type RefusedError

type RefusedError struct{ Reason string }

RefusedError is a token or person the server does not accept.

func (*RefusedError) Error

func (e *RefusedError) Error() string

type Verifier

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

Verifier checks ID tokens against one issuer and the configured audiences, organization and teams.

func New

func New(ctx context.Context, cfg config.Serve) (*Verifier, error)

New discovers the issuer's keys and returns its verifier. It refuses a configuration that would let anyone in.

func (*Verifier) Supervises

func (v *Verifier) Supervises(c Caller, team string) bool

Supervises reports whether c holds team's supervisor role.

func (*Verifier) Verify

func (v *Verifier) Verify(ctx context.Context, raw string) (Caller, error)

Verify returns the person a bearer token names, or a RefusedError.

Directories

Path Synopsis
Package identitytest is a Dex stand-in for tests: an OIDC issuer that serves its discovery document and keys and signs ID tokens.
Package identitytest is a Dex stand-in for tests: an OIDC issuer that serves its discovery document and keys and signs ID tokens.

Jump to

Keyboard shortcuts

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