certextractor

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Kind is the kind of CertExtractor.
	Kind = "CertExtractor"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CertExtractor

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

CertExtractor extracts given field from TLS certificates and sets it to request headers.

func (*CertExtractor) Close

func (ce *CertExtractor) Close()

Close closes CertExtractor.

func (*CertExtractor) DefaultSpec

func (ce *CertExtractor) DefaultSpec() interface{}

DefaultSpec returns the default spec of CertExtractor.

func (*CertExtractor) Description

func (ce *CertExtractor) Description() string

Description returns the description of CertExtractor.

func (*CertExtractor) Handle

func (ce *CertExtractor) Handle(ctx httpcontext.HTTPContext) string

Handle retrieves header values and sets request headers.

func (*CertExtractor) Inherit

func (ce *CertExtractor) Inherit(filterSpec *httppipeline.FilterSpec, previousGeneration httppipeline.Filter)

Inherit inherits previous generation of CertExtractor.

func (*CertExtractor) Init

func (ce *CertExtractor) Init(filterSpec *httppipeline.FilterSpec)

Init initializes CertExtractor.

func (*CertExtractor) Kind

func (ce *CertExtractor) Kind() string

Kind returns the kind of CertExtractor.

func (*CertExtractor) Results

func (ce *CertExtractor) Results() []string

Results returns the results of CertExtractor.

func (*CertExtractor) Status

func (ce *CertExtractor) Status() interface{}

Status returns status.

type Spec

type Spec struct {
	CertIndex int16  `yaml:"certIndex" jsonschema:"required"`
	Target    string `yaml:"target" jsonschema:"required,enum=subject,enum=issuer"`
	// Different field options listed here https://pkg.go.dev/crypto/x509/pkix#Name
	Field     string `` /* 186-byte string literal not displayed */
	HeaderKey string `yaml:"headerKey" jsonschema:"required"`
}

Spec describes the CertExtractor.

func (*Spec) Validate

func (spec *Spec) Validate() error

Validate is dummy as yaml rules already validate Spec.

Jump to

Keyboard shortcuts

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