Documentation
¶
Overview ¶
Package auditlog implements 3rd-party auditlog service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditDB ¶
type AuditDB struct {
// contains filtered or unexported fields
}
AuditDB audit db
type Log ¶
type Log struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"-"` Level string `bson:"level" json:"level"` // DeployEnv where the log from DeployEnv string `bson:"deploy_env" json:"deploy_env"` Time time.Time `bson:"time" json:"time"` Logger string `bson:"logger" json:"logger"` Caller string `bson:"caller" json:"caller"` Msg string `bson:"msg" json:"msg"` ClusterUUID string `bson:"cluster_uuid" json:"cluster_uuid"` // Ts used for generate signature Ts string `bson:"ts" json:"ts"` CertChain string `bson:"cert_chain" json:"cert_chain"` // Signature generated by RSASHA256(msg + l.clusterUUID + ts) Signature string `bson:"signature" json:"signature"` // Verified if signature is valid Verified bool `bson:"verified" json:"verified"` UUID string `bson:"uuid" json:"uuid"` }
Log for audit log
Example ¶
{ "level": "info", "time": "2023-08-01T09:09:34.377Z", "logger": "pki.pki-audit", "caller": "audit/log.go:61", "msg": "yahoo", "cluster_uuid": "63760a3b-2f53-11ee-b5a4-5c6f69c1c020", "uuid": "63760a3b-2f53-11ee-b5a4-5c6f69c1c123", "ts": "2023-08-01T09:09:28Z", "cert_chain": "-----BEGIN CERTIFICATE-xxx", "signature": "3282c1160a47c84xxx" }
func (*Log) ValidFormat ¶
ValidFormat check log format and Signature
Click to show internal directories.
Click to hide internal directories.