Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1066091 - The authentication documentation seems incorrect
Summary: The authentication documentation seems incorrect
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: documentation
Version: 2.3
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
: 2.4.0
Assignee: Sayli Karmarkar
QA Contact: pulp-qe-list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-17 16:37 UTC by Eric Lake
Modified: 2015-03-23 01:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-09 06:54:36 UTC


Attachments (Terms of Use)

Description Eric Lake 2014-02-17 16:37:16 UTC
Description of problem:

This page (https://pulp-dev-guide.readthedocs.org/en/pulp-2.3/integration/rest-api/authentication.html) seems to indicate that a plain text certificate should be returned from the api on a successful login. What we are seeing is a json object.

Version-Release number of selected component (if applicable):

2.3.1

How reproducible:

Every time

Steps to Reproduce:
1. curl against the api to retrieve the cert

curl -s -k -X POST -u user:password https://ipofpulpserver/pulp/api/v2/actions/login/

Actual results:some redacting done

{"certificate": "-----BEGIN CERTIFICATE-----\nMIICSTCCATECASQwDQYJKoZIhvcNAQEFBQAwKjEZMBcGA1UEAwwQcHVscC10ZXN0\nLXNlcnZlcjENMAsGA1UECgwEUFVMUDAeFw0xNDAyMTcxNjI3MzBaFw0xNDAyMjQx\nNjI3MzBaMC8xLTArBgNVBAMTJGFkbWluOmFkbWluOjUyZmU2MWIxOGFiMWYyMDlm\nSEugu8GFGtybXmYky4ZDz5vuEHMWT3dtL/eF19s+6wGiu4+yTA0C2cDtL+Id4lIo\nHMLAY/+1ntpQ9dK7wTk0ZryqB6k/oS9VEZSKlipd3sAKzq+DQIuFDNa7VBZy6BXk\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U4cjX1QxTvBmqHII9uLy3nIfzOCjesVWPK0x/qdSvcpjrrEbM\nbrL9HPUeKxdJxTkiTY51AkEA/R4Uvvs/jzDVn7wU2A/ytUsbjmx4VpjFzC9nJQXC\ns4d2CjGnmH/BmaqoTWFdvJDNEtTKSyHGASiffP04Vk8wHw==\n-----END RSA PRIVATE KEY-----\n"}

Expected results: Some redacting done.

-----BEGIN CERTIFICATE-----
MIICSTCCATECAQgwDQYJKoZIhvcNAQEFBQAwKjEZMBcGA1UEAwwQcHVscC10ZXN0
LXNlcnZlcjENMAsGA1UECgwEUFVMUDAeFw0xNDAyMTcxNDQyNTBaFw0xNDAyMjQx
NDQyNTBaMC8xLTArBgNVBAMTJGFkbWluOmFkbWluOjUyZmU2MWIxOGFiMWYyMDlm
5/qZlkCq+8+ecwY46JFYdpVOZl5UzJk8AoOt+oeVvQWWL80+FeUYIi0k4AGtJNZC
06TX25vqliFEytQx+3Q1E81gP9QulbpF0fNVOysWiHqA7/x9kgiq2yor1XEH551M
uKaP2NZ1AxUTf7hImOTYdcTwv3kCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAnwb0
EE2Tn8cTTKDjCEPF2DXGD5zbvdFDw89vafb7Bu6nnSAUdvQwt+SDHJbI4FwKNujZ
pu4E6KFlzFxC6f0C/lMQgd7aBwB4mZ+SOBcp4miO9BBIzisrFdpbankgqzFlHd6j
9cjgeyHyZoTfoeFFcXMwX3ohfW2A2MrZIN3sr5AlRIJtG2vLp+KD8ToVT8Pz4K5h
Rb3RdPzEjCxILU3egIb3YD9qKe7fE1e0/Pl+j2WgHHmRqs9A2dVx2Ajg1V1uIJ6L
2/zc4UB/pU2XxqL30t7sf38Q0khuyQ9Oo4dlC9HUtH/dYkNnLayS2eUzDJGuIcTZ
FKhCKg8yVQeos6XAoA==
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDFD5Oie/pMJGZJyeTn+pmWQKr7z55zBjjokVh2lU5mXlTMmTwC
g636h5W9BZYvzT4V5RgiLSTgAa0k1kLTpNfbm+qWIUTK1DH7dDUTzWA/1C6VukXR
81U7KxaIeoDv/H2SCKrbKivVcQfnnUy4po/Y1nUDFRN/uEiY5Nh1xPC/eQIDAQAB
AoGBAJjZESk5wpXmsdRQHhX1IcYSWM1CZ+NOEzwI6LXp70qlpl6gCJTmsD6fhfx8
x39XaALbISD+VPD/uILveoKb2dorZuUUwnUKyrvFQ/62J8q1AkEA9cpXePY7ELlb
TFgpxXfC4bua4VJaJEDWSITLghqDENJqCcP5/f+lDZB3benq7ZTJ/7/3rTvtafTJ
aMqnLu5NNwJBAM0/D2hmzmP1T9qk9LY/KW9ZVW5ULxH8aBUiNM9u6SLti7mQoC3r
o8HXKTyRdm4YvE+VVG5JGzdRjnfzYK1qMM8CQQDS9OUYy/WsB/sFTpIjiwO37OYk
yCLYBNImEdv9gbXGZWJfmVXinF1UhA8NRny9hzvMhz4T8GB31YJcr7rIO/4HAkBl
eBeV9b1zjYO9BHA26WMCuZeSw+vBaJfMWuzg4GRB8E5znxyRlz2OR2ELoJ58L55p
edoT6/CYmKlmg9v339fhAkBxVHA8HBFyzPQfzIdK4CiCflJZIvPBmSDB+HdmQtTw
KUz1g2v/aPj7W55Edt3O7dcoxfNCDaaMO538ojcdQZRo
-----END RSA PRIVATE KEY-----

Additional info:

Comment 1 Eric Lake 2014-02-17 17:27:24 UTC
Essentially this is what we have to do to get a valid cert from a curl.

curl -s -k -X POST -u user:password https://ipofpulpserver/pulp/api/v2/actions/login/ | python -c 'import json; import sys; certs=json.loads(sys.stdin.read()); open("certs.pem", "w").write(certs[u"certificate"]+certs[u"key"])'

Comment 2 Sayli Karmarkar 2014-03-26 09:57:55 UTC
https://github.com/pulp/pulp/pull/869/

Comment 3 Jeff Ortel 2014-04-03 13:35:45 UTC
build: 2.4.0-0.7.beta

Comment 4 Pavlina Bartikova 2014-04-15 15:51:53 UTC
Confirmed.

Moving bug to VERIFIED.

Comment 5 Randy Barlow 2014-08-09 06:54:36 UTC
This has been fixed in Pulp 2.4.0-1.


Note You need to log in before you can comment on or make changes to this bug.