security middleware stub