On 09/07/2016 07:05 PM, Partha Aji wrote: > Lately I have been playing with these attributes to sync repos from private > docker registries. Question I have is if these attributes are applicable to > other content types that pulp supports like yum, puppet, ostree. Reason I > ask is I see these in the generic place > https://github.com/pulp/pulp/blob/master/common/pulp/common/plugins/importer_constants.py#L60 > > So in the case where the user supplies this information for a yum repo does > that mean the yum repo is protected by an http username/password basic > authentication??
Correct. All it does is set the Authorization header in the HTTP
requests to the authentication type ("Basic") and the base64 encoding
of the username and password. You can see this for yourself:
[vagrant@dev ~]$ cat /etc/pulp/server/plugins.conf.d/yum_importer.json
{
"basic_auth_username": "AzureDiamond",
"basic_auth_password": "hunter2"
}
[vagrant@dev ~]$ pulp-admin rpm repo create --repo-id test --feed
http://127.0.0.1:8080/test
Successfully created repository [test]
[vagrant@dev ~]$ pulp-admin rpm repo sync run --repo-id test
Then in a separate shell run
[vagrant@dev ~]$ nc -l 127.0.0.1 8080
GET /test/repodata/repomd.xml HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.10.0
Authorization: Basic QXp1cmVEaWFtb25kOmh1bnRlcjI=
[vagrant@dev ~]$ ipython
In [1]: import base64
In [2]: base64.b64decode('QXp1cmVEaWFtb25kOmh1bnRlcjI=')
Out[2]: 'AzureDiamond:hunter2'
See https://tools.ietf.org/html/rfc7235 for more information. Does
that answer your question?
--
Jeremy Cline
XMPP: [email protected]
IRC: jcline
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Pulp-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/pulp-list
