.1. Create a content selector with this pattern
2. Create a content selector privilege using that content selector and against a docker hosted repository and an action value of wildcard literal "*"
3. Assign the privilege to a role and that role to a test user named "deletetest"
4. docker push an image named "deletetest" to the hosted docker repo named project_repository using the test user.
5. Now use the REST API using the deletetest user to GET the components - this DOES NOT return any components.
curl -v -u deletetest:admin123 http://localhost:8081/service/rest/v1/components?repository=project_repository
Now change the content selector pattern to be this:
Now the same curl request returns the component pushed.
When writing a content selector, remember that the asset’s path will always begin with a leading slash when the selector is evaluated. This is true even though the leading slash is not displayed when searching or browsing assets.
This statement is not always true based on above outcomes.
What is actually happening is the REST API is matching on component name, not access path.
The documentation should be corrected and/or the product behaviour should be evaluated to determine if matching on "name" instead of access path is intended.