You'll need to depend on the x-pack security jar as a provided dependency, and specify in your plugin descriptor that you are extending x-pack-security. Have you looked at the example api security extension?
1 Like