icingaweb2-module-x509 icon indicating copy to clipboard operation
icingaweb2-module-x509 copied to clipboard

Make use of ipl/orm

Open yhabteab opened this issue 2 years ago • 2 comments

yhabteab avatar Sep 29 '22 14:09 yhabteab

Blocked by

  • ~~https://github.com/Icinga/ipl-orm/pull/81~~
  • https://github.com/Icinga/ipl-web/pull/100

yhabteab avatar Oct 18 '22 12:10 yhabteab

Tests

CLI:

root@29b932b60d5f:/# icingacli x509 check --ip 10.211.55.31 --port 443
OK - Icinga Web 2 expires in 366 days|'Icinga Web 2'=31622836s;8553600:;3456000:;0;34214400
root@29b932b60d5f:/# icingacli x509 check --ip 10.211.55.31 --port 5665
OK - docker-master expires in 390 days|'docker-master'=33723335s;8557200:;3459600:;0;34300800
root@29b932b60d5f:/# icingacli x509 check --ip 10.211.55.31 --port 6379
OK - Icinga DB Redis expires in 366 days|'Icinga DB Redis'=31623859s;8553600:;3456000:;0;34214400

Director hooks 🪝: Bildschirmfoto 2022-10-20 um 10 10 12

Certificate Usages: Bildschirmfoto 2022-10-20 um 10 12 04

Host Details: Bildschirmfoto 2022-10-20 um 10 13 32

Certificate Overview: Bildschirmfoto 2022-10-20 um 10 15 17

Certificate Details: Bildschirmfoto 2022-10-20 um 10 16 21

yhabteab avatar Oct 20 '22 08:10 yhabteab

Filtering for something like this icingaweb2/x509/certificates?duration=34300800&ca=n doesn't work anymore with the new bool cast behaviour.

Expected bool, got string instead

#0 /usr/local/src/ipl-orm/src/Contract/PropertyBehavior.php(80): ipl\Orm\Behavior\BoolCast->toDb(String, String, Integer)
#1 /usr/local/src/ipl-orm/src/Behaviors.php(137): ipl\Orm\Contract\PropertyBehavior->persistProperty(String, String)
#2 /usr/local/src/ipl-orm/src/Compat/FilterProcessor.php(115): ipl\Orm\Behaviors->persistProperty(String, String)
#3 /usr/local/src/ipl-orm/src/Compat/FilterProcessor.php(148): ipl\Orm\Compat\FilterProcessor->requireAndResolveFilterColumns(Object(ipl\Stdlib\Filter\Equal), Object(ipl\Orm\Query), NULL)
...

yhabteab avatar Nov 17 '22 08:11 yhabteab

Bildschirm­foto 2022-11-17 um 09 54 57

yhabteab avatar Nov 17 '22 08:11 yhabteab

@yhabteab Please rebase and re-request review.

lippserd avatar Nov 29 '22 08:11 lippserd