Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renames initialAdminPassword to OPENSEARCH_INITIAL_ADMIN_PASSWORD to be compliant with opensearch naming convention #3843

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ public void configureSecuritySettings() {
* Replaces the admin password in internal_users.yml with the custom or generated password
*/
void updateAdminPassword() {
String initialAdminPassword = System.getenv().get("initialAdminPassword");
String ADMIN_PASSWORD_FILE_PATH = installer.OPENSEARCH_CONF_DIR + "initialAdminPassword.txt";
String initialAdminPassword = System.getenv().get("OPENSEARCH_INITIAL_ADMIN_PASSWORD");
String ADMIN_PASSWORD_FILE_PATH = installer.OPENSEARCH_CONF_DIR + "opensearch_initial_admin_password.txt";
String INTERNAL_USERS_FILE_PATH = installer.OPENSEARCH_CONF_DIR + "opensearch-security" + File.separator + "internal_users.yml";
boolean shouldValidatePassword = installer.environment.equals(ExecutionEnvironment.DEMO);
try {
Expand All @@ -115,7 +115,7 @@ void updateAdminPassword() {
try (BufferedReader br = new BufferedReader(new FileReader(ADMIN_PASSWORD_FILE_PATH, StandardCharsets.UTF_8))) {
ADMIN_PASSWORD = br.readLine();
} catch (IOException e) {
System.out.println("Error reading admin password from initialAdminPassword.txt.");
System.out.println("Error reading admin password from opensearch_initial_admin_password.txt.");
System.exit(-1);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class SecuritySettingsConfigurerTests {
private final PrintStream originalErr = System.err;
private final InputStream originalIn = System.in;

private final String adminPasswordKey = "initialAdminPassword";
private final String adminPasswordKey = "OPENSEARCH_INITIAL_ADMIN_PASSWORD";

private static SecuritySettingsConfigurer securitySettingsConfigurer;

Expand Down
Loading