secrets

command
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package main implements a mock HTTP secrets server for testing k6's URL secret source.

The server mimics a secret management API like Vault or Google Secret Manager, providing HTTP endpoints to retrieve secrets.

Usage:

go run examples/secrets/mock_server.go

The server listens on localhost:8888 by default and requires Bearer token authentication.

Example k6 command with inline configuration:

./k6 run --secret-source='url=urlTemplate=http://localhost:8888/secrets/{key}/decrypt,\
  headers.Authorization=Bearer YOUR_API_TOKEN_HERE,responsePath=plaintext' \
  examples/secrets/url-test.js

Jump to

Keyboard shortcuts

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