Dear Vamsi,
OTK is an implementation of Oauth 2 server, it follows Oauth standard, and uses standard parameters.
But other Oauth server could have different implementation.
As you can see in the sample policy Joe provided, the authorization endpoint of OTK is,
/auth/oauth/v2/authorize
The token endpoint of OTK is,
/auth/oauth/v2/token
Apparently you're not asking access token against OTK, (that's fine, it's the choice of backend service) then using OTK assertion to retrieve token may not work as expected.
Secondly, the redirect url should point to somewhere which can handle the granted auth code, and call the token endpoint to retrieve tokens. I don't think google.com can be a valid redirect_uri.
Regards,
Mark
Original Message:
Sent: 11-19-2019 04:19 AM
From: vamsi garimella
Subject: RetrieveOauthToken Assertion outputs missing parameters
Mark,
When we hit the AUth URL in the browser it presents with the login page.
After you login the page redirects to the redirect URI set in the URL and presents us with the auth code with we need to pass in next call to the token access URL to get the access token.Please advise if this is do able with in Policy Manager and how.
Thanks
Vamsi Garimella
Original Message:
Sent: 11-07-2019 05:28 PM
From: Zhijun He
Subject: RetrieveOauthToken Assertion outputs missing parameters
Dear Vamsi,
It is not the token endpoint of OTK, it seems you use the assertion against a 3rd party oauth server. I am doubt that it would work, as the parameter name of the generated request could be different with the one required by the 3rd party oauth server.
I would suggest to build the requests matching the 3rd party oauth server specs, and use route via http(s) assertion to send the requests as per the authcode flow.
Regards,
Mark
Original Message:
Sent: 11-07-2019 02:51 AM
From: vamsi garimella
Subject: RetrieveOauthToken Assertion outputs missing parameters
Hello
The back end is Oauth protected with grant_type : authorization_code.
The flow is working fine to get the access token via PostMan. when trying to implement in Layer7/CA PolicyManager its giving the below error.
- mainpart = {String} "{"error_description":"Missing parameters: code redirect_uri","error":"invalid_request"}"
Here is the assertion
Can anyone please advise on this issue.
Thanks