Documentation
¶
Overview ¶
Package secrets stores worker-local credentials. Values have no network read API.
Index ¶
- Constants
- func NewManagementKey() (*ecdh.PrivateKey, error)
- func Open(private *ecdh.PrivateKey, node, name string, e Envelope) (string, error)
- func SecureURL(raw string) bool
- func ValidDeadline(expires int64, now time.Time) bool
- func ValidManagementKey(key []byte) bool
- func ValidName(name string) bool
- func ValidRequestID(id string) bool
- type Envelope
- type ManagementReply
- type ManagementRequest
- type Metadata
- type Redactor
- type RemoteList
- type Store
Constants ¶
View Source
const MaxRemoteMessage = 12 << 10
View Source
const MaxValue = 4096
View Source
const RemoteProtocol = "control-secrets-v1"
Variables ¶
This section is empty.
Functions ¶
func NewManagementKey ¶ added in v0.6.0
func NewManagementKey() (*ecdh.PrivateKey, error)
func SecureURL ¶ added in v0.6.0
SecureURL permits authenticated HTTPS or direct loopback development only. Remote HTTP permits key substitution even when secret values are encrypted.
func ValidManagementKey ¶ added in v0.6.0
func ValidRequestID ¶ added in v0.6.0
Types ¶
type Envelope ¶ added in v0.6.0
type Envelope struct {
ID string `json:"id"`
ExpiresAt int64 `json:"expiresAt"`
Key []byte `json:"key"`
Nonce []byte `json:"nonce"`
Ciphertext []byte `json:"ciphertext"`
}
Envelope carries only ciphertext. Its key is the sender's ephemeral P-256 public key, not the worker's private decryption key.
type ManagementReply ¶ added in v0.6.0
type ManagementReply struct {
ID string `json:"id"`
Error string `json:"error,omitempty"`
Secrets []Metadata `json:"secrets,omitempty"`
}
ManagementReply has no value field or arbitrary diagnostic text.
type ManagementRequest ¶ added in v0.6.0
type Metadata ¶ added in v0.6.0
type Metadata struct {
Name string `json:"name"`
CreatedAt time.Time `json:"createdAt,omitzero"`
UpdatedAt time.Time `json:"updatedAt,omitzero"`
}
Metadata describes a secret without its value. Zero timestamps mean unknown.
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
Redactor masks exact values and common text encodings. Arbitrary transforms, screenshots, and application-managed files are outside this protection.
func NewRedactor ¶
type RemoteList ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.