0

I've set up a webpage to require Google OAuth login via AWS Cognito so I can make AWS calls. I'd like the auth'd user to be able to also kick off a Jenkins job from the same webpage.

Our Jenkins uses Google OAuth as its security type, so theoretically the user already possesses the token needed to talk to Jenkins' API. However, from my understanding by going through Cognito the token is abstracted out to an AWS token rather than the original Google one. Plus, everything I've read online indicates that the only way to kick off builds is via a curl command containing an API token generated for that user via the Jenkins interface.

Am I missing an easy link here for the Jenkins authentication piece? My fallback is to kick off a Lambda that has stored "bot" credentials for Jenkins, but I'd rather each user was unique rather than one generic bot user. I just can't see how to build jobs using whatever credentials I can scrounge off the Google OAuth request or the Cognito one.

Also to any mod reading this I think this could use more tags, but I couldn't find any OAuth ones.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.