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

Add WebAuthn support to GUI #9175

Draft
wants to merge 93 commits into
base: main
Choose a base branch
from
Draft

Add WebAuthn support to GUI #9175

wants to merge 93 commits into from

Commits on Oct 15, 2023

  1. Fix indentation

    emlun committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    1b5dd84 View commit details
    Browse the repository at this point in the history
  2. Allow unsetting password

    emlun committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    8a51efe View commit details
    Browse the repository at this point in the history
  3. Add WebAuthn authentication

    emlun committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    7f17953 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    40274e7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d965882 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    eb2d616 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6c66916 View commit details
    Browse the repository at this point in the history
  8. Remove unnecessary argument

    emlun committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    47ba3fd View commit details
    Browse the repository at this point in the history
  9. Extract function webauthnReady

    emlun committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    86fd758 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1ac6ce9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a0b8407 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5eeae91 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    39699c3 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    648554e View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    de3f323 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    c6757e7 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    9e7a8d3 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    abbeaa2 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    f4a0d6f View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    530cb4a View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    42fc63b View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    a643041 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    cbf2fd1 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2023

  1. Configuration menu
    Copy the full SHA
    1c131a3 View commit details
    Browse the repository at this point in the history
  2. 2 Configuration menu
    Copy the full SHA
    1c5e4ba View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2023

  1. Remove isNamespacedTranslationId heuristic

    Instead, apply the namespace separation only if the ID is set explicitly rather
    than inferred to equal the value.
    emlun committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    384a514 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    832849d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    909fdb9 View commit details
    Browse the repository at this point in the history
  4. Omit WebAuthn Credentials from advanced settings

    Since this is an object structure, rather than a comma-separated list of
    strings, it's shown in the Advanced Settings as "[Object object]". Of course,
    any attempt to edit this value makes the config fail to parse when saved.
    emlun committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    782ba88 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3d04e78 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    99690e7 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2023

  1. Configuration menu
    Copy the full SHA
    22b5b2e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2dc0046 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bfda3e3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    400ef34 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8c3564a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2d16cfa View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. Configuration menu
    Copy the full SHA
    6cd22b5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9135b7d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4da0eba View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f3d8182 View commit details
    Browse the repository at this point in the history
  5. Remove redundant comment

    Array.filter is already used elsewhere in the file.
    emlun committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    353d1cf View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2024

  1. Extract session store

    This will make it easier to merge main into the `webauthn` branch (PR syncthing#9175), as
    there are about to be several services and API handlers that read and set
    cookies and session state.
    emlun committed Feb 18, 2024
    Configuration menu
    Copy the full SHA
    cb1ca3c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4da8a10 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6c8e0af View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a61d08a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fab687c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c63b9a8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e9c95a1 View commit details
    Browse the repository at this point in the history
  8. gofmt -w -s lib/

    emlun committed Feb 18, 2024
    Configuration menu
    Copy the full SHA
    85e4b3c View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2024

  1. Configuration menu
    Copy the full SHA
    0871890 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    442f78f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    65f2612 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    785b876 View commit details
    Browse the repository at this point in the history
  5. gofmt -w -s lib/

    emlun committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    b2b9428 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    db6a0f6 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2024

  1. Configuration menu
    Copy the full SHA
    b671a9a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    01b8d76 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2024

  1. Fix TestConfigChanges

    emlun committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    ae15072 View commit details
    Browse the repository at this point in the history
  2. Deep-copy WebauthnCredential

    emlun committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    551918d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ac8a48c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    774f1f9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2fe6f04 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bcd8b7a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2ae7bf2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b41da4e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e6505e7 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2024

  1. Configuration menu
    Copy the full SHA
    fc778e8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3110830 View commit details
    Browse the repository at this point in the history
  3. Fix DeepSource lint

    - Value assigned to a variable is never read before being overwritten:
      https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/SCC-SA4006?listindex=0
    
    - Inappropriate usage of t.Parallel() method:
      https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/GO-W6007?listindex=1
    
    - Found time.Now().Sub(t) instead of time.Since(t)
      https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/SCC-S1012?listindex=2
    
    - Unsupported argument to functions in encoding/binary
      https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/SCC-SA1003?listindex=3
    
    - Unused code
      https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/SCC-U1000?listindex=4
    
    - Empty string test can be improved
      https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/CRT-A0004?listindex=6
    
    - Unused method receiver
      https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/RVV-B0013?listindex=8
    
    - Method modifies receiver
      https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/RVV-B0006?listindex=9
    
    - Type "WebauthnCredential" has both value and pointer receivers
      https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/GO-W1029?listindex=10
    
    - Unused parameter in function
      https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/RVV-B0012?listindex=11
    
    - Use %q to quote a string in fmt.Sprintf format specifiers
      https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/GO-R4002?listindex=12
    emlun committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    9201aee View commit details
    Browse the repository at this point in the history
  4. Extract test helpers

    Hopefully fixes DeepSource lint: `func TestWebauthnRegistration has a
    cyclomatic complexity of 38 with "very-high" risk`
    
    https://app.deepsource.com/gh/syncthing/syncthing/run/20c38634-2a03-43a5-b47d-da9564205a82/go/GO-R1005?listindex=13
    emlun committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    7775b04 View commit details
    Browse the repository at this point in the history
  5. fixup! Extract test helpers

    emlun committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    57fea60 View commit details
    Browse the repository at this point in the history
  6. Remove commented-out code

    emlun committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    984ca37 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9ce6562 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a6f0d41 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1057fd6 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    3251370 View commit details
    Browse the repository at this point in the history
  11. Remove commented-out code

    emlun committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    9c00ab7 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2024

  1. Configuration menu
    Copy the full SHA
    1ef0656 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8851819 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    689f3c5 View commit details
    Browse the repository at this point in the history
  4. Don't use slices.Concat yet

    emlun committed Apr 14, 2024
    Configuration menu
    Copy the full SHA
    796e90a View commit details
    Browse the repository at this point in the history
  5. Change test value

    emlun committed Apr 14, 2024
    Configuration menu
    Copy the full SHA
    462238a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0e2c0b2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b5c4142 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    78a72a1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2c747b4 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2024

  1. Configuration menu
    Copy the full SHA
    ba8668e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e477ba3 View commit details
    Browse the repository at this point in the history
  3. Add missing t.Parallel() calls

    emlun committed May 12, 2024
    Configuration menu
    Copy the full SHA
    e841612 View commit details
    Browse the repository at this point in the history
  4. Make shutdown timeout configurable for tests

    TestWebauthnConfigChanges seems to need a longer shutdown timeout when running
    on GitHub Actions. The problem manifests in errors like this:
    
    ```
    2024-05-05T17:00:45.0503602Z     api_test.go:2919: TestWebauthnConfigChanges/Can_edit_GUIConfiguration.WebauthnUserId Put "http://127.0.0.1:37585/rest/config/gui": EOF []
    2024-05-05T17:00:45.0566336Z --- FAIL: TestWebauthnConfigChanges/Can_edit_GUIConfiguration.WebauthnUserId (0.52s)
    ```
    
    indicating that the server was forcefully shut down (or panicked, but that was
    ruled out in these cases) before the request was fully written.
    emlun committed May 12, 2024
    Configuration menu
    Copy the full SHA
    7ed2db8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    961720f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b5d3767 View commit details
    Browse the repository at this point in the history