The first step is to set the JAAS (Java Authentication and Authorization Service) configuration. You have these two options to do this: