Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default_lifetime config value set in yml config is ignored in favour of default value from config.py #96

Open
tomeksabala opened this issue Aug 3, 2021 · 0 comments

Comments

@tomeksabala
Copy link
Contributor

The default_lifetime value set inside giftless.yml file is ignored and Giftless JWT tokens generated by auth.jwt.JWTAuthenticator._generate_token are using default values from giftless.config.py

# my giftless.yml
TRANSFER_ADAPTERS:
  basic:
    factory: giftless.transfer.basic_streaming:factory
    options:
      storage_class: giftless.storage.local_storage:LocalStorage
AUTH_PROVIDERS:
  - factory: giftless.auth.jwt:factory
    options:
      algorithm: RS256
      public_key_file: /jwt_public_key.pem
      default_lifetime: 300  <<<<<<<<<< Custom default lifetime value set
MIDDLEWARE:
  - class: werkzeug.middleware.proxy_fix:ProxyFix
    kwargs:
      x_host: 1
      x_port: 1
      x_prefix: 

I'm quite sure that the yml config is configured properly as the other values are read and used as expected.
Unfortunately I'm not able to create a test showcasing this bug behavior. I have tested that it doesn't work only locally with breakpoints at auth.jwt.JWTAuthenticator._generate_token and by investigating the request being sent to giftless in the browser (verifying jwt tokens expiration dates).

This was checked with latest tag 0.0.5 as well as latest master branch of the repo.

@tomeksabala tomeksabala changed the title default_lifetime config value is ignored in favour of default value from config.py default_lifetime config value set in yml config is ignored in favour of default value from config.py Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant