Repository navigation
v0.3.0
New services and settings in the library, write verbs for kascli, and tests
for every function. "Changed" lists what behaves differently for existing
callers.
Library:
- Host settings.
HostSettingscarries document root, redirect status,
PHP version and the active flag for domains and subdomains.
Subdomains.CreateWithSettings,Subdomains.UpdateandDomains.Update
send the set fields only.SubdomainandDomainreport the same settings
plusPHPDeprecated,InProgressand the TLS state.Subdomains.Create
sends no PHP version, so the host gets the KAS default, which the API
documents as 7.1 —CreateWithSettingschooses one. - TLS.
TLS.Updateinstalls a certificate and sets the HTTPS redirect
and HSTS (update_ssl);TLS.Getreads the state of a host. Certificate
and key are validated before the request: they must form a pair and name
the host. The API has no parameter that requests a Let's Encrypt
certificate — that switch exists in the KAS panel only.
HostTLS.LetsEncryptreports whether a host uses one. - Two-factor authentication.
Config.OTPsupplies the one-time PIN,
sent assession_2faon every session handshake. - Mail.
UpdateRespondersets the autoresponder, with an optional time
window.UpdateState,UpdateAllowNetsandUpdateWebmailAutologin
control activation, allowed clients and the panel's webmail login.
AvailableFilters,SetFiltersandDeleteFiltersmanage the standard
filters.MailAccountreports all of it;CreateAccountsends an active
responder and the allowed clients. - New services.
FTP,Databases,CronjobsandDDNS, each with
List,Get,Create,UpdateandDelete;UpdatePasswordwhere the
object has a password. DNSRecord.Deletable,MailForward.SpamFiltersand
MailForward.InProgress.kasapitest.Server.OTPmakes the fake server require a one-time PIN;
Server.SessionLifetimerecords the requested session lifetime.
CLI:
- Verbs
createandupdatefor every resource that has them;update
changes only the flags that are given.kascli api-resourceslists the
verbs per resource. - Resources
ftpusers,databases,cronjobs,ddnsusers,mailfilters
andtls.get domainsandget subdomainsshow redirect, PHP version
and TLS state in-o wide;get mailaccounts -o wideshows state, allowed
clients and filters. - Passwords are read from the terminal or, with
--password-stdin, from
stdin. No command takes one as a flag value. --otp,KAS_OTPandconfig set-context --two-factorfor accounts with
two-factor authentication.
Changed:
- Update methods treat the fault
nothing_to_doas success. KAS sends it
when an update matches the current state; returning it as an error made
every idempotent caller handle it. This covers the existingDNS.Update,
Mail.Update*,Mail.UpdateForwardandSubdomains.UpdatePath. Getmethods filter on the server (record_id,domain_name,
subdomain_name,mail_login,mail_forward) instead of reading the full
list. They still match the entry they asked for, so a response that
ignores the filter cannot return the wrong object.- List methods treat the fault
empty_listas an empty result. Subdomains.UpdatePathandSubdomains.Deleterecognize the API's
subdomain_doenst_existasErrNotFound.SessionLifetimeis capped at 30000 seconds, the documented maximum,
instead of 3600. The default stays 1800.kascli delete domainanswers "cannot be deleted" instead of "read-only":
domains now haveupdate.
Dependencies:
github.com/spf13/pflag1.0.10, now a direct dependency ofcmd/kascli.- Renovate proposes upgrades of the
godirective, gated by approval in the
Dependency Dashboard. Its default is not to propose them.
What's Changed
- fix(deps): update module golang.org/x/term to v0.45.0 by @renovate[bot] in #18
- chore(deps): update actions/setup-go action to v7 by @renovate[bot] in #19
- chore(deps): update golangci/golangci-lint-action digest to ba0d7d2 by @renovate[bot] in #15
- chore(deps): update goreleaser/goreleaser-action digest to f06c13b by @renovate[bot] in #16
- chore(deps): pin actions/checkout action to 3d3c42e by @renovate[bot] in #20
- chore(deps): update actions/checkout digest to 3d3c42e by @renovate[bot] in #17
- fix(deps): update module golang.org/x/term to v0.46.0 by @renovate[bot] in #22
- chore(deps): pin github/codeql-action action to 2892aa5 by @renovate[bot] in #21
Full Changelog: v0.2.0...v0.3.0