libertymutual / ssh-key-enforcer-stash

Layers additional controls over Bitbucket's SSH key features that enforce the stronger controls required in an enterprise environment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor use of UserService.preAuthenticate

eddiewebb opened this issue · comments

Currently use preAuthenticate to allow the call to sshKeyService to succeed when it calls authenticationContext.getCurrentUser(). But this creates admin access for the life of the thread, where as SecurityService provides more control.

Since this is called via a scheduled job, it may be OK,but the use of either should be move to the job runner, and not the service layer (which can also be used by a service call to APIs)