jenkinsci / jenkinsci/slack-plugin

Support credentials domain specification

Open
#653 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
672
Forks
396
Avg merge
2d 23h
Merged PRs (30d)
5

Description

- Jenkins version: 2.213
- Plugin version: 2.35

### Description
When declaring a Credential (Secret Text) to use for the plugin, the plugin currently requires that these credentials be unrestricted -- that is, an otherwise correctly configured credential will not appear at all in the system configuration, if it is in a Domain that restricts where it should appear. However, it would be helpful to allow using a Domain restriction for these credentials, so that it will only appear when the plugin requests the credentials that match some requirements, like Hostname.

For example:
* From Dashboard -> Credentials -> System
* Click "Add Domain"
* Specification -> Add -> Hostname
* Includes: *.slack.com (or workspace/subdomain: example.slack.com; or hooks.slack.com, etc)

The request is for a credential configured like so^, to be eligible to select when configuring the global Slack plugin settings. Currently when the domain is configured this way, the Credential does not appear in the plugin's credential selector.

The reason this is helpful is because the global/unrestricted credential domain can become very cluttered very quickly, and it is helpful to organize those credentials by creating separate domains to categorize them. That means this Slack plugin's credentials selector would list only the credentials that match the slack domain, and also means that other plugins' credentials selectors would not show the Slack credentials in their lists.

It is possible to make a new unrestricted domain purely for organization purposes (or a Hostname specification with `include=*`), but that does not help with filtering what appears in the plugin's credential selector -- it only helps when managing all system credentials.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.