diff --git a/gimme_aws_creds/main.py b/gimme_aws_creds/main.py index f28abc6..b110602 100644 --- a/gimme_aws_creds/main.py +++ b/gimme_aws_creds/main.py @@ -17,6 +17,7 @@ import os import re import sys +import platform import concurrent.futures # extras @@ -510,7 +511,7 @@ def okta_platform(self): self.okta_org_url + '/.well-known/okta-organization', headers={ 'Accept': 'application/json', - 'User-Agent': "gimme-aws-creds {}".format(version) + 'User-Agent': "gimme-aws-creds {};{};{}".format(version, sys.platform, platform.python_version()) }, timeout=30 ) diff --git a/gimme_aws_creds/okta_classic.py b/gimme_aws_creds/okta_classic.py index 6520d3c..420e069 100644 --- a/gimme_aws_creds/okta_classic.py +++ b/gimme_aws_creds/okta_classic.py @@ -11,6 +11,7 @@ """ import base64 import sys +import platform import copy import re import socket @@ -292,7 +293,7 @@ def auth_oauth(self, client_id, **kwargs): def _get_headers(): """sets the default headers""" headers = { - 'User-Agent': "gimme-aws-creds {}".format(version), + 'User-Agent': "gimme-aws-creds {};{};{}".format(version, sys.platform, platform.python_version()), 'Accept': 'application/json', 'Content-Type': 'application/json', } diff --git a/gimme_aws_creds/okta_identity_engine.py b/gimme_aws_creds/okta_identity_engine.py index 08f025d..af0a9d2 100644 --- a/gimme_aws_creds/okta_identity_engine.py +++ b/gimme_aws_creds/okta_identity_engine.py @@ -9,6 +9,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and* limitations under the License.* """ +import platform import time import webbrowser import jwt @@ -200,7 +201,7 @@ def get_saml_response(self, url, auth_session): def _get_headers(): """sets the default headers""" headers = { - 'User-Agent': "gimme-aws-creds {}".format(version), + 'User-Agent': "gimme-aws-creds {};{};{}".format(version, sys.platform, platform.python_version()), 'Accept': 'application/json' } return headers