Scala security framework