First of all, I would like to wish you a happy new year before I start with the actual topic. It’s about Nexus.
Situation: I want to provide a repository that should not be accessible anonymously. The registration should be specified within the URL - as follows: http(s)://user:password@domain/nexus/repository/raw-private/service.yaml.
The background is to provide a yaml manifest for an Openshift DevSpaces workspace.
How it works in standard Nexus: I try exactly the same situation with a simply set up Nexus container in another docker host and do the following steps:
- create a raw repository there
- deactivate anonymous
- create a role with read rights exclusively to this repo (read, browse and search rights)
- create a user and give him only this role
then I can, for example, download this file in a private browser window by specifying the user and password in the URL.
If I leave out the username and password, I get the Nexus login prompt and the download is also possible. This proves that I am using a valid user.
If I log in to the GUI, I only see this repo.
Now, how it appears in the ecosystem: I proceed 1:1 as if I only had the Nexus - so I create the user within Nexus and not in the ecosystem’s user management.
If I call up the URL with username and password in another browser or in a private browser window, I get the ecosystem’s login window, i.e. the /cas/login URL - not the Nexus login window.
I cannot log in with the user created in the Nexus, instead the login data of a user created in the user management is required - that is strange. Why then is there user management within the Nexus?
OK, so a group has been created in the ecosystem’s user management. Additionally, a user who becomes a member of this group.
Now it seems necessary that you have to have started Nexus with the user once so that the user even appears in Nexus. Is there any way to skip this step?
From a user management perspective, it is impractical that a user has to log in first so that I can restrict him afterwards - but that is not the core of this topic.
So, the user exists after registration and he can be reduced to this role.
Now the following happens: The URL is called up with the username and password - with the user that has now been created in the user management by the ecosystem. You still see the login page /cas/login - why?
If I enter the data here now, the download will be offered. I have checked the URL several dozen times, but it seems impossible to start the download directly without the CES login window.
But this is essentially necessary in the case of the Openshift DevSpaces, because you don’t get to the login dialog, but instead get an error message that the specified file or URL doesn’t work directly.
The user and password are correct. If I use the login credentials within ces and starting nexus, I only see that raw private repo in the gui. So, username and password are correct.
For me it seems, that nexus in ecosystem works different.
How can I achieve the same result with the Nexus within the ecosystem as with a solo Nexus?
Many thanks and best regards,
Sascha