This java class provides a simple way to achieve basic auth in recent versions of selenium (current version 3.x) with recent versions of google chrome (current year 2020). It dynamically generates a tiny extension that will add the Authorization header for you.
How to use it:
// Add basic auth header with a chrome extension on every request
File authExtension = new SeleniumChromeAuthExtensionBuilder()
.withBasicAuth("Ali Baba", "Open sesame")
.withBaseUrl("https://example.org/*")
.build();