Sample Python Script to authenticate with Okta SSO account

Has anyone tried to use the Jira rest api in python to authenticate into Jira not using Basic authorization but Oath.    

We had a script that worked with Basic Authentication but our company now is using Okta.    I am curious what flow others use to authenticate against Jira when they have 2 Form Authentication enable using Okta.   For testing i can use my own account.   

When logging in for the first time Okta asks me for password then asks me a security question, then i can get into Jira.   

Do i need to get an Okta Cookie Token then pass that to Jira Oath with my user name joe@company.com ?   

 

 

1 answer

0 votes
Bruno Vincent Community Champion Jan 28, 2018

Hi @Joe Vallejo

I assume you are using Jira server, not Jira Cloud. Your best option is to keep on using Basic Authentication with specific service accounts and/or from dedicated IP addresses. Okta's Authenticator actually provides optional settings to prevent authentication with SAML for users with specific IP addresses or with specific usernames: http://saml-doc.okta.com/Provisioning_Docs/Okta_Jira_Authenticator_Configuration_Guide.html#moreconfig

If my assumption was wrong and you use Jira Cloud, then you need to create API tokens for your scripts: https://confluence.atlassian.com/cloud/api-tokens-938839638.html

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,849 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot