All Projects → mercari → certificate-expiry-monitor-controller

mercari / certificate-expiry-monitor-controller

Licence: MIT license
Certificate Expiry Monitor Controller monitors the expiration of TLS certificates used in Ingress.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to certificate-expiry-monitor-controller

cassler
🕷️ 🕷️ 🕷️ Validate SSL Certificates around web
Stars: ✭ 55 (-51.75%)
Mutual labels:  tls, certificates
Ssl Proxy
🔒 Simple zero-config SSL reverse proxy with real autogenerated certificates (LetsEncrypt, self-signed, provided)
Stars: ✭ 427 (+274.56%)
Mutual labels:  tls, certificates
ssl-cert-check
Check expiry dates of local and remote SSL certificates
Stars: ✭ 28 (-75.44%)
Mutual labels:  tls, certificates
Certificates
🛡️ A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH.
Stars: ✭ 3,693 (+3139.47%)
Mutual labels:  tls, certificates
httpsbook
《深入浅出HTTPS:从原理到实战》代码示例、勘误、反馈、讨论
Stars: ✭ 77 (-32.46%)
Mutual labels:  tls, certificates
acmed
ACME (RFC 8555) client daemon
Stars: ✭ 121 (+6.14%)
Mutual labels:  tls, certificates
Acme Client
Let's Encrypt / ACME client written in PHP for the CLI.
Stars: ✭ 337 (+195.61%)
Mutual labels:  tls, certificates
gotway
☸️ Cloud native API Gateway powered with in-redis cache
Stars: ✭ 71 (-37.72%)
Mutual labels:  ingress, kubernetes-controller
Terraform Aws Alb
Terraform module to provision a standard ALB for HTTP/HTTP traffic
Stars: ✭ 53 (-53.51%)
Mutual labels:  tls, ingress
Mkcert
A simple zero-config tool to make locally trusted development certificates with any names you'd like.
Stars: ✭ 33,022 (+28866.67%)
Mutual labels:  tls, certificates
Devcert
Local HTTPS development made easy
Stars: ✭ 655 (+474.56%)
Mutual labels:  tls, certificates
K8s Bigip Ctlr
Repository for F5 Container Ingress Services for Kubernetes & OpenShift.
Stars: ✭ 204 (+78.95%)
Mutual labels:  tls, ingress
Voyager
🚀 Secure HAProxy Ingress Controller for Kubernetes
Stars: ✭ 1,276 (+1019.3%)
Mutual labels:  tls, ingress
vault-pki-monitor-venafi
Venafi PKI Monitoring Secrets Engine for HashiCorp Vault that enforces security policy and provides certificate visiblity to the enterprise.
Stars: ✭ 18 (-84.21%)
Mutual labels:  tls, certificates
OPR-tools-CN
A plugin for ingress OPR page
Stars: ✭ 43 (-62.28%)
Mutual labels:  ingress
trafficserver-ingress-controller
Apache Traffic Server Ingress Controller for Kubernetes
Stars: ✭ 29 (-74.56%)
Mutual labels:  ingress
boost-wintls
Native Windows TLS stream wrapper for use with boost::asio
Stars: ✭ 24 (-78.95%)
Mutual labels:  tls
golang-crypto-tls
Fork of golang 1.8.1 crypto/tls to add DHE, PSK, DHE_PSK, RSA_PSK, and DH_anon ciphersuites
Stars: ✭ 31 (-72.81%)
Mutual labels:  tls
ptw
Pooling TLS Wrapper
Stars: ✭ 20 (-82.46%)
Mutual labels:  tls
sieve-connect
A client for the MANAGESIEVE Protocol
Stars: ✭ 60 (-47.37%)
Mutual labels:  tls

Certificate Expiry Monitor Controller

CircleCI

Certificate Expiry Monitor Controller monitors the expiration of TLS certificates used in Ingress.

Installation

You can apply to your cluster using the following example.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: certificate-expiry-monitor-controller
  namespace: kube-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app: certificate-expiry-monitor-controller
  template:
    metadata:
      labels:
        app: certificate-expiry-monitor-controller
    spec:
      containers:
        - name: certificate-expiry-monitor-controller
          image: mercari/certificate-expiry-monitor-controller:<VERSION>

Once you apply above, controller will start running inside the cluster and print monitoring results to pod stderr.

Usage

