Skip to content

Commit

Permalink
deprecate Azure JWT
Browse files Browse the repository at this point in the history
  • Loading branch information
tomweber-sas committed May 16, 2024
1 parent 06db218 commit 950c1df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions saspy/doc/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,8 @@ them here, as they are mutually exclusive. You use only one of the various means

3) Azure JWT (actually, any JWT perhaps, in the future)

**BEING DEPRECATED - Viya has decided to remove this authentication mechanism for SASPy. In a future release of Viya this will no longer work.**

'jwt' is the key to provide that non-Viya Bearer Token, to then pass through to SASLogon to get the Viya Bearer Token to use.
And these tokens, are just big long strings; thousands of bytes long strings of random characters
(so you know you're passing in the right thing).
Expand Down
1 change: 1 addition & 0 deletions saspy/sasiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ def _authenticate(self, user, pw, authcode, client_id, client_secret, jwt, cv):
d1 = ("grant_type=authorization_code&code="+uauthcode+
"&client_id="+uclient_id+"&client_secret="+uclient_secret).encode(self.encoding)
elif jwt:
logger.warning("BEING DEPRECATED - Viya has decided to remove this authentication mechanism for SASPy. In a future release of Viya this will no longer work.")
ujwt = urllib.parse.quote(jwt)
d1 = "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion="+ujwt
client = "Basic "+base64.encodebytes((client_id+":").encode(self.encoding)).splitlines()[0].decode(self.encoding)
Expand Down

0 comments on commit 950c1df

Please sign in to comment.