diff --git a/services/rds/drivers/RdsCommon.py b/services/rds/drivers/RdsCommon.py index 78e9b57..dfc6141 100644 --- a/services/rds/drivers/RdsCommon.py +++ b/services/rds/drivers/RdsCommon.py @@ -18,6 +18,7 @@ def __init__(self, db, rdsClient, ctClient, cwClient): self.rdsClient = rdsClient self.cwClient = cwClient self.ctClient = ctClient + self.certInfo = None self.__configPrefix = 'rds::' + db['Engine'] + '::' + db['EngineVersion'] + '::' self.isCluster = True @@ -42,6 +43,10 @@ def getCAInfo(self): if self.isCluster == True: return + if not 'CACertificateIdentifier'in self.db: + _warn("Unable to locate CACertificateIdentifier") + return + ca = self.db['CACertificateIdentifier'] k = 'RDSCaInfo::' + ca @@ -452,6 +457,9 @@ def _checkOldSnapshots(self): self.results['ManualSnapshotTooOld'] = [-1, days] def _checkCAExpiry(self): + if self.certInfo == None: + return + if self.isCluster == False and self.certInfo['isExpireIn365days'] == True: exp = self.certInfo['ValidTill'].strftime("%Y-%m-%d") self.results['CACertExpiringIn365days'] = [-1, "Expired on {}, ({} days left)".format(exp, self.certInfo['expiredInDays'])]