Open pilou- opened 6 years ago
This fix should be applied, as it does not make sense to add options --username="" --password="" to ansible-container if no authentication is required.
@Voronenko could you review this one too :) ?
That's the edge case, @pilou- . Generally, I do not think it is good idea to have private registry without authorization from security point of view.
@gregdek could you merge this one ?
Would like to hear more feedback from @Voronenko on this one -- are you saying that this PR is solving an edge case at the expense of breaking the private registry use case?
This PR doesn't break private registry use case.
Credentials (meaning: username and password) can still be provided:
Currently, ansible-container:
username
check removed by this pull-request)--username
and --password
command line switches are provided (regardless the values)ansible-container should not require --username
and --password
to be provided when a registry without authentication is used.
@gregdek Nope, it does not break. "Edge case" - wat I want to say, is that having private docker registry without authentication (or even filtered by IP) is the bad security practice. You will rarely meet such setup even in staging environment.
So I would see allowance procedure either as attribute near registry creds, indicating that, or perhaps specifying both username and password to empty strings and handle that ...
ISSUE TYPE
SUMMARY
Allow to push to private registries: remove exception.
Error was:
Fixes #911