Documentation · Administration · Settings

Notifications

Settings → Notifications: the email server, whether owners are emailed about their own credentials, and email channels for organization-wide events.

Email

FieldExample
SMTP server and portsmtp.example.com, 587
SecuritySTARTTLS (usually 587) or TLS (usually 465). Unencrypted SMTP only to a relay whose host is in CREDVANE_ALLOWED_PRIVATE_HOSTS
Username and passwordIf the server needs them; the password goes to Credvane's own secret store and is never shown again
From address and name[email protected], Credvane. Set up SPF and DKIM for that domain, or mail lands in spam
Email people about their own credentials and exchange tokensOn by default

Send me a test email shows what the server answered. Leave the server empty to turn email off; notices still appear. Emails link into Credvane only when CREDVANE_PUBLIC_URL is set.

What is sent to whom

EventOwnerAdmins and channels
Credential expiring (14 and 3 days before)YesFor an identity's credential
Credential expired or rejectedYesFor an identity's credential
Credential degradedYesYes
Credential revoked at the sourceYesYes
A source's address changed, so people's credentials are held until they confirmYes, each person affectedYes, with the count
Exchange token expiringYesFor an identity's token
Admin API key expiringYes
Offboarding finishedYes, with what to revoke by hand
Leak reportedYesYes
Access review started, reminder, closedStarted and remindersStarted and closed
Audit stream failing for an hourYes

Each change is announced once. Notifications never contain a value, a fingerprint or a token.

Email channels

Add channel: a name, one address and its events. Use a team mailbox or list rather than one person's inbox, and a channel per team if teams want different events. The list shows when each last got an email, or why the last one failed. Failed emails are retried five times over about eight minutes, then an admin notice says email to that address is failing.

ChannelAddressEvents
Security team[email protected]All
Leak desk[email protected]Leak reported, credential revoked at the source
Platform on-call[email protected]Credential degraded, audit stream failing

Terraform

credvane_notification_settings and credvane_notification_channel. The SMTP password is write-only and ephemeral, so it never reaches Terraform state: pass it with TF_VAR_smtp_password.

variable "smtp_password" {
  type      = string
  sensitive = true
  ephemeral = true
}

resource "credvane_notification_settings" "this" {
  owner_emails             = true
  smtp_host                = "smtp.example.com"
  smtp_port                = 587
  smtp_security            = "STARTTLS"
  smtp_username            = "credvane"
  smtp_password_wo         = var.smtp_password
  smtp_password_wo_version = 1   # bump when the password changes
  from_address             = "[email protected]"
  from_name                = "Credvane"
}

# Every event, including ones later versions add.
data "credvane_notification_events" "all" {}

resource "credvane_notification_channel" "security" {
  name    = "Security team"
  address = "[email protected]"
  events  = data.credvane_notification_events.all.names
}

resource "credvane_notification_channel" "leaks" {
  name    = "Leak desk"
  address = "[email protected]"
  events  = ["LEAK_REPORTED", "CREDENTIAL_REVOKED_AT_SOURCE"]
}