Jenkins LDAP integration issues - jenkins

I have been trying to integrate Jenkins with LDAP manage Jenkins --> Configure Global Security --> Security Realm --> and choosing the LDAP option. Under the advanced configuration tab I specified the enterprise LDAP server details i.e. Server, root DN, User Search Base, etc. I saved the LDAP config, signed out and tried signing back in which was disallowed. Checked the Jenkins system logs and no errors were recorded. Any pointers to debug this would be great.
Jenkins version: 2.375.1 LTS
LDAP plugin: 2.9

Related

Jenkins Plugin Development - how to log in as a user

I'm trying to work on a plugin for Jenkins that requires access to the logged in user. It appears that when i'm running the mvn hpi:run, the Jenkins server that is spun up appears to have a user called 'Anonymous' without the option to login/logout etc.
As per the documentation on developing a plugin, i'm using the following settings export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n". Is there any way to enable user authentication on this spun up Jenkins Server?
This ended up being more of an administration task. Had to manually allow authentication on the server (i got a warning on the Manage Jenkins page). This allowed me to create users.

Jenkins Integration with Jira issue

I have installed Jenkins Plugin for JIRA on my JIRA installation and also JIRA Plugin for Jenkins on to my Jenkins installation. I have added an application link in JIRA settings.
I am facing below issue:
1) On Application Links page there is a warning that my Jenkins Application "seems to be offline". While Adding a jenkins link it gives me error : The host doesn't respond. Change the url or click next to confirm.
Jira Version - 6.0.5
Jenkins Version - 1.562
Jenkins-Jira Plugin Version - 1.4.3
Thanks to anybody who's willing to help me out on this.
You can follow four steps:
Install JIRA Plugin in Jenkins
In Jenkins:
Manage Jenkins > manager plugins > available
search and choose Jenkins JIRA plugin , Jenkins JiraTestResultReporter plugin and Jenkins JIRA Issue Updater
Install Jenkins Plugin in JIRA.
https://marketplace.atlassian.com/plugins/com.marvelution.jira.plugins.jenkins
see: Installation section.
Add Jenkins 's Application Links in JIRA
The integration between JIRA and Jenkins has Application Links as its base. This allows administrators to configure and manage the Jenkins
To get started, go to [JIRA_BASEURL]/plugins/servlet/applinks/listApplicationLinks and click on the Add Application Link button to add a new Application Link for Jenkins.
or administration > plugin > Application Link > add Application Link; do as instruction
note: Optionally, but required if Jenkins is secured,
configure Outgoing Authentication that JIRA should use.
To do this, click on the Edit link next to the Jenkins Application Link, and select OutGoing Authentication tab
Provide the Username of the user to use to authenticate against Jenkins with
Provide the Password of the use
Jenkins Configuration
After the installation of the Jenkins Plugin for JIRA, and the configuration of at-least one Application Link, administrators will be able to control which Jobs are included in the synchronisation process and which aren't.
in Administration > plugins (add-ons) >Jenkins Configuration
Download JIRA plugin for Jenkins and install this plugin in Jenkins
way 1: copy it to Jenkins's plugin folder. and restart Jenkins
way2: Manage Jenkins > manager plugins > advanced > Upload Plugin . Choose file and upload then restart Jenkins
Enable Jenkins job in JIRA
then just use a known JIRA Issue Key in a commit message of your source code repo
Jenkins will make all the change sets (commits) available to the JIRA plugin when syncing a build.
The sync process uses the change sets to look for JIRA Issue Keys. Once this process locates a link, then that build will be available in the CI Build Panels.
download jenkins-jira-plugin at http://mvnrepository.com/artifact/com.marvelution.jira.plugins/jenkins-jira-plugin

what is the difference between Jenkins Built in LDAP and Jenkins LDAP Plugin

I am confused with Jenkins LDAP Plugin and the LDAP that already comes with jenkins without installing any plugin.
Does someone know what is the difference between Jenkins Built in LDAP and Jenkins LDAP Plugin
Ref: https://wiki.jenkins-ci.org/display/JENKINS/Standard+Security+Setup
I think that there is no difference between them.
LDAP feature simply taken out as this plug.
So, I use on my server built-in feature. Work fine.

anonymous access to jenkins workspaces

I am using Jenkins installed on CentOS release 6.3 and Jenkins 1.474. I am using Project-based Matrix Authorization Strategy so that only users in specific AD groups are allowed to log in to Jenkins and view particular jobs.
However I am trying to give anonymous access to workspaces for jobs so I can do a wget and specify the http URL. This is so the hosts I am managing via Jenkins can get certain hosts.
I have added Anonymous to the Project-based Matrix Authorization Strategy section and ticked workspaces but this isn't working. When doing a wget I can access forbidden and when I put the URL in to a browser, I am asked to login. I have also configured Anonymous to have access to the workspace on the job itself, but still get access forbidden.
Has anyone got any ideas as to why his is not working?
We are using Jenkins version 1.475
We have the following enabled for anonymous access:
Overall:
Read -> Enabled
Job:
Read -> Enabled
Workspace -> Enabled
This allows access to anonymous users to view the Dashboard and the Jobs and also to the workspace...
As of Jenkins ver. 1.609.1, the changes can be made under
Configure Global Security | Configure Global Security (or htTps://<your jenkins host>/configureSecurity/).
Similar to sdmythos_gr's answer just set Overall Read and Job Read for Anonymous.

gerrit: use LDAP auth and have a gerrit-local account for Jenkins

We a new gerrit 2.2.1 server using LDAP authentication in our corporate environment. We also have a Jenkins server running as a local UNIX jenkins user that I want to get check in with gerrit and post build results into gerrit.
We don't have a "jenkins" LDAP account, and even if we did, the systems group doesn't give out passwords for system accounts, so I can't go into the web UI, create the account and add jenkins' publich ssh key. How I can add a "jenkins" account to gerrit that Jenkins can use? We already have a number of people registered in Gerrit, so I need to be careful with any operations.
A little more Google searching found Paulo Pires's blog post, which led to using Gerrit's create-account command.

Resources