Allow anonymous user to only view job list without browsing workspace in Jenkins
Solution 1:
OK, so I've managed to do it:
- you need Role-based Authorization Strategy Plugin
- enable this authentication strategy in Configure Global Security
- in Manage and Assign Roles / Manage Roles create new role anonymous and authenticated for both global and project roles
- in Global roles grant anonymous role right only to Overall / Read (this will at the very least access anonymous user main jenkins screen with navigation and link to login page, not login prompt immediately)
- in Project role add anonymous role with regexp pattern that will match projects you want anonymous users to access and after adding this role grant it right to Job / Read and Job / Discover
- navigate to Manage and Assign Roles / Assign Roles and assign Anonymous user group to anonymous role (and authenticated users to specific groups). SAVE
Solution 2:
With above https://wiki.jenkins.io/display/JENKINS/Role+Strategy+Plugin
plugin
then you DO NOT need add authenticated
role in Manage Roles page.
Screenshots: Manage Roles & Assign Roles