Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 20:48
· 42 commits to main since this release
v0.3.0
df7c8a1

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. HostSettings carries document root, redirect status,
    PHP version and the active flag for domains and subdomains.
    Subdomains.CreateWithSettings, Subdomains.Update and Domains.Update
    send the set fields only. Subdomain and Domain report the same settings
    plus PHPDeprecated, InProgress and the TLS state. Subdomains.Create
    sends no PHP version, so the host gets the KAS default, which the API
    documents as 7.1 — CreateWithSettings chooses one.
  • TLS. TLS.Update installs a certificate and sets the HTTPS redirect
    and HSTS (update_ssl); TLS.Get reads 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.LetsEncrypt reports whether a host uses one.
  • Two-factor authentication. Config.OTP supplies the one-time PIN,
    sent as session_2fa on every session handshake.
  • Mail. UpdateResponder sets the autoresponder, with an optional time
    window. UpdateState, UpdateAllowNets and UpdateWebmailAutologin
    control activation, allowed clients and the panel's webmail login.
    AvailableFilters, SetFilters and DeleteFilters manage the standard
    filters. MailAccount reports all of it; CreateAccount sends an active
    responder and the allowed clients.
  • New services. FTP, Databases, Cronjobs and DDNS, each with
    List, Get, Create, Update and Delete; UpdatePassword where the
    object has a password.
  • DNSRecord.Deletable, MailForward.SpamFilters and
    MailForward.InProgress.
  • kasapitest.Server.OTP makes the fake server require a one-time PIN;
    Server.SessionLifetime records the requested session lifetime.

CLI:

  • Verbs create and update for every resource that has them; update
    changes only the flags that are given. kascli api-resources lists the
    verbs per resource.
  • Resources ftpusers, databases, cronjobs, ddnsusers, mailfilters
    and tls. get domains and get subdomains show redirect, PHP version
    and TLS state in -o wide; get mailaccounts -o wide shows 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_OTP and config set-context --two-factor for accounts with
    two-factor authentication.

Changed:

  • Update methods treat the fault nothing_to_do as 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 existing DNS.Update,
    Mail.Update*, Mail.UpdateForward and Subdomains.UpdatePath.
  • Get methods 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_list as an empty result.
  • Subdomains.UpdatePath and Subdomains.Delete recognize the API's
    subdomain_doenst_exist as ErrNotFound.
  • SessionLifetime is capped at 30000 seconds, the documented maximum,
    instead of 3600. The default stays 1800.
  • kascli delete domain answers "cannot be deleted" instead of "read-only":
    domains now have update.

Dependencies:

  • github.com/spf13/pflag 1.0.10, now a direct dependency of cmd/kascli.
  • Renovate proposes upgrades of the go directive, 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