jenkinsci / jenkinsci/ldap-plugin
[JENKINS-42288] Expose LDAP custom attributes as (environment) variables
Nobody has claimed this yet.
- 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
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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