Skip to content
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

send a HTTP Post in https to get an access token oauth server return an error #159

Open
cappelc opened this issue Jan 13, 2021 · 1 comment

Comments

@cappelc
Copy link

cappelc commented Jan 13, 2021

I use redsocks to integrate a product that does not support customer HTTP proxy based on 'bluecoat' product. I configured iptables and redsocks.conf like described in this project.

bluecoat HTTP proxy works in HTTP.

It works well if for example I perform an HTTP get with a command like this:

curl https:///.well-known/configuration

but I get an error by the server like this:

res={"error":"invalid_request","error_description":"The request contains invalid parameters or values."}

if instead call a HTTP POST to get an access token with a command like this:

curl --location --insecure --request POST 'https:///oauth2/v1/token' --header 'Authorization: Basic …' --header 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' --data-urlencode 'grant_type=client_credentials' --data-urlencode 'scope=urn:opc:idm:myscopes'

It seems as if the message from client (curl) via redsocks+bluecoat arrives to the server corrupted.

I use libevent in version libevent-2.0.22-stable.

Is it possible to trace what sends redsocks in the case of HTTP Post using the sources by recompiling it? Does it need to verify keepalive option in server Linux where redsocks runs?

Other ideas?

Kind regards
Corrado Cappello

@cappelc
Copy link
Author

cappelc commented Jan 13, 2021

I trace the OAUTH server logs and I am sure that does not arrive to the server Http Header 'Authorization: Basic …' because server prints clientId=Anonymous and not the clientId provided in Authorization: Basic BASE64<client_id:clientsecret>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant