Fix #87: security helper converted into component and improved

Fix #87: security helper improvement

Migrated from #4052
5.5.0 is a bit too much to require currently. All the other framework parts are OK with 5.4.