bluecat

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2026 License: MIT Imports: 9 Imported by: 0

README

Bluecat module for Caddy

This package contains a DNS provider module for Caddy. It can be used to manage DNS records with Bluecat Address Manager.

Caddy module name

dns.providers.bluecat

Config examples

To use this module for the ACME DNS challenge, configure the ACME issuer in your Caddy JSON like so:

{
	"module": "acme",
	"challenges": {
		"dns": {
			"provider": {
				"name": "bluecat",
				"server_url": "{env.BLUECAT_SERVER_URL}",
				"username": "{env.BLUECAT_USERNAME}",
				"password": "{env.BLUECAT_PASSWORD}",
				"configuration_name": "{env.BLUECAT_CONFIGURATION_NAME}",
				"view_name": "{env.BLUECAT_VIEW_NAME}",
				"deployment_batch_window": "5s"
			}
		}
	}
}

or with the Caddyfile:

# globally
{
	acme_dns bluecat {
		server_url {env.BLUECAT_SERVER_URL}
		username {env.BLUECAT_USERNAME}
		password {env.BLUECAT_PASSWORD}
		configuration_name {env.BLUECAT_CONFIGURATION_NAME}  # optional
		view_name {env.BLUECAT_VIEW_NAME}                    # optional
		deployment_batch_window 5s                           # optional
	}
}
# one site
tls {
	# Needed for spit-horizon DNS
	resolvers 1.1.1.1 
	dns bluecat {
		server_url {env.BLUECAT_SERVER_URL}
		username {env.BLUECAT_USERNAME}
		password {env.BLUECAT_PASSWORD}
		configuration_name {env.BLUECAT_CONFIGURATION_NAME}  # optional
		view_name {env.BLUECAT_VIEW_NAME}                    # optional
		deployment_batch_window 5s                           # optional
	}
}

Configuration Fields

  • server_url (required): The base URL of your Bluecat Address Manager server (e.g., https://bluecat.example.com)
  • username (required): Username for authenticating with the Bluecat API
  • password (required): Password for authenticating with the Bluecat API
  • configuration_name (optional): Bluecat configuration name (defaults to first available)
  • view_name (optional): Bluecat view name (defaults to first available)
  • deployment_batch_window (optional): Caddy duration string used to batch same-zone quick deploys before one Bluecat deploy is sent, for example 5s

If you'd rather directly add the config items you can forgo the .env file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// ServerURL is the URL of the Bluecat Address Manager server
	ServerURL string `json:"server_url,omitempty"`
	// Username is the API username
	Username string `json:"username,omitempty"`
	// Password is the API password
	Password string `json:"password,omitempty"`
	// ConfigurationName is the name of the configuration to use
	ConfigurationName string `json:"configuration_name,omitempty"`
	// ViewName is the name of the view to use
	ViewName string `json:"view_name,omitempty"`
	// DeploymentBatchWindow coalesces same-zone quick deploys using a Caddy duration string
	DeploymentBatchWindow string `json:"deployment_batch_window,omitempty"`
	// contains filtered or unexported fields
}

Provider lets Caddy read and manipulate DNS records hosted by Bluecat Address Manager.

func (*Provider) AppendRecords

func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)

AppendRecords adds records to the zone. It returns the records that were added.

func (Provider) CaddyModule

func (Provider) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Provider) DeleteRecords

func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)

DeleteRecords deletes the specified records from the zone.

func (*Provider) GetRecords

func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)

GetRecords lists all the records in the zone.

func (*Provider) Provision

func (p *Provider) Provision(ctx caddy.Context) error

Provision sets up the module. Implements caddy.Provisioner.

func (*Provider) SetRecords

func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)

SetRecords sets the records in the zone, either by updating existing records or creating new ones.

func (*Provider) UnmarshalCaddyfile

func (p *Provider) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile sets up the DNS provider from Caddyfile tokens. Syntax:

bluecat {
    server_url <url>
    username <username>
    password <password>
    configuration_name <name>  // optional
    view_name <name>           // optional
    deployment_batch_window <duration> // optional
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL