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.
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', {
registrationEmail: 'jdoe@someorganizationemail.com',
host: 'my.host'
});
}
}This will create a durable Lambda function 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.
A free registration is required to use the the SSL Labs API.
const myTest = new SslServerTest(this, 'MyTest', {
registrationEmail: 'jdoe@someorganizationemail.com',
host: 'my.host',
});
myTest.alarmTopic.addSubscription(/* your subscription here */)Use the minimumGrade, alarmTopic or scheduleExpression props to customize the
behavior of the construct.