Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sdarlington/3975e867ed1b573a28189529027bd61a to your computer and use it in GitHub Desktop.
Save sdarlington/3975e867ed1b573a28189529027bd61a to your computer and use it in GitHub Desktop.
Pull credentials from environment variables rather than expecting them to be hard-coded in config file
import org.apache.ignite.plugin.security.{SecurityCredentials, SecurityCredentialsProvider}
class EnvironmentVariableSecurityCredentialsProvider extends SecurityCredentialsProvider {
override def credentials(): SecurityCredentials = new SecurityCredentials(sys.env("IGNITE_USERNAME"), sys.env("IGNITE_PASSWORD"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment