Documentation
¶
Overview ¶
Package tenant holds the settings of a tenant (PHASE1 step 18): whether the server may generate keys, and the subject defaults that fill empty fields of a request – what pki.conf of legacy/pki.sh did.
Index ¶
- Constants
- Variables
- type ACMELimits
- type Settings
- type Store
- func (s *Store) ACMELimits(ctx context.Context, tenant string) (ACMELimits, error)
- func (s *Store) Defaults(ctx context.Context, tenant string) (*Settings, error)
- func (s *Store) Get(ctx context.Context, tenant string, who keys.Who) (*Settings, error)
- func (s *Store) Set(ctx context.Context, tenant string, v Settings, who keys.Who) error
- func (s *Store) TrustPage(ctx context.Context, tenant string) (bool, error)
Constants ¶
View Source
const ActionSettings = "tenant.settings"
ActionSettings is the audit action of a change.
Variables ¶
View Source
var DefaultACMELimits = ACMELimits{OrdersPerAccount: 300, FailedPerName: 5, AccountsPerIP: 10}
DefaultACMELimits are the limits of a new tenant (migration 0009).
View Source
var ErrInvalid = errors.New("invalid settings")
ErrInvalid wraps every refused value.
Functions ¶
This section is empty.
Types ¶
type ACMELimits ¶ added in v0.2.0
type ACMELimits struct {
OrdersPerAccount int // new orders per account
FailedPerName int // failed validations per name
AccountsPerIP int // new accounts per client address (IPv6: per /64)
}
ACMELimits are per hour (PHASE2 step 11).
type Settings ¶
type Settings struct {
AllowServerKeygen bool
Organization string
OrganizationalUnit string
Locality string
State string
Country string
// ACME: the rate limits of the ACME server. Get always fills it; in
// Set, nil keeps the stored limits (a v0.1 client doesn't send them).
ACME *ACMELimits
// TrustPage: the public listener serves the trust page at / (v0.2.2,
// default on). Get always fills it; in Set, nil keeps the stored value
// (a v0.2 client doesn't send it).
TrustPage *bool
}
Settings of a tenant.
type Store ¶
Store reads and writes settings in system.db.
func (*Store) ACMELimits ¶ added in v0.2.0
ACMELimits returns the limits without a permission check (for the ACME server).
func (*Store) Defaults ¶
Defaults returns the settings without a permission check (for the services that fill requests).
Click to show internal directories.
Click to hide internal directories.