Skip to content

Instantly share code, notes, and snippets.

@adamjshook
adamjshook / shiro.ini
Created September 3, 2016 17:12
Apache Shiro JdbcRealm MySQL Example
# Apache Shiro v1.2.3
# Install MySQL
# $ sudo yum install mysql-server
# $ sudo /sbin/service mysqld start
# $ sudo chkconfig mysqld on
# Secure install and set root password
# $ sudo /usr/bin/mysql_secure_installation
@bradfordcp
bradfordcp / README.md
Last active July 28, 2023 10:10
Setting up Apache Spark to use Apache Shiro for authentication of Spark Master dashboard.

Securing Apache Spark with Apache Shiro

  1. Download shiro-core-1.2.5.jar Apache Shiro Downloads
  2. Download shiro-web-1.2.5.jar Apache Shiro Downloads
  3. Note the location of the JAR files and shiro.ini. I placed it in the root of my Spark download
  4. Update the spark-env.sh file with the Shiro JARs and add an entry for the path where the shiro.ini resides
  5. Start the Spark master sbin/start-master.sh
  6. Navigate to the Spark master dashboard
  7. Authenticate with credentials in shiro.ini

Note this was developed / tested with Apache Spark 1.4.1, but should work with newer versions as well.