-
New Feature
-
Resolution: Fixed
-
Minor
-
None
NeuVector scanner plugin enforces usage of IP address when connecting to a controller. Although, hostname can technically be used, the implementation gives a feeling that it was not an intention.
Enforcing an IP address (or pure hostname) eliminates the possibility to use API exposed under a subpath. Consider the case when controller exposes API as: https://neuvector.company-internal.com/api/
It appears that using URL as controller address may resolve this and other similar needs.
zorg1331
Thank you for reporting the issue. For the image scanning process, we need to call three APIs in a specific sequence.
Firstly, we need to make an HTTP POST request to "/v1/auth" endpoint with login credentials to obtain a security token. This token will be required for the subsequent API calls.
Next, we need to make an HTTP POST request to "/v1/scan/repository" endpoint with the security token added to the header. This API call will perform the actual image scan and return the scan result.
Finally, we need to make an HTTP DELETE request to "/v1/auth" endpoint to log out from the server.
To make it easy for our users, we only require them to provide the API server's hostname/IP and port. We handle the subpaths in the code and make the details transparent to the user.
So, to use a URL to replace the hostname/IP + port is not necessary or relevant for our use cases.