Skip to content

Latest commit

 

History

History

ssl-server-test

SslServerTest

Test a server/host for SSL/TLS on schedule and get notified when the overall rating is not satisfactory.

This construct uses the Qualys SSL Labs API.

Usage

Define a SslServerTest:

import { Stack, StackProps } from 'aws-cdk-lib';
import { SslServerTest } from 'cloudstructs';
import { Construct } from 'constructs';

export class MyStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    new SslServerTest(this, 'TestMyHost', {
      host: 'my.host'
    });
  }
}

This will create a state machine that will run a SSL server test everyday. By default, a SNS topic is created and a notification is sent to this topic if the grade of the test is below A+. The content of the notification is the test result returned by the API.

const myTest = new SslServerTest(this, 'MyTest', {
  host: 'my.host',
});

myTest.alarmTopic.addSubscription(/* your subscription here */)

Use the minimumGrade, alarmTopic or schedule props to customize the behavior of the construct.