Skip to content
Snippets Groups Projects
  1. Aug 19, 2020
  2. Aug 18, 2020
  3. Aug 14, 2020
  4. Jul 24, 2020
  5. Jul 16, 2020
  6. Jul 15, 2020
    • Timm Fitschen's avatar
      Merge branch 'f-one-time-tokens' into 'dev' · fcc6489c
      Timm Fitschen authored
      f-one-time-tokens -> dev
      
      # Summary
      
      One-time tokens are access tokens which can be used to authenticate and authorize a caosdb client. One-time tokens can be used once to sign in and create a session token for further communication with the server. After that they expire immediately. However, the one-time token if they are not used before a particular date they expire even before anyone has used them at all. Thus, one-time tokens work as if they were one-time passwords with the additional feature that they can specify a set of roles and explicit permissions of the resulting session.
      
      One-time tokens have two major use-cases. The first is the authentication and authorization of sessions by clients (e.g. crawler). They can read out a one-time token that is being written to a file by the server. The authentication token can be fed into the `configure_connection` function of the pylib and the client can authenticate without a password.
      
      The other one is the authentication and authorization of server-side scripts which are triggered by a user who does not necessarily have the permissions that the script needs for it's work. E.g the anonymous user is allowed to use scripts that need some specific update permissions. Effectively, one-time tokens can be used to promote a caller of a server-side script from a unprivileged client to a client with more permissions (for this one session). However, the script calling is encapsulated in such a way, that only the script runs with these promoted permissions. The caller does not gain any more permissions apart from that.
      
      This MR also depends on https://gitlab.com/caosdb/caosdb-server/-/merge_requests/40 and https://gitlab.com/caosdb/caosdb-pylib/-/merge_requests/28
      
      # Focus
      
      The focus should be the new tests in `test_adminstration` which test the usage of one-time tokens in the client (1. use-case) and the new tests in `test_server_side_scripting` which test calling a server-side script as unprivileged user (2. use-case). 
      
      # Test Environment
      
      Just check the pipeline. You will notice, that the server-side scripting tests fail. However, that is due to a missing/wrong pycaosdb.ini in the home directory of the server-side scripting. Relevant for this MR is that the server-side scripts have been called with the correct authtoken, which seems to be the case.
      
      # Check List for the Author
      
      Please, prepare your MR for a review. Be sure to write a summary and a
      focus and create gitlab comments for the reviewer. They should guide the
      reviewer through the changes, explain your changes and also point out open
      questions. For further good practices have a look at [our review
      guidelines](https://gitlab.com/caosdb/caosdb/-/blob/dev/REVIEW_GUIDELINES.md)
      
      - [x] All automated tests pass
      - [x] Reference related Issues
      - [x] Up-to-date CHANGELOG.md
      - [x] Annotations in code (Gitlab comments)
        - Intent of new code
        - Problems with old code
        - Why this implementation?
      
      
      # Check List for the Reviewer
      
      
      - [x] I understand the intent of this MR
      - [ ] All automated tests pass
      - [x] Up-to-date CHANGELOG.md
      - [x] The test environment setup works and the intended behavior is
        reproducible in the test environment
      - [x] In-code documentation and comments are up-to-date.
      - [x] Check: Are there spezifications? Are they satisfied?
      
      For further good practices have a look at [our review guidelines](https://gitlab.com/caosdb/caosdb/-/blob/dev/REVIEW_GUIDELINES.md).
      
      See merge request caosdb/caosdb-pyinttest!29
      fcc6489c
    • Timm Fitschen's avatar
      TST: one-time-token feature · 08881afc
      Timm Fitschen authored
      08881afc
  7. Jul 10, 2020
  8. Jul 02, 2020
  9. Jun 30, 2020
  10. Jun 26, 2020
  11. Jun 18, 2020
  12. Jun 16, 2020
  13. Jun 15, 2020
  14. Jun 09, 2020
  15. May 28, 2020
  16. May 06, 2020
  17. Apr 28, 2020
  18. Apr 24, 2020
  19. Apr 20, 2020
  20. Apr 15, 2020
Loading