Linode DNS as the default provider throws errors

## Description

Setting Linode DNS at the default provider throws errors in the panel when assigned.

Steps to Reproduce

  1. Created a Personal Access Token through Linode
  2. Ran the commands from the apiscp-dns-linode page
cpcmd scope:set dns.default-provider linode
cpcmd scope:set dns.default-provider-key 'linode_access_token_here'
  1. Restarted ApisCP
  2. Went to Nexus → Selected a domain → set provider under DNS (keyring was auto filled)
  3. Upon saving, I received the errors found under Actual Behavior below.

## Expected Behavior
Linode DNS to work

## Actual Behavior

Action failed

EditDomain command: /usr/local/apnscp/bin/EditDomain --fd=%d --output=json  -c 'dns,provider'='linode' %s
Util_Process::formatDataCallProc(): EditDomain: ERROR  : Opcenter\Account\Edit::installServices(): failed verification on service `dns': Opcenter\Dns\Providers\Linode\Validator::keyValid(): Linode key validation failed: Invalid Token
         0. Error_Reporter::add_error("%(provider)s key validation failed: %(reason)s", [[provider:"Linode", reason:"Invalid Token"]])
            [/usr/local/apnscp/lib/log_wrapper.php:72]
         1. error("%(provider)s key validation failed: %(reason)s", [provider:"Linode", reason:"Invalid Token"])
            [/usr/local/apnscp/lib/Opcenter/Dns/Providers/Linode/Validator.php:37]
         2. Opcenter\Dns\Providers\Linode\Validator::keyValid("5f11cfcd2__removed__7867ea5f")
            [/usr/local/apnscp/lib/Opcenter/Dns/Providers/Linode/Validator.php:21]
         3. Opcenter\Dns\Providers\Linode\Validator->valid(Opcenter\Service\ConfigurationContext, "5f11cfcd293395__removed__84477867ea5f")
            [/usr/local/apnscp/lib/Opcenter/Service/Validators/Dns/Key.php:62]
         4. Opcenter\Service\Validators\Dns\Key->valid("5f11cfcd2933__removed__477867ea5f")
            [/usr/local/apnscp/lib/Opcenter/Service/ConfigurationContext.php:567]
         5. Opcenter\Service\ConfigurationContext->check("key", "keyring:NnNjNWc3NU__removed__afrqWijyg==")
            [/usr/local/apnscp/lib/Opcenter/Service/ConfigurationContext.php:164]
         6. Opcenter\Service\ConfigurationContext->preflight()
            [/usr/local/apnscp/lib/Opcenter/SiteConfiguration.php:729]
         7. Opcenter\SiteConfiguration->verify("dns", Opcenter\Service\ConfigurationContext)
            [/usr/local/apnscp/lib/Opcenter/SiteConfiguration.php:648]
         8. Opcenter\SiteConfiguration->verifyAll()
            [/usr/local/apnscp/lib/Opcenter/Account/Edit.php:120]
         9. Opcenter\Account\Edit->installServices()
            [/usr/local/apnscp/lib/Opcenter/Account/Edit.php:88]
        10. Opcenter\Account\Edit->exec()
            [/usr/local/apnscp/bin/EditDomain:119]

## Environment
ApisCP version:

revision: a4a0443d721dbd32897351e43e392bc1a8e1a402
timestamp: 1723838990
ver_maj: 3
ver_min: 2
ver_patch: 44
ver_pre: 10-ga4a0443d7
dirty: false
debug: false

Operating System:

4.18.0-553.16.1.el8_10.x86_64

Additional relevant information

All defaults that were installed with ApisCP

PostGRE 15.8
MariaDB 10.11.9
PHP 8.2.22

Thanks for the bug report. Fixed in edge. Run upcp to bring the codebase current.

1 Like

Thank you for the quick fix. Just tested it out and seems to be working well now.