Captcha for JIRA REST API

JIRA has brute force password look up protection for its Web UI with Captchas.

But what is there for its REST API? Is there any protection of any kind analogous to the Catpchas?

1 answer

1 accepted

1 vote

Hello Jiri,

CAPTCHA is not going to be useful because REST is supposed to connect services without manual input required.

External software/hardware for a secure service.  Why ? The reason is simple, you want to protect your service from too much unnecessary workload, and when the checks are done by your service you are not protecting it, you're just making it worse. So DDoS attacks should be stopped before they reach your service, because when they do they eat up resources.

A common technique used with iptables is to limit the request rate from a single source to a few times per minute, but this is not an obvious solution if many users are coming in from the same IP address such as a forward proxy or other NAT-routed location.

iptables is too crude.

I am using JIRA via Apache reverse proxy. 

I was thinking of mod_qos (mod_security is slowing the entire the entire server) or something along those lines.

Even better an Atlassian apache module which would take care of blocking the IP addresses which fail to log in - we do not care about the number of requests after the user logs in either in REST or the UI. 

I have seen some Python code doing this by parsing logs but doubt that's the most elegant solution. 

Is there any way to to configure mod_qos or something similar to do the IP address blocking / DoS prevention just on the login screen?

Fail2ban is what we recommend in our docs:

https://confluence.atlassian.com/adminjiraserver071/using-fail2ban-to-limit-login-attempts-802593048.html

Don't know mod_qos, and as a sysadmin I would avoid parsing logs for the obvious reasons. 

However mod_security should work well if configured correctly. There are examples given for IP-based blocking and username-based blocking will only deny requests on specific URL after multiple failed attempts. Search for "Brute-Force Authentication Protection with ModSecurity", it yields a very useful page at the top. We don't have any in-house solutions that I am aware of.

There's also a mod_security implementation with nginx that is discussed on their blog, but it's mostly about logging configuration. The nginx cookbook has some good info on mod_sec and rate-limiting. Hope this helps.

I am confused - you advise against parsing logs which is exactly what fail2ban does?

I'm not a fail2ban fan, I know it is recommended as a do-it-yourself project, but I would much prefer to have external management of endpoint security than by relying on log parsing / dynamic policy updating. Enterprise security solutions are usually implemented on a dedicated firewall. 

Yeah, makes sense :-). THANK YOU.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,301 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot