+ LDAP +
+Additional configuration for LDAP +
+diff --git a/docs/docs/developer-guide/index.html b/docs/docs/developer-guide/index.html index 471cedce..6d2a0a8d 100644 --- a/docs/docs/developer-guide/index.html +++ b/docs/docs/developer-guide/index.html @@ -230,6 +230,12 @@ + LDAP + + + + + OpenShift @@ -1227,6 +1233,8 @@ make deploy-webhook + + diff --git a/docs/docs/faq/index.html b/docs/docs/faq/index.html index 7a5659d8..7b8ade6d 100644 --- a/docs/docs/faq/index.html +++ b/docs/docs/faq/index.html @@ -230,6 +230,12 @@ + LDAP + + + + + OpenShift @@ -992,6 +998,8 @@ and kept in a VCS.
+ + diff --git a/docs/docs/getting-started/index.html b/docs/docs/getting-started/index.html index 1e989117..d5ded3f5 100644 --- a/docs/docs/getting-started/index.html +++ b/docs/docs/getting-started/index.html @@ -230,6 +230,12 @@ + LDAP + + + + + OpenShift @@ -1018,6 +1024,8 @@ + + diff --git a/docs/docs/getting-started/latest/aks/index.html b/docs/docs/getting-started/latest/aks/index.html index f6b601d4..f4f5208f 100644 --- a/docs/docs/getting-started/latest/aks/index.html +++ b/docs/docs/getting-started/latest/aks/index.html @@ -237,6 +237,12 @@ + LDAP + + + + + OpenShift diff --git a/docs/docs/getting-started/latest/configuring-backup-and-restore/index.html b/docs/docs/getting-started/latest/configuring-backup-and-restore/index.html index 4e9b3640..98099882 100644 --- a/docs/docs/getting-started/latest/configuring-backup-and-restore/index.html +++ b/docs/docs/getting-started/latest/configuring-backup-and-restore/index.html @@ -237,6 +237,12 @@ + LDAP + + + + + OpenShift diff --git a/docs/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/index.html b/docs/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/index.html index fc4e7af7..b135d156 100644 --- a/docs/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/index.html +++ b/docs/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/index.html @@ -237,6 +237,12 @@ + LDAP + + + + + OpenShift diff --git a/docs/docs/getting-started/latest/custom-backup-and-restore/index.html b/docs/docs/getting-started/latest/custom-backup-and-restore/index.html index 524df49f..a6b7f2d7 100644 --- a/docs/docs/getting-started/latest/custom-backup-and-restore/index.html +++ b/docs/docs/getting-started/latest/custom-backup-and-restore/index.html @@ -237,6 +237,12 @@ + LDAP + + + + + OpenShift diff --git a/docs/docs/getting-started/latest/customizing-jenkins/index.html b/docs/docs/getting-started/latest/customizing-jenkins/index.html index 7e2e49ea..37335682 100644 --- a/docs/docs/getting-started/latest/customizing-jenkins/index.html +++ b/docs/docs/getting-started/latest/customizing-jenkins/index.html @@ -237,6 +237,12 @@ + LDAP + + + + + OpenShift diff --git a/docs/docs/getting-started/latest/deploying-jenkins/index.html b/docs/docs/getting-started/latest/deploying-jenkins/index.html index 0606081f..09a37b06 100644 --- a/docs/docs/getting-started/latest/deploying-jenkins/index.html +++ b/docs/docs/getting-started/latest/deploying-jenkins/index.html @@ -237,6 +237,12 @@ + LDAP + + + + + OpenShift diff --git a/docs/docs/getting-started/latest/index.html b/docs/docs/getting-started/latest/index.html index f21da634..02ce2e8e 100644 --- a/docs/docs/getting-started/latest/index.html +++ b/docs/docs/getting-started/latest/index.html @@ -230,6 +230,12 @@ + LDAP + + + + + OpenShift @@ -976,6 +982,16 @@ +Additional configuration for LDAP +
+Configuring LDAP is not supported out of the box, but can be achieved through +plugins and some well tuned configurations.
+ +The plugin we will use is: https://plugins.jenkins.io/ldap/
+ +++ +Note: This is an example of how LDAP authentication can be achieved. The LDAP +plugin is from a third-party, and there may be other alternatives that suits +your use case better. Use this guide with a grain of salt.
+
LDAP server accessible from the Kubernetes cluster where your Jenkins +instance will live.
Credentials to a manager account in your AD. Jenkins Operator will use +this account to authenticate with Jenkins for health checks, seed jobs, etc.
In your Jenkins configuration, add the following plugin:
+plugins:
+ # Check https://plugins.jenkins.io/ldap/ to find the latest version.
+ - name: ldap
+ version: "2.7"Easiest step is to then start up Jenkins then navigate to your instance’s +“Configure Global Security” page and configure it accordingly.
+ +http://jenkins.example.com/configureSecurity/
Once it’s set up and tested, you can navigate to your JCasC page and export +the LDAP settings.
+ +https://jenkins.example.com/configuration-as-code/
Feed the relevant new settings into your Kubernetes ConfigMap for your JCasC +settings.
+ +Here’s a snippet of the LDAP-related configurations:
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: jenkins-casc
+data:
+ ldap.yaml: |
+ jenkins:
+ securityRealm:
+ ldap:
+ configurations:
+ - displayNameAttributeName: "name"
+ groupSearchBase: "OU=Groups,OU=MyCompany"
+ groupSearchFilter: "(& (cn={0}) (objectclass=group) )"
+ inhibitInferRootDN: false
+ managerDN: "CN=Jenkins Admin,OU=UsersSystem,OU=UsersOther,OU=MyCompany,DC=mycompany,DC=local"
+ managerPasswordSecret: "${LDAP_MANAGER_PASSWORD}"
+ rootDN: "DC=mycompany,DC=local"
+ server: "MyCompany.local"
+ userSearch: "SamAccountName={0}"
+ userSearchBase: "OU=MyCompany"
+ disableMailAddressResolver: false
+ disableRolePrefixing: true
+ groupIdStrategy: "caseInsensitive"
+ userIdStrategy: "caseInsensitive"++ + + +Note the use of
+${LDAP_MANAGER_PASSWORD}above. You can reference +Kubernetes secrets in your JCasC ConfigMaps by adding the following to your +Jenkins object:+> kind: Jenkins +> spec: +> configurationAsCode: +> configurations: +> - name: jenkins-casc +> secret: +> # This here +> name: jenkins-casc-secrets +> ``` +> +> ```yaml +> apiVersion: v1 +> kind: Secret +> metadata: +> name: jenkins-cred-conf-secrets +> stringData: +> LDAP_MANAGER_PASSWORD: <password-for-manager-created-in-ldap> +> ``` +> +> Schema reference: [v1alpha2.ConfigurationAsCode](./schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode) + +Finally you must configure the Jenkins operator to use the manager's +credentials from the AD. + +This is because this procedure will disable Jenkins' own user database, and the +Jenkins operator still needs to be able to talk to Jenkins in an authorized +manner. + +Create the following Kubernetes secret:yaml +apiVersion: v1 +kind: Secret +metadata: + name: jenkins-operator-credentials-
+ ++ namespace: +stringData: + user: + password: +``` Note: Values in stringData do not need to be base64 encoded. They are +encoded by Kubernetes when the manifest is applied.
+