Introduction
CSRF protection stops bad websites from tricking Jenkins into doing things without permission. It keeps your Jenkins safe by making sure requests come from trusted users only.
When you want to prevent attackers from making unauthorized changes to Jenkins jobs or settings.
When you expose Jenkins to the internet and want to protect it from cross-site attacks.
When you use Jenkins APIs or scripts that require secure access.
When multiple users share the same Jenkins server and you want to ensure actions are intentional.
When you want to comply with security best practices for web applications.