From 7e5520bfb6beb7bf3854b0122c1f6f2290c1b0a0 Mon Sep 17 00:00:00 2001 From: Eric Pierce Date: Mon, 20 Nov 2023 09:51:36 -0800 Subject: [PATCH] Upgrade to the latest version of the Okta library --- gimme_aws_creds/main.py | 8 ++++---- requirements.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gimme_aws_creds/main.py b/gimme_aws_creds/main.py index a5a1577e..65cc853b 100644 --- a/gimme_aws_creds/main.py +++ b/gimme_aws_creds/main.py @@ -23,8 +23,8 @@ import boto3 import requests from botocore.exceptions import ClientError -from okta.framework.ApiClient import ApiClient -from okta.framework.OktaError import OktaError +from okta.api_client import APIClient +from okta.errors.error import Error as OktaError # local imports from . import errors, ui, version @@ -221,8 +221,8 @@ def _get_aws_account_info(okta_org_url, okta_api_key, username): """ Call the Okta User API and process the results to return just the information we need for gimme_aws_creds""" # We need access to the entire JSON response from the Okta APIs, so we need to - # use the low-level ApiClient instead of UsersClient and AppInstanceClient - users_client = ApiClient(okta_org_url, okta_api_key, pathname='/api/v1/users') + # use the low-level APIClient instead of UsersClient and AppInstanceClient + users_client = APIClient(okta_org_url, okta_api_key, pathname='/api/v1/users') # Get User information try: diff --git a/requirements.txt b/requirements.txt index 7ebe2947..8826a8be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ beautifulsoup4>=4.6.0,<5.0.0 keyring>=21.4.0 requests>=2.25.0,<3.0.0 fido2>=0.9.1,<0.10.0 -okta>=0.0.4,<1.0.0 +okta>=2.9.3,<3.0.0 ctap-keyring-device==1.0.6 pyjwt>=2.4.0,<3.0.0 urllib3>=1.26.0,<2.0.0