bluecat

package module
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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}",
				"deploy_delay": "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
		deploy_delay 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
		deploy_delay 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): Accepted but not currently applied to zone lookups. If a zone name matches more than one zone, the lookup fails with an ambiguity error instead of picking one
  • view_name (optional): Limits zone lookups to one Bluecat DNS view. Set it if the same zone exists in more than one view
  • deploy_delay (optional): How long to wait after the last record write before one QuickDeploy is sent for the zone, so concurrent challenges share a deploy. Default 5s. -1 is a legacy alias for disable_deploy
  • max_deploy_delay (optional): Upper bound on how long debouncing can postpone a deploy during a steady stream of writes. Default is four times deploy_delay or 30s, whichever is larger
  • disable_deploy (optional, no value): Never QuickDeploy. Records are written to Bluecat but not pushed to the DNS servers

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 accepted for compatibility but not currently
	// applied to zone lookups by libdns/bluecat. A zone name that matches
	// more than one zone fails with an ambiguity error instead of guessing.
	ConfigurationName string `json:"configuration_name,omitempty"`
	// ViewName limits zone lookups to one DNS view (optional)
	ViewName string `json:"view_name,omitempty"`
	// DeployDelay controls how long to wait after the last DNS record write
	// before issuing a QuickDeploy to Bluecat. Writes are debounced per zone,
	// so concurrent ACME DNS-01 challenges collapse into a single deploy.
	//
	// Accepts a Go duration string, e.g. "5s", "30s". Defaults to 5 seconds
	// when unset. A negative value ("-1" in the Caddyfile) is a legacy alias
	// for DisableDeploy.
	DeployDelay caddy.Duration `json:"deploy_delay,omitempty"`
	// MaxDeployDelay caps how long debouncing can postpone a deploy, so a
	// steady stream of writes during bulk issuance can't delay it forever.
	// Defaults to four times DeployDelay or 30 seconds, whichever is larger.
	MaxDeployDelay caddy.Duration `json:"max_deploy_delay,omitempty"`
	// DisableDeploy suppresses automatic deployment entirely. Records are
	// written to Bluecat but not pushed to the DNS servers.
	DisableDeploy bool `json:"disable_deploy,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
    deploy_delay <duration>    // optional, e.g. "5s" (default), "30s"
    max_deploy_delay <duration> // optional, default max(4*deploy_delay, 30s)
    disable_deploy             // optional, never QuickDeploy
}

Jump to

Keyboard shortcuts

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