final class DnsSecApiProvider implements DnssecProviderInterface (View source)

DnssecProviderInterface that manages zone keys, DS/DNSKEY records and rectification through the PowerDNS API.

Methods

__construct(PowerdnsApiClient $client, LoggerInterface $logger, DnssecDataTransformer $transformer, string $clientIp, string $userLogin)

No description

bool
rectifyZone(string $zoneName)

No description

bool
secureZone(string $zoneName)

No description

bool
unsecureZone(string $zoneName)

No description

bool
isZoneSecured(string $zoneName, $config)

No description

bool|null
fetchZoneSecured(string $zoneName)

Whether the zone is signed, or null when PowerDNS could not be asked.

bool
isZonePresigned(string $zoneName)

Whether the zone carries the PRESIGNED metadata, meaning it was signed at the primary server and DNSSEC cannot be managed locally.

array
getDsRecords(string $zoneName)

No description

array
getDnsKeyRecords(string $zoneName)

No description

bool
activateZoneKey(string $zoneName, int $keyId)

No description

bool
deactivateZoneKey(string $zoneName, int $keyId)

No description

array
getKeys(string $zoneName)

No description

bool
removeZoneKey(string $zoneName, int $keyId)

No description

array|null
fetchZoneKeys(string $zoneName)

The zone's keys, telling a server that could not be asked apart from a zone without keys.

CryptoKey|null
createZoneKey(string $zoneName, string $keyType, int $keySize, string $algorithm, bool $active)

Create a key and return it as the server created it, or null when it was refused or could not be asked.

bool
isDnssecEnabled()

No description

int|null
getEditedSerial(string $zoneName)

Serial as served by PowerDNS with SOA-EDIT applied (the "signed" serial), or null when the server does not expose it or the zone cannot be read.

CryptoKey|DnssecKeyOutcome
importZoneKeyFromPrivateKey(string $zoneName, string $keyType, string $privateKey, bool $active)

Create a key from an existing ISC/BIND private key ("Private-key-format: v1.x") and return it as the server created it. The server derives algorithm and size from the key.

string|null
exportZonePrivateKey(string $zoneName, int $keyId)

Export the private key of an existing cryptokey in the ISC/BIND format PowerDNS stores it in, or null when the key cannot be read.

Details

__construct(PowerdnsApiClient $client, LoggerInterface $logger, DnssecDataTransformer $transformer, string $clientIp, string $userLogin)

No description

Parameters

PowerdnsApiClient $client
LoggerInterface $logger
DnssecDataTransformer $transformer
string $clientIp
string $userLogin

bool rectifyZone(string $zoneName)

No description

Parameters

string $zoneName

Return Value

bool

bool secureZone(string $zoneName)

No description

Parameters

string $zoneName

Return Value

bool

bool unsecureZone(string $zoneName)

No description

Parameters

string $zoneName

Return Value

bool

bool isZoneSecured(string $zoneName, $config)

No description

Parameters

string $zoneName
$config

Return Value

bool

bool|null fetchZoneSecured(string $zoneName)

Whether the zone is signed, or null when PowerDNS could not be asked.

Parameters

string $zoneName

Return Value

bool|null

bool isZonePresigned(string $zoneName)

Whether the zone carries the PRESIGNED metadata, meaning it was signed at the primary server and DNSSEC cannot be managed locally.

Parameters

string $zoneName

Return Value

bool

array getDsRecords(string $zoneName)

No description

Parameters

string $zoneName

Return Value

array

array getDnsKeyRecords(string $zoneName)

No description

Parameters

string $zoneName

Return Value

array

bool activateZoneKey(string $zoneName, int $keyId)

No description

Parameters

string $zoneName
int $keyId

Return Value

bool

bool deactivateZoneKey(string $zoneName, int $keyId)

No description

Parameters

string $zoneName
int $keyId

Return Value

bool

array getKeys(string $zoneName)

No description

Parameters

string $zoneName

Return Value

array

bool removeZoneKey(string $zoneName, int $keyId)

No description

Parameters

string $zoneName
int $keyId

Return Value

bool

array|null fetchZoneKeys(string $zoneName)

The zone's keys, telling a server that could not be asked apart from a zone without keys.

Parameters

string $zoneName

Return Value

array|null

Null when the server could not be asked

CryptoKey|null createZoneKey(string $zoneName, string $keyType, int $keySize, string $algorithm, bool $active)

Create a key and return it as the server created it, or null when it was refused or could not be asked.

Parameters

string $zoneName
string $keyType
int $keySize
string $algorithm
bool $active

Return Value

CryptoKey|null

bool isDnssecEnabled()

No description

Return Value

bool

int|null getEditedSerial(string $zoneName)

Serial as served by PowerDNS with SOA-EDIT applied (the "signed" serial), or null when the server does not expose it or the zone cannot be read.

Parameters

string $zoneName

Return Value

int|null

CryptoKey|DnssecKeyOutcome importZoneKeyFromPrivateKey(string $zoneName, string $keyType, string $privateKey, bool $active)

Create a key from an existing ISC/BIND private key ("Private-key-format: v1.x") and return it as the server created it. The server derives algorithm and size from the key.

Parameters

string $zoneName
string $keyType
string $privateKey
bool $active

Return Value

CryptoKey|DnssecKeyOutcome

The created key, KEY_REJECTED when the server could not use the key, or FAILED

string|null exportZonePrivateKey(string $zoneName, int $keyId)

Export the private key of an existing cryptokey in the ISC/BIND format PowerDNS stores it in, or null when the key cannot be read.

Parameters

string $zoneName
int $keyId

Return Value

string|null