You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When passed a token generated with jwt.generate_token(...compress = False...), flowapi attempts to decompress roles as a bytestream, causing a 500 error.
Product
Flowapi
Version
Latest
To Reproduce
With the flowapi, flowmachine and flowdb services running:
from flowkit_jwt_generator import jwt
from base64 import b64decode
import datetime
priv_key = b64decode(os.getenv("PRIVATE_JWT_SIGNING_KEY")).decode()
token = jwt.generate_token(
username="TEST_USER",
private_key=priv_key,
lifetime=datetime.timedelta(days=1),
roles={"viewer": ["get_available_dates"]},
compress=False,
flowapi_identifier=os.get_env("FLOWAPI_IDENTIFIER"),
)
import flowclient as fc
import os
fc_conn = fc.connect(
url=os.get_env("FLOWAPI_URL"),
token=token
)
print(fc.get_available_dates(connection=fc_conn))
Expected behavior
fc.get_available_dates should return {} or a response containing dates.
The text was updated successfully, but these errors were encountered:
Describe the bug
When passed a token generated with
jwt.generate_token(...compress = False...)
, flowapi attempts to decompressroles
as a bytestream, causing a 500 error.Product
Flowapi
Version
Latest
To Reproduce
With the flowapi, flowmachine and flowdb services running:
Expected behavior
fc.get_available_dates should return
{}
or a response containing dates.The text was updated successfully, but these errors were encountered: