Back to godoc.org

Package log

v0.11.139
Latest Go to latest
Published: 3 days ago | Licenses: Apache-2.0 , MIT | Module: github.com/zalando/skipper

Overview

Package log provides a request logging filter, usable also for audit logging. Audit logging is showing who did a request in case of OAuth2 provider returns a "uid" key and value.

Index

Package Files

Constants

const (
	// AuditLogName is the filter name seen by the user
	AuditLogName = "auditLog"
	// AuthUserKey is used by the auth package to set the user
	// information into the state bag to pass the information to
	// the auditLog filter.
	AuthUserKey = "auth-user"
	// AuthRejectReasonKey is used by the auth package to set the
	// reject reason information into the state bag to pass the
	// information to the auditLog filter.
	AuthRejectReasonKey = "auth-reject-reason"
	// UnverifiedAuditLogName is the filtername seen by the user
	UnverifiedAuditLogName = "unverifiedAuditLog"

	// UnverifiedAuditHeader is the name of the header added to the request which contains the unverified audit details
	UnverifiedAuditHeader = "X-Unverified-Audit"
)

func NewAuditLog

func NewAuditLog(maxAuditBody int) filters.Spec

NewAuditLog creates an auditLog filter specification. It expects a maxAuditBody attribute to limit the size of the log. It will use os.Stderr as writer for the output of the log entries.

spec := NewAuditLog(1024)

func NewUnverifiedAuditLog

func NewUnverifiedAuditLog() filters.Spec

NewUnverifiedAuditLog logs "Sub" of the middle part of a JWT Token. Or else, logs the requested JSON key if present

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier