fipsinfo

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: AGPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fipsinfo reports the process's FIPS 140-3 status, for the startup log, the /health endpoints of AI Studio and the microgateway, and the edge heartbeat (so the hub can show each edge's status).

A FIPS build (GOFIPS140=v1.0.0) defaults to fips140=on, but an operator can still turn FIPS mode off at run time with GODEBUG=fips140=off; Enabled then reports false, which is what this package makes visible.

Index

Constants

View Source
const (
	MetricEnabled  = "fips.enabled"
	MetricVersion  = "fips.version"
	MetricEnforced = "fips.enforced"
)

Keys of the status in the edge heartbeat's health metrics (HeartbeatRequest.health.metrics). Edges released before this field send none, and the hub then shows the status as unknown.

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status struct {
	// Enabled: FIPS 140-3 mode is on (crypto/fips140.Enabled).
	Enabled bool `json:"enabled"`
	// Version is the Go Cryptographic Module version in use, such as
	// "v1.0.0-c2097c7c" for a GOFIPS140=v1.0.0 build (crypto/fips140.Version).
	Version string `json:"version"`
	// Enforced: non-approved algorithms are refused (GODEBUG=fips140=only).
	Enforced bool `json:"enforced"`
}

Status is the FIPS 140-3 status of a process.

func Current

func Current() Status

Current returns this process's status.

func FromMetrics

func FromMetrics(m map[string]string) (s Status, ok bool)

FromMetrics reads a status from heartbeat health metrics; ok is false when the edge did not report one, or reported something unreadable (including a version over 64 characters or outside [A-Za-z0-9.+_-]).

func (Status) Metrics

func (s Status) Metrics() map[string]string

Metrics returns the status as heartbeat health metrics.

Jump to

Keyboard shortcuts

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