jenkinsci / jenkinsci/ldap-plugin

[JENKINS-42288] Expose LDAP custom attributes as (environment) variables

Open
#484 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component:ldap-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
51
Forks
106
PR merge metrics
No merged PRs in 30d

Description

With ldap-plugin and build-user-vars-plugin we can get the jenkins user names and email from LDAP attributes, as environment variables (highly useful for Slack notifications for example).

However, it would be even better to be able to expose any custom LDAP attribute as environment variables (the list of LDAP attributes and maybe also the mapping to env vars would be configurable).

A use-case: If we store in LDAP the Slack username, we could then send the correct Slack username in the notification.

---
Originally reported by trsystran, imported from: Expose LDAP custom attributes as (environment) variables


  • status: Open
  • priority: Minor
  • component(s): ldap-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 2025-12-09

Raw content of original issue

With ldap-plugin and build-user-vars-plugin we can get the jenkins user names and email from LDAP attributes, as environment variables (highly useful for Slack notifications for example).

However, it would be even better to be able to expose any custom LDAP attribute as environment variables (the list of LDAP attributes and maybe also the mapping to env vars would be configurable).

A use-case: If we store in LDAP the Slack username, we could then send the correct Slack username in the notification.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the ldap-plugin entry points that currently expose Jenkins user names and email, along with the related build-user-vars-plugin behavior. Determine how a configurable list of LDAP attributes and their environment-variable mapping should work; done means a configured custom attribute, such as a Slack username, is available as an environment variable.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.