Created
December 6, 2019 16:01
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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