You can set INTERVAL and THRESHOLD as configuration. Then, the controller monitors the expiration of certificate for each set interval. If the expiration is expired or the expiration reaches the threshold, the controller sends the alert using the configured notifier.

Notifiers

In latest version, the contoller supports following notifiers.

  • slack: Send information to SLACK_CHANNEL in your workspace using SLACK_TOKEN.
  • log: Print information to stderr.

You can select which notifier to send an alert by configuration. If you not select notifiers, the controller automatically selects log.

Configurations

You can set following configurations by environment variables.

ENV Required Default Example Description
LOG_LEVEL false INFO DEBUG, error Configuration of log level for controller's logger.
KUBE_CONFIG_PATH false ~/.kube/config ~/.kube/config Kubernetes cluster config (If not configured, controller reads local cluster config).
INTERVAL false 12h 1m, 24h, Controller verifies expiration of certificate in Ingress at this interval of time. This value must be between 1m and 24h.
THRESHOLD false 336h (2 weeks) 24h, 100h, 336h When verifing expiration, controller compares expiration of certificate and time.Now() - THRESHOLD to detect issue. This value must be greater than or equal to 24h.
NOTIFIERS false log slack,log List of alert notifiers.
SLACK_TOKEN false - - Slack API token.
SLACK_CHANNEL false - random Slack channel to send expiration alert (without #).

Synthetics test management

You can use certificate-expiry-monitor-controller to generate and manage synthetics tests. It is useful if you want to leverage an external provider synthetics to extend the controller's monitoring capabilities. Currently, only Datadog is supported.

This functionality is disabled by default and can be toggled on by using the SYNTHETICS_ENABLED environment variable.

Supported features:

  • Adding synthetics tests in Datadog
    • Using Ingress endpoint list fetched from Kubernetes API
    • Using a predefined environment variable with a list of endpoints to manage
  • Deleting synthetics tests in Datadog when not matching existing endpoints

Synthetics tests have many parts configurable by environment variables:

  • Alert message body
  • Check frequency
  • Tags
  • Default tag

Notice: To avoid unwanted destructive behavior with existing synthetics tests, a default tag is used as a safeguard. Only synthetics tests having this default tag will be handled by the controller.

Configuration

You can set following configurations for the synthetics test manager by using environment variables.

ENV Required Default Example Description
SYNTHETICS_ENABLED false false false, true Feature-flag to enable synthetics tests management. Disabled by default.
DATADOG_API_KEY false - - Datadog API key to manage synthetics tests
DATADOG_APPLICATION_KEY false - - Datadog application key to manage synthetics tests
SYNTHETICS_ALERT_MESSAGE false "" "{{#is_alert}}\n\nCertificate alert, either the expiration data is under XX days or a self-signed certificate.\n\n{{/is_alert}}\n\n @slack-jp-ms-platform-alert" Alert message for synthetics tests with failing assertion
SYNTHETICS_CHECK_INTERVAL false 900 60, 300, 900, 1800, 3600, 21600, 43200, 86400, 604800 The interval in seconds at which the synthetics test checks will run. Lowest value is 60 seconds (1min) and highest value is 604800 seconds (1 week).
SYNTHETICS_TAGS false "" foo:bar, "foo:bar, bar:foo" List of tags to attribute to synthetics tests, as key:value format string separated by comma.
SYNTHETICS_DEFAULT_TAG false managed-by-cert-expiry-mon my-control-tag Default tag used to control synthetics tests managed by certificate-expiry-monitor-controller.
SYNTHETICS_DEFAULT_LOCATIONS false "aws:ap-northeast-1" "aws:ap-northeast-1,aws:ap-east-1" List of default locations to run synthetic tests from. Available locations are retrievable here
SYNTHETICS_ADDITIONAL_ENDPOINTS false "" "example.com,example.com:8443,example2.com:8443" List of endpoints to add to the synthetics test controller. Useful to monitor services not served by an Ingress. Uses the format endpoint:port,endpoint2:port2, port is optional, 443 is implied if not set.

Future works

  • Support PagerDuty, Datadog and other services as a notifier.
  • Support non-default port number. Current implementation only supports 443.
  • Support configurable alert template.

Committers

Takamasa SAICHI (@Everysick) Raphael FRAYSSE (@lainra)

Contribution

Please read the CLA below carefully before submitting your contribution.

https://www.mercari.com/cla/

LICENSE

Copyright 2018 Mercari, Inc.

Licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].