Bug 2180375 - [DDF] Example mentioned in "3.4.2. OAuth Request Format" is missing important information or not entirely correct [NEEDINFO]
Summary: [DDF] Example mentioned in "3.4.2. OAuth Request Format" is missing important...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.12.0
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-21 10:19 UTC by Direct Docs Feedback
Modified: 2023-08-08 10:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:
mdolezel: needinfo? (alazik)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-16600 0 None None None 2023-03-21 10:21:12 UTC

Description Direct Docs Feedback 2023-03-21 10:19:40 UTC
The curl command mentioned in the example section does not works. We perhaps are missing the information about how to generate the oauth_signature here.

Reported by: rhn-support-saydas

https://access.redhat.com/documentation/en-us/red_hat_satellite/6.12/html/api_guide/chap-red_hat_satellite-api_guide-authenticating_api_calls#annotations:c2b9cff8-94db-458a-9d13-31e0a0e8de61

Comment 1 Sayan Das 2023-03-22 04:55:01 UTC
CC Leos and Malhar 

Here in https://access.redhat.com/documentation/en-us/red_hat_satellite/6.12/html/api_guide/chap-red_hat_satellite-api_guide-authenticating_api_calls#OAuth_Request_Format

We share this example:

curl 'https://satellite.example.com/api/architectures' \
--header 'Content-Type: application/json' \
--header 'Accept:application/json' \
--header 'FOREMAN-USER: sat_username' \
--header 'Authorization: OAuth oauth_version="1.0",oauth_consumer_key="secretkey",oauth_signature_method="hmac-sha1",oauth_timestamp=1321473112,oauth_signature=Il8hR8/ogj/XVuOqMPB9qNjSy6E='


but we don't exactly explain how to get the oauth_timestamp or even more important, the oauth_signature .  So there is no way to get this curl command working even if we want to.

We do mention "Use an OAuth client library to construct all OAuth parameters" but no such examples have been provided there. 

Python example: https://access.redhat.com/solutions/4240401 

Foreman Wiki: https://projects.theforeman.org/projects/foreman/wiki/API_OAuth

Some info about signature : https://stackoverflow.com/questions/9986533/what-does-oauth-signature-sign 

And old redmine : https://projects.theforeman.org/issues/22699 ( which seems to be not applicable any more since sat 6.11 )


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