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

feat: improved user auth tokens #68148

Merged
merged 17 commits into from
Apr 17, 2024
Merged

feat: improved user auth tokens #68148

merged 17 commits into from
Apr 17, 2024

Commits on Apr 17, 2024

  1. feat: improved user auth tokens

    mdtro committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    a995b95 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c9f1ce1 View commit details
    Browse the repository at this point in the history
  3. remove duplicate code

    mdtro committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    696c845 View commit details
    Browse the repository at this point in the history
  4. fix test

    mdtro committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    fef4018 View commit details
    Browse the repository at this point in the history
  5. overload update method

    mdtro committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    c68c59d View commit details
    Browse the repository at this point in the history
  6. ref: revamp read-once tokens

    mdtro committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    43fa3ce View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ed60490 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2255c62 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6516671 View commit details
    Browse the repository at this point in the history
  10. fix typing

    mdtro committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    67e87d0 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6ceabf8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    54abc5d View commit details
    Browse the repository at this point in the history
  13. simplify exception classes

    mdtro committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    fd768b7 View commit details
    Browse the repository at this point in the history
  14. ref: read-once logic on apitoken

    - Setting the plaintext values on the manager class is wrong and would
    cause issues when creating multiple instances of ApiToken.
      - it results in the plaintext value always being the latest instance
        of ApiToken that was created
      - moving this to the model fixes the issue
    - introduce setter functions for the plaintext token values
    - add docstrings
    - remove leading `_` on property functions that return the the plaintext
    token values
    - after reading, set the token to string value stored in `TOKEN_REDACTED` so
    it can still be printed and we can search for the string in log data
    where accidental leaks may happen
      - we still throw `PlaintextSecretAlreadyRead` when attempting to read
        the value more than once
    mdtro committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    d5057c6 View commit details
    Browse the repository at this point in the history
  15. mypy fix and test fixes

    - update tests to access correct property
    - ignore typing error
    mdtro committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    7f8b9da View commit details
    Browse the repository at this point in the history
  16. add type hints

    mdtro committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    ac3e130 View commit details
    Browse the repository at this point in the history
  17. regenerate backup snapshot

    mdtro committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    42bb344 View commit details
    Browse the repository at this point in the history