indygriffiths / locksmith Goto Github PK
View Code? Open in Web Editor NEWTool for monitoring SSL certificates
License: MIT License
Tool for monitoring SSL certificates
License: MIT License
When domains are imported for the first time from CloudFlare or Incapsula, any checks that fail are sent to Slack. Ideally these shouldn't be sent, and Slack messages should only be sent when a formerly-good check is now failing
ERROR [User Error]: Uncaught SS_DatabaseException: Couldn't run query:
SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
FROM "Domain"
LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID"
Unknown column 'DataObject.CurrentCertificateID' in 'on clause'
IN POST /admin/domains/Domain/EditForm/field/Domain
Line 55 in /Users/indygriffiths/Dev/PHP7/locksmith/framework/model/connect/DBConnector.php
Source
======
46: if (!empty($sql)) {
47: $formatter = new SQLFormatter();
48: $formattedSQL = $formatter->formatPlain($sql);
49: $msg = "Couldn't run query:\n\n{$formattedSQL}\n\n{$msg}";
50: }
51:
52: if($errorLevel === E_USER_ERROR) {
53: // Treating errors as exceptions better allows for responding to errors
54: // in code, such as credential checking during installation
* 55: throw new SS_DatabaseException($msg, 0, null, $sql, $parameters);
56: } else {
57: user_error($msg, $errorLevel);
58: }
59: }
60:
61: /**
Trace
=====
DBConnector->databaseError(Couldn't run query:
SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
FROM "Domain"
LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID"
Unknown column 'DataObject.CurrentCertificateID' in 'on clause',256,SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID")
MySQLiConnector.php:155
MySQLiConnector->query(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID",256)
MySQLiConnector.php:243
MySQLiConnector->preparedQuery(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID",Array,256)
Database.php:143
SS_Database->{closure}(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID")
Database.php:193
SS_Database->benchmarkQuery(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID",Closure,Array)
Database.php:145
SS_Database->preparedQuery(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID",Array,256)
DB.php:365
DB::prepared_query(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID",Array)
SQLExpression.php:121
SQLExpression->execute()
SQLSelect.php:599
SQLSelect->count(DISTINCT "Domain"."ID")
DataQuery.php:399
DataQuery->count()
DataList.php:769
DataList->count()
GridFieldPaginator.php:139
GridFieldPaginator->getManipulatedData(GridField,DataList)
GridField.php:257
GridField->getManipulatedList()
GridField.php:300
GridField->FieldHolder()
GridField.php:899
GridField->gridFieldAlterAction(Array,CMSForm,SS_HTTPRequest)
GridField.php:118
GridField->index(SS_HTTPRequest)
RequestHandler.php:296
RequestHandler->handleAction(SS_HTTPRequest,index)
RequestHandler.php:208
RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
GridField.php:1030
GridField->handleRequest(SS_HTTPRequest,DataModel)
RequestHandler.php:230
RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
RequestHandler.php:230
RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
Controller.php:151
Controller->handleRequest(SS_HTTPRequest,DataModel)
LeftAndMain.php:472
LeftAndMain->handleRequest(SS_HTTPRequest,DataModel)
AdminRootController.php:92
AdminRootController->handleRequest(SS_HTTPRequest,DataModel)
Director.php:385
Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:149
Director::direct(/admin/domains/Domain/EditForm/field/Domain,DataModel)
main.php:194
One Incapsula account suddenly isn't going to cut it. Support needs to be added to ensure that domains from any sub-accounts (like Premium WAF customers) are covered.
The Slack notifier uses the alert days defined in the OpsGenie tab. Ideally these should be abstracted into their own tab in the CMS settings
Like the OpsGenie alert, the ability to create a Freshdesk ticket when a certificate is approaching expiry would be a useful feature. This would involve the tool creating a ticket, and then bumping up the priority as the expiration date gets closer. Once a new certificate is installed, the ticket should be closed.
Once the ticket reaches P1 status and the ticket is marked as urgent, the ticket status should also be changed to Incident.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.