httpchallenge

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// PluginName for http based attestor
	PluginName = "http_challenge"
)

Variables

This section is empty.

Functions

func MakeAgentID

func MakeAgentID(td spiffeid.TrustDomain, hostName string) (spiffeid.ID, error)

MakeAgentID creates an agent ID

func VerifyChallenge

func VerifyChallenge(ctx context.Context, client *http.Client, attestationData *AttestationData, challenge *Challenge) error

Types

type AttestationData

type AttestationData struct {
	HostName  string `json:"hostname"`
	AgentName string `json:"agentname"`
	Port      int    `json:"port"`
}

type Challenge

type Challenge struct {
	Nonce string `json:"nonce"`
}

func GenerateChallenge

func GenerateChallenge(forceNonce string) (*Challenge, error)

type Response

type Response struct {
}

func CalculateResponse

func CalculateResponse(_ *Challenge) (*Response, error)

Jump to

Keyboard shortcuts

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