Skip to content

DNS provider plugins ​

A DNS provider plugin lets n5i manage DNS records with a DNS provider. n5i uses it to issue certificates with ACME DNS challenges and to verify that users own a domain. It is declared with type: dns-provider.

How it works ​

  • GetRequiredSettings returns the providers the plugin supports, each with a name, an icon and the settings (for example an API token) users must enter in settings_v2.
  • GetIssuerConfig returns the configuration for a certificate issuer: data for the secret secret_name, and the ACME DNS solver configuration as JSON.
  • VerifyOwnership creates the TXT record txt_record for domain and reports whether it succeeded.

authentication contains the settings the user entered, JSON-encoded.

RPC interface ​

proto
syntax = "proto3";

package n5i_plugin;
import "common.proto";

message GetIssuerConfigRequest {
  // JSON-encoded user provided authentication data
  string authentication = 1;
  // Name of the secret data to be created
  string secret_name = 2;
  // User-chosen provider ID in case the plugin supports multiple providers
  string provider_id = 3;
  // The domain the user wants to add
  string domain = 4;
}

message IssuerConfig {
  // Data to put into the secret with the name secret_name
  map<string, bytes> secret_data = 1;
  string group_name = 2;
  string solver_name = 3;
  // JSON-encoded issuer config to put into the Issuer resource
  string issuer_config = 4;
}

message VerifyOwnershipRequest {
  // The domain to verify ownership for
  string domain = 1;
  // JSON-encoded user provided authentication data
  string authentication = 2;
  // The verification txt record
  string txt_record = 3;
  // User-chosen provider ID in case the plugin supports multiple providers
  string provider_id = 4;
}

message VerifyOwnershipResponse {
  bool success = 1;
}

enum DnsSettingType {
  option deprecated = true;
  STRING = 0;
  BOOLEAN = 1;
  NUMBER = 2;
  EMAIL = 3;
  URL = 4;
  PASSWORD = 5;
  SELECT = 6;
}

message DnsSettingOption {
  option deprecated = true;
  string value = 1;
  MultiLanguageItem display_name = 2;
}

message ProviderSetting {
  option deprecated = true;
  // Human-readable name of the setting
  MultiLanguageItem name = 1;
  // Description of the setting
  MultiLanguageItem description = 2;
  // Whether the setting is required
  bool required = 3;
  // Default value for the setting
  optional string default_value = 4;
  // Type of the setting (e.g., "string", "boolean", "number")
  DnsSettingType type = 5;
  repeated DnsSettingOption options = 6; // If the setting has predefined options
}

message ProviderSettings {
  // Human-readable name of the provider
  MultiLanguageItem name = 1;
  string icon = 2; // Icon URL
  map<string, ProviderSetting> settings = 3 [deprecated = true];
  map<string, Setting> settings_v2 = 4; // New generic settings map
}

message ProviderSettingsResponse {
  map<string, ProviderSettings> supported_providers = 1;
}

// A parser/runtime plugin adds a custom parser for app files
// It may also contain a custom runtime for the app and just proxy to it
service DnsProviderPlugin {
  rpc GetIssuerConfig(GetIssuerConfigRequest) returns (IssuerConfig);
  rpc VerifyOwnership(VerifyOwnershipRequest) returns (VerifyOwnershipResponse);
  rpc GetRequiredSettings(Empty) returns (ProviderSettingsResponse);
}

Free and open-source software under the GNU AGPL 3.0 or later.