Make security extension configurable

Fixes #5