Skip to content

Commit

Permalink
Upgrade to 1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-xhuang authored Oct 21, 2022
2 parents fcb65fa + 1f353a6 commit 80cc3d3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include *.rst
include LICENSE
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ A 2048-bit RSA key pair
-----------------------
Snowflake Authentication for the Ingest Service requires creating a 2048 bit
RSA key pair and, registering the public key with Snowflake. For detailed instructions,
please visit the relevant `Snowflake Documentation Page <docs.snowflake.net>`_.
please visit the relevant `Snowflake Documentation Page <https://docs.snowflake.com/en/user-guide/authentication.html>`_.


Furl, PyJWT, Requests, and Cryptography
---------------------------------------

Internally, the Snowflake Ingest SDK makes use of `Furl <https://github.com/gruns/furl>`_,
`PyJWT <https://github.com/jpadilla/pyjwt>`_, and `Requests <http://docs.python-requests.org/en/master/>`_.
In addition, the `cryptography <https://cryptography.io/en/latest/>`_ is used with PyJWT to sign JWT tokens.
`PyJWT <https://github.com/jpadilla/pyjwt>`_, and `Requests <https://github.com/psf/requests>`_.
In addition, the `cryptography <https://github.com/pyca/cryptography>`_ is used with PyJWT to sign JWT tokens.


Installation
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
# We need to know the version to backfill some dependencies
from sys import version_info, exit
# Define our list of installation dependencies
DEPENDS = ["pyjwt<2.0.0",
DEPENDS = ["pyjwt",
"snowflake-connector-python>=2.2.7",
"furl",
"furl",
"cryptography",
"requests<2.24.0"]
"requests<=2.28.1"]

# If we're at version less than 3.4 - fail
if version_info[0] < 3 or version_info[1] < 4:
Expand Down
1 change: 1 addition & 0 deletions snowflake/ingest/utils/network.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# import python connector to inject ocsp check method into requests library
import snowflake.connector
import requests
from requests import Response
Expand Down
2 changes: 1 addition & 1 deletion snowflake/ingest/utils/tokentools.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_token(self) -> Text:
self.token = jwt.encode(payload, self.private_key, algorithm=SecurityManager.ALGORITHM)
logger.info("New Token created")

return self.token.decode('utf-8')
return self.token.decode('utf-8') if isinstance(self.token, bytes) else self.token

def calculate_public_key_fingerprint(self, private_key: Text) -> Text:
"""
Expand Down
2 changes: 1 addition & 1 deletion snowflake/ingest/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Copyright (c) 2012-2020 Snowflake Computing Inc. All rights reserved.
# Update this for the versions
__version__ = '1.0.4'
__version__ = '1.0.5'

0 comments on commit 80cc3d3

Please sign in to comment.