class VaultSecurityManager implements SecurityManager {

    @Override
    public Object authenticate(Properties properties) throws AuthenticationFailedException {
        String username = properties.getProperty("security-username");
        Assert.hasText(username, "Missing username");
        LOG.info("authenticate: username={}", username);

        String password = properties.getProperty("security-password");
        Assert.hasText(password, "Missing password");
        LOG.trace("authenticate: username={}, password={}", username, password);

        VaultResponse vaultResponse = vaultTemplate.read(readPath + username);

        if (vaultResponse == null) {
            throw new AuthenticationFailedException(username);
        }

        String actualPassword = (String) vaultResponse.getData().get("password");
        LOG.trace("authenticate: username={}, password={}, actualPassword={}", username, password, actualPassword);

        if (!password.equals(actualPassword)) {
            throw new AuthenticationFailedException(username);
        }

        return new UsernamePrincipal(username);
    }

    public  VaultSecurityManager();
    public  VaultSecurityManager(VaultTemplate vaultTemplate, String readPath);

}