Skip to content

LondonBoroughOfBexley/BasicAuthFilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BasicAuthFilter

This is a basic authentication filter capable of being used with the Spark UI. It is adapted from:

https://web.archive.org/web/20230325023124/https://www.fortytools.com/blog/servlet-filter-for-http-basic-auth

With the only changes being updating from Java Extension (javax) to Jakarta for use with Java 17+.

Package above filter class as a JAR, put it in $SPARK_HOME/jars/ add SPARK_MASTER_OPTS and SPARK_WORKER_OPTS as:

-Dspark.ui.filters=com.fortytools.servlet.BasicAuthFilter
-Dspark.com.fortytools.servlet.BasicAuthFilter.param.user=<user>
-Dspark.com.fortytools.servlet.BasicAuthFilter.param.password=<password>
-Dspark.com.fortytools.servlet.BasicAuthFilter.param.realm=<realmname>

Realm is unused so can be anything.

Although this is functional for preventing unwanted access it is not intended for use on the open internet.

About

Basic authentication filter capable of being used with the Spark UI

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages