What's the proper REST flow for SAML auth with CSRF enabled?

14 views
Skip to first unread message

Rauha Rahkola

unread,
Apr 16, 2018, 1:21:31 PM4/16/18
to Jenkins Users
My Jenkins instance has SAML configured with Okta and also has CSRF protection enabled.  Currently I am able to authenticate with SAML via the Jenkins GUI.  However, I have a service user which communicates via the REST API and I have not stepped into the correct flow which allows this user (which has a valid SAML assertion) to finish the login sequence with Jenkins without a separate means of authentication (user:password or user:apiToken).  What is the proper sequence to authenticate via the REST API when I have SAML and CSRF configured?

Thanks!
Rauha

Ivan Fernandez Calvo

unread,
Apr 17, 2018, 1:43:06 PM4/17/18
to Jenkins Users
Hi,

If you want to make an API REST call you only need the API Token and a valid crumb, the user will be granted with the latest authorities from the last login, you have more details in the following link https://wiki.jenkins.io/display/JENKINS/Remote+access+API

Reply all
Reply to author
Forward
0 new messages