Relyra.Security.CertificateExpiry (relyra v1.1.0)

Copy Markdown View Source

Batch traversal function to check for expiring SAML certificates.

Provides a pure function check_all/2 that adopters can hook into their own schedulers. Queries active/next certificates on enabled connections that are approaching their not_after threshold.

Summary

Functions

Checks for expiring certificates and emits standard :telemetry events.

Functions

check_all(repo, opts \\ [])

@spec check_all(
  module(),
  keyword()
) :: {:ok, %{optional(binary()) => :ok}} | {:error, Relyra.Error.t()}

Checks for expiring certificates and emits standard :telemetry events.

opts:

  • :days_to_expiry — default 30. Certificates expiring within this many days are flagged.

Returns {:ok, %{certificate_id => :ok}} for matching certificates.