-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic HTTP Config supports OAuth1 #1297
Comments
@JakeQuilty after reading that I have what may end up being a silly question - but can you have your secretless config hardcode the values in the string here: ie if the header is supposed to be
I’m not sure the specific syntax of the Authorization line should work, but either something very much like it should or we should enhance the generic connector. As possible enhancements, we could define functions for the Note: updating to add that the signature requires info on the token, so Secretless would almost certainly have to compute this in order to get this to work. |
Proposed ChangesOur plan is to add OAuth1.0 to the generic HTTP connector. PlanWe are planning to create a new addition to the generic HTTP Connector, by adding an We will call a new method, called
Our plan is to follow the OAuth protocol, as defined here. Our method
Potential edge cases to test for include overriding the Header if the user tries to pass in an
Example Config
Topics for Discussion:
To-Do (edited) |
I'm going to leave this open until we create a new Secretless tag (hopefully soon). For now, these changes are merged to master. |
Is your feature request related to a problem? Please describe.
Currently Secretless Broker does not support any of the 3 methods of authenticating with OAuth1
Problems with OAuth 1.0a and Secretless
OAuth 1.0a requires 7 different parameters to authenticate:
consumer_key
- Constant secretnonce
- Dynamic, created specifically for requestsignature
- Dynamic, generated from all other parameterstimestamp
- Dynamic, timestamp of request and will be denied if too old when request is senttoken
- Constant secretsignature_method
- Dynamicversion
- DynamicThere are 3 ways to pass these parameters in the HTTP request:
Method 1
Only 2 of the 7 parameters are constant secrets for Secretless to inject, the rest need to be created by the application when making the request.
The main problem with OAuth 1.0a and Secretless is that Secretless currently replaces the whole
Authorization
line in the header, with no way to "save" the other parameters that are passed.Example:
Request:
Secretless generic config:
Request sent to server:
I couldn't find a way to inject the secrets that the request needs for authentication and keep the other parameters at the same time.
Method 2
Currently modifications to request bodies are not supported by Secretless.
Method 3
This is not currently supported either
Recommended Solution
I think the best solution to this, would be to add a feature that allows Secretless to inject secrets into the header, while keeping the other parameters in the authorization line.
EDIT: This won't work for OAuth_signatures that use the tokens that Secretless keeps in the OAuth_signature base string. The best solution might be adding the ability to create all of the parameters needed for OAuth1 in Secretless and add the ability to specify the site specific signature format in the generic config
Additional context
Stemmed from: #1264
The text was updated successfully, but these errors were encountered: