Fork me on GitHub

Simple. Java. Security.

Contributing to Apache Shiro


The Shiro Project is an Open Source volunteer project released under a very liberal license. This means there are many ways to contribute to the project - either with direct participation (coding, documenting, answering questions, proposing ideas, reporting bugs, suggesting bug-fixes, etc..) or by resource donations (staff time, conference presentations, publicity, software) and even general hardware/money donations via the Apache Software Foundation.

To begin with, we suggest you to subscribe to the Shiro mailing lists (follow the link for information on how to subscribe and to access the mail list archives). Listen-in for a while, to hear how others make contributions.

You can get your local working copy of the latest and greatest code by following the directions in our Download page. Review the To Do list in the issue tracker and then choose a task that interests you. Perhaps you have noticed something that needs patching, or have a new feature to contribute. Make the changes, do the testing, generate a patch, and discuss on the dev mailing list. (Do not worry - the process is easy and explained below.)

Document writers are usually the most wanted people so if you like to help but you’re not familiar with the innermost technical details, don’t worry: you can still be tremendously helpful!

Help Wanted Here

You can be a huge help by providing extra assistance in any of the following areas:

Procedure for reporting bugs and issues and enhancement suggestions

If you think that you have found a bug or you have a suggestion for improvement, then please discuss it on one of the mailing lists. However, please check our issue tracker first as it may be already reported.

The Apache Shiro Issue Tracker collates our known issues. Obviously not every issue is listed there. Some issues have been discussed on the mailing list but do not yet have an issue recorded.

The Roadmap is the best way to get an overview. The Unscheduled list also needs regular review, and committers will schedule some of those for the next release.

When creating a new issue, please provide a concise Summary Title and a short Description. Add further information as Comments and include links to the mail archives. The normal procedure is to discuss the issue on the mailing list and then add relevant notes to the issue tracker, otherwise it becomes cluttered.

Git Usage

An overview of how to use Git to participate in Shiro development. Do not be afraid - you cannot accidentally destroy the actual code repository, because you are working with a local copy as an anonymous user. Therefore, you do not have the system permissions to change anything. You can only update your local repository and compare your revisions with the real repository. The Download Shiro page explains how to check-out the code base and build your local copy.

Git Committers

After a developer has consistently provided contributions (code, documentation and discussion) and demonstrated committment, then the rest of the dev community may vote to grant this developer commit access to the Git repository. See the ASF developers resources especially the Source code repositories.

Procedure for Raising Development Issues

There are two methods for discussing development and submitting patches. So that everyone can be productive, it is important to know which method is appropriate for a certain situation and how to go about it without confusion. This section explains when to use the developer mailing list and the issue tracker.

Research your topic thoroughly before beginning to discuss a new development issue. Search and browse through the email archives - your issue may have been discussed before. Prepare your post clearly and concisely.

Most issues will be discovered, resolved, and then patched quickly via the developer mailing list. Larger issues, and ones that are not yet fully understood or are hard to solve, are destined for the issue tracker.

Experienced developers use the issue tracker directly, as they are very sure when they have found a bug and when not. However, less experienced users should first discuss it on the user or developer mailing list (as appropriate). Impatient people always enter everything into the issue tracker without caring if it is a bug of Shiro or their own installation/configuration mistake - please do not do this.

As a rule-of-thumb, discuss an issue on the developers mailing list first to work out any details. After it is confirmed to be worthwhile, and you are clear about it, then submit the bug description or patch via Bug Tracking.

Perhaps you do not get any answer on your first reply, so just post it again until you get one. (But please not every hour - allow a few days for the list to deal with it.) Bear in mind that other countries will have holidays at different times to your country and that they are in different time zones. You might also consider rewriting your initial posting. It may have not been clear to the readers on the mailing list.

Contributing as a Non-Committer

If you’re a committer on an Apache project, it means that you can commit directly to the project’s repository. For instance, with Apache Shiro committers are allowed to directly push commits into the git repository.

Non-committers, however, have to submit patches for review. Apache Shiro accepts GitHub pull requests. If you are new to Git and GitHub, check these two links:

Apache Shiro has a read-only mirror on GitHub that is kept in sync with the canonical Git repo maintained by the Apache Software Foundation. Submitting GitHub pull requests is the easiest way to get your contribution upstream. For detailed instructions see the link below:

GitHub Contribution Guidelines

Submitting a patch through JIRA

While we encourage you to submit your contribution through GitHub pull requests, you can also attach a patch in a JIRA ticket. For the purpose of these instructions, we’ll assume that you already have a system with Git and have found a bug to fix or have a feature that you’d like to submit, and you’re willing to contribute that code or documentation under the Apache License 2.0.

Further, if you’re fixing a bug we’ll assume that you’ve either filed a bug report (where you will attach your patch) or are submitting a fix for a known bug. If you find a bug and would like to fix it, that’s awesome! Please be sure to file the bug too, though.

If you want to add a feature, you should bring it up for discussion on the mailing list before implementing it. This ensures that it meshes with the plans that other contributors have for Apache Shiro, and that you’re not doing redundant work. Other developers may also have ideas for the feature or suggestions that will help you land the feature without having to re-do the work. More information about our mailing lists can be found here.

In short, communication is a vital part of making a contribution to an Apache project.

Getting Started

First, lets make sure that you’ve added your name and email to your ~/.gitconfig:

$ git config --global "Your Name"
$ git config --global

You’ll grab the Shiro source with git:

$ git clone

If you already have the source, make sure you’re working with the most recent version. Do a git pull if you cloned the source more than a few hours ago. (Apache Shiro development can move pretty fast!)

$ git checkout -b mybranch

This does two things: One, it creates the branch mybranch and two, it changes your working branch to mybranch. Running git branch will show you which branch you’re working on, with an asterisk next to the active branch, like so:

[user@localhost shiro]$ git branch
* mybranch

Make whatever changes you’re going to make, be sure to use git add to stage the changes, and then you’re going to commit the changes to your working branch:

git commit -m "Insert a meaningful summary of changes here."

Finally, you can create a patch and attach it to the JIRA issue that you created for the bug you are fixing.

git format-patch master --stdout > ~/patch-name.patch


Once you’ve submitted your pull request, you should receive a response within a few days. If you receive no response within a week, please ping the shiro-dev mailing list (

Contribution Notes and Tips

This is a collection of tips for contributing to the project in a manner that is productive for all parties.