sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.83k stars 557 forks source link

Allow `*` in name of wildcard privileges #412

Open tomudding opened 2 weeks ago

tomudding commented 2 weeks ago

The wildcard privileges provided by default or created from new repositories always include a * in the name to make it clear that the privilege is a wildcard privilege (specifically which part of the privilege has a "wildcard"). For example, all privileges for Docker repository administration can be granted by nx-repository-admin-docker-[repository]-*.

However, when you try to create a wildcard privilege yourself, it is not possible to use a * in the name. The field has the following validation: "Only letters, digits, underscores(_), hyphens(-), and dots(.) are allowed and may not start with underscore or dot.".

This does not appear to be a technical restriction due to the existence of the default privileges, so I think it would be a nice addition to also allow * in the name of a custom wildcard privilege.

nblair commented 1 week ago

Thanks for opening an issue @tomudding. The current validation on that field limits it to a small set. I've marked this as an enhancement request and I'll leave it open to track demand.