package org.kelley;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * Created by tkelley on 1/17/2016.
 */
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
                .authorizeRequests()
                .anyRequest().authenticated()
                .and()
                .httpBasic()
                .and()
                .logout()
                .permitAll();
    }

    @Autowired
    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
        auth
                .inMemoryAuthentication()
                .withUser("kelley").password("scrappy").roles("USER");
    }
}

@@ -77,16 +77,75 @@
 owired;%0A
+import org.springframework.beans.factory.annotation.Value;%0A
 import o
@@ -197,16 +197,16 @@
 ration;%0A
-
 import o
@@ -728,16 +728,81 @@
 apter %7B%0A
+%0A    @Value(%22$%7BENV_APP_PASSWORD%7D%22)%0A    private String password;%0A%0A
     @Ove
@@ -1313,17 +1313,16 @@
 ord(
-%22scrappy%22
+password
 ).ro

Add environment variable for password.