Ask Your Question
2

OAuth2 token refresh

asked 2018-10-02 04:40:20 -0600

peter_f gravatar image

updated 2018-10-12 04:03:19 -0600

When using Google OAuth2 in the HTTPClient destination, the pipeline starts failing after the token has reached it's validity.

{ "iss":"removed-stuff", "target_audience":"removed-stuff", "aud":"https://www.googleapis.com/oauth2/v4/token", "exp":${(time:dateTimeToMilliseconds(time:now())/1000) + 50 * MINUTES}, "iat":${time:dateTimeToMilliseconds(time:now())/1000} }

I was expecting that after 50 minutes the client tries to refresh the token before it expires, but that doesn't seem to happen. Even after several hours, just to rule out some timezone mismatch (UTC, Vienna Time Zone), it keeps failing.

After restarting the whole pipeline it starts working again until the token expires again.

Does the HTTPClient support token refresh? Regarding the documentation I was expecting it does.

Version used: 3.4.3

regards Peter

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-10-05 04:41:09 -0600

Alexander gravatar image

updated 2018-10-05 04:44:23 -0600

Hi Peter,

For myself, I could not get the OAuth2.0 feature working for GoogleAdwords, however found a workaround for it, including refreshing the tokens. You can check my answer at my crosspost, maybe it will help you: https://ask.streamsets.com/question/3...

edit flag offensive delete link more

Comments

Hi Alexander, Thank you for sharing the workaround, as I'm using a private API I'm not sure if I can use that 1:1, but I'll figure that out. What really makes me sad is the complete lack of information provided by Streamsets regarding the intended behavior if a refresh should happen.

peter_f gravatar imagepeter_f ( 2018-10-12 04:02:00 -0600 )edit

Hi Alexander, I finally did something similar to your solution, adjusted for Google Id auth of my private endpoints. Very sad that there was no motion in fixing this directly. Marked as solution ... best Peter

peter_f gravatar imagepeter_f ( 2018-10-29 02:01:31 -0600 )edit

Hi Peter, good to hear that the workaround worked for you. .Very sad indeed that the oauth2 authentication is not working as intended :/ Possibly it only works for certain google services

Alexander gravatar imageAlexander ( 2018-10-29 02:45:17 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-10-02 04:40:20 -0600

Seen: 76 times

Last updated: Oct 12