When using credentials from /etc/default/ngcp-api, we need to use the "api_admin_system" realm, which gets enabled by passing the «NGCP-UserAgent: NGCP::API::Client» header to the request. This though only works for the matching endpoint (host and port) specified in that file. Otherwise when we using the credentials from the legacy $HOME/.ngcp-api file and to preserve backwards compatibility, we should use the "api_admin_http" realm, which is the default, by not passing the above header in the request. To make this behavior more clear, we try to validate the free-form URL passed by the user and error out if it does not match when using the new credentials. Change-Id: Ic80d2724a20ec951918c88d7f2994c85b5b63910changes/21/40821/1
parent
f411c102dd
commit
a621bd5920
Loading…
Reference in new issue