package v1alpha1

import "k8s.io/kubernetes/pkg/serviceaccount/externaljwt/plugin/testing/v1alpha1"

Index

Types

type KeyT

type KeyT struct {
	Key                      []byte
	ExcludeFromOidcDiscovery bool
}

type MockSigner

type MockSigner struct {
	SigningKey                *rsa.PrivateKey
	SigningKeyID              string
	SigningAlg                string
	TokenType                 string
	MaxTokenExpirationSeconds int64

	FetchError    error
	MetadataError error
	// contains filtered or unexported fields
}

func NewMockSigner

func NewMockSigner(t *testing.T, socketPath string) *MockSigner

NewMockSigner starts and returns a new MockSigner It servers on the provided socket.

func (*MockSigner) CleanUp

func (m *MockSigner) CleanUp()

CleanUp stops gRPC server and the underlying listener.

func (*MockSigner) FetchKeys

func (*MockSigner) GetSupportedKeys

func (m *MockSigner) GetSupportedKeys() map[string]KeyT

func (*MockSigner) Metadata

func (*MockSigner) Reset

func (m *MockSigner) Reset() error

Reset genrate and adds signing/supported keys to MockSigner instance.

func (*MockSigner) SetSupportedKeys

func (m *MockSigner) SetSupportedKeys(keys map[string]KeyT)

func (*MockSigner) Sign

func (*MockSigner) WaitForSupportedKeysFetch

func (m *MockSigner) WaitForSupportedKeysFetch()

Source Files

externalsigner_mock.go

Version
v1.33.2 (latest)
Published
Jun 17, 2025
Platform
js/wasm
Imports
18 packages
Last checked
1 hour ago

Tools for package owners.