Commit Graph

79 Commits

Author SHA1 Message Date
Matt Jankowski
202077517c
Add "search" group for chewy classes in simplecov config (#31890) 2024-09-12 20:09:55 +00:00
Matt Jankowski
19849eb91d
Skip paperclip spoof detector unless opted into attachment processing specs (#31454) 2024-09-03 15:39:19 +00:00
Matt Jankowski
69dbc23038
Only enable chewy in search-tagged specs (#30583) 2024-09-03 15:38:38 +00:00
Matt Jankowski
928390c2ba
Convert admin/settings controller specs to system specs (#31548) 2024-09-03 15:29:32 +00:00
Matt Jankowski
ef4920c6c9
Pull out https/hostname setup for request specs to shared config (#31622) 2024-09-03 15:28:57 +00:00
David Roetzel
388d5473e1
Refactor (ruby) redis configuration (#31694) 2024-09-02 14:19:55 +00:00
Matt Jankowski
bcc4b1078c
Fix Rails/RootPathnameMethods cop (#31582) 2024-08-26 07:35:07 +00:00
Matt Jankowski
848b59c8ae
Reduce factory creation in MediaAttachment model spec (#31058) 2024-07-18 15:23:46 +00:00
Matt Jankowski
f1300ad284
Rename jobs/attachments rspec tag names (#29762) 2024-07-08 16:01:08 +00:00
Matt Jankowski
6beead3867
Move simplecov config into rails_helper (#30302) 2024-05-15 09:33:36 +00:00
Matt Jankowski
0d397db5dd
Consolidate system specs into single directory, use rspec tags for configuration (#30206) 2024-05-10 12:36:09 +00:00
Matt Jankowski
3eaac3af73
Use before_all block to setup requests/cache_spec data (#29437) 2024-03-13 08:38:57 +00:00
Matt Jankowski
64f9939e39
Use capture_emails helper to improve email assertions in specs (#29245) 2024-02-19 15:57:47 +00:00
Matt Jankowski
95da28d201
Add common ThreadingHelper module for specs (#29116) 2024-02-07 14:53:29 +00:00
Matt Jankowski
577520b637
Replace deprecated Sidekiq::Testing block style (#29097) 2024-02-06 12:49:48 +00:00
Matt Jankowski
4e08a4892f
Move streaming around config into manager class (#28684) 2024-01-11 10:54:42 +00:00
Matt Jankowski
8422b8ded0
Extract capybara config and improve headless_chrome driver config (#28681) 2024-01-10 14:54:11 +00:00
Matt Jankowski
00341c70ff
Use Sidekiq fake! instead of inline! in specs (#25369) 2024-01-10 11:06:58 +00:00
Claire
6ad0fb5a77
Fix NULL MX handling and tighten DNS resolving specs (#28607) 2024-01-05 11:07:57 +00:00
Matt Jankowski
e6e217fedd
Clean up tagged_with_* Status specs, fix RSpec/LetSetup cop (#28462) 2023-12-22 08:32:27 +00:00
Matt Jankowski
8a3d8c6c14
Remove the stub_stdout wrapper around CLI specs (#28340) 2023-12-13 10:14:19 +00:00
Matt Jankowski
ad34d33bfd
Formalize some patterns in cli specs (#28255) 2023-12-07 13:49:14 +00:00
Matt Jankowski
973597c6f1
Consolidate configuration of Sidekiq::Testing.fake! setup (#28046) 2023-11-23 09:43:43 +00:00
Matt Jankowski
67fd3187b3
Update rspec fixture path config to silence deprecation warning (#28018) 2023-11-21 15:51:40 +00:00
Matt Jankowski
e892efbc40
Configure elastic search integration with rspec tag (#27882) 2023-11-17 11:52:20 +00:00
Matt Jankowski
549e8e7baf
Add email_spec and speedup/cleanup to spec/mailers (#27902) 2023-11-17 09:50:19 +00:00
Matt Jankowski
b05575e242
Move RSpec config for streaming/search managers to be near classes (#27761) 2023-11-08 13:04:17 +00:00
Matt Jankowski
b06284c572
Fix RSpec/HookArgument cop (#27747) 2023-11-07 09:10:36 +00:00
Matt Jankowski
f8afa0f614
Remove unused stub json ld context (#25454) 2023-10-16 15:38:27 +02:00
Matt Jankowski
00e92b4038
Add coverage for CLI::Statuses command (#25321) 2023-10-16 15:37:22 +02:00
Matt Jankowski
abf0e1fa39
Move SignedReqestHelpers rspec config to separate file (#25453) 2023-10-13 15:19:40 +02:00
jsgoldstein
4d9186a48c
Add search tests (#26703) 2023-09-08 16:17:55 +02:00
Matt Jankowski
7581b1ff96
Profiling tools configuration improvement (#25383) 2023-07-28 23:16:23 +02:00
Renaud Chaput
4d1b67f664
Add end-to-end (system) tests (#25461) 2023-07-28 23:09:49 +02:00
Matt Jankowski
07933db788
Add coverage for CLI::Cache command (#25238) 2023-06-10 18:36:09 +02:00
Matt Jankowski
c94bb9ba9a
Disable paperclip processing in specs (#25359) 2023-06-10 18:27:35 +02:00
Matt Jankowski
b0104e4c33
Silence output to stdout during cli specs (#25211) 2023-05-31 20:01:11 +02:00
Nick Schonning
1fe04f740a
Enable Rubocop Rails/FilePath (#23854) 2023-05-04 05:50:40 +02:00
Claire
1eb51bd749
Add request specs for caching behavior (#24592) 2023-05-02 13:58:29 +02:00
Matt Jankowski
91a8cd21d8
React component helper specs (#24072) 2023-04-26 18:21:32 +02:00
Claire
f45961aa98
Add feature test for OAuth access grant (#24624) 2023-04-24 19:06:58 +02:00
Matt Jankowski
1ed12d5e2f
Add basic search specs for chewy indexes (#24065) 2023-03-10 19:31:10 +01:00
Nick Schonning
8fd3fc404d
Autofix Rubocop Rails/RootPathnameMethods (#23760) 2023-02-22 09:57:15 +09:00
Nick Schonning
84cc805cae
Enable Style/FrozenStringLiteralComment for specs (#23790) 2023-02-22 09:55:31 +09:00
Nick Schonning
81ad6c2e39
Autofix Rubocop Style/StringLiterals (#23695) 2023-02-19 07:38:14 +09:00
Nick Schonning
d65b2c1924
Apply Rubocop Style/RedundantConstantBase (#23463) 2023-02-18 04:30:03 +01:00
Nick Schonning
1487fcde93
Apply Rubocop Style/ExpandPathArguments (#23450) 2023-02-08 07:06:20 +01:00
Eugen Rochko
3917353645
Fix single Redis connection being used across all threads (#18135)
* Fix single Redis connection being used across all Sidekiq threads

* Fix tests
2022-04-28 17:47:34 +02:00
Eugen Rochko
ddbe906c25
Fix not updating a status when newer version is fetched manually (#17745) 2022-03-12 09:11:36 +01:00
santiagorodriguez96
e8d41bc2fe
Add WebAuthn as an alternative 2FA method (#14466)
* feat: add possibility of adding WebAuthn security keys to use as 2FA

This adds a basic UI for enabling WebAuthn 2FA. We did a little refactor
to the Settings page for editing the 2FA methods – now it will list the
methods that are available to the user (TOTP and WebAuthn) and from
there they'll be able to add or remove any of them.
Also, it's worth mentioning that for enabling WebAuthn it's required to
have TOTP enabled, so the first time that you go to the 2FA Settings
page, you'll be asked to set it up.
This work was inspired by the one donde by Github in their platform, and
despite it could be approached in different ways, we decided to go with
this one given that we feel that this gives a great UX.

Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>

* feat: add request for WebAuthn as second factor at login if enabled

This commits adds the feature for using WebAuthn as a second factor for
login when enabled.
If users have WebAuthn enabled, now a page requesting for the use of a
WebAuthn credential for log in will appear, although a link redirecting
to the old page for logging in using a two-factor code will also be
present.

Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>

* feat: add possibility of deleting WebAuthn Credentials

Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>

* feat: disable WebAuthn when an Admin disables 2FA for a user

Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>

* feat: remove ability to disable TOTP leaving only WebAuthn as 2FA

Following examples form other platforms like Github, we decided to make
Webauthn 2FA secondary to 2FA with TOTP, so that we removed the
possibility of removing TOTP authentication only, leaving users with
just WEbAuthn as 2FA. Instead, users will have to click on 'Disable 2FA'
in order to remove second factor auth.
The reason for WebAuthn being secondary to TOPT is that in that way,
users will still be able to log in using their code from their phone's
application if they don't have their security keys with them – or maybe
even lost them.

* We had to change a little the flow for setting up TOTP, given that now
  it's possible to setting up again if you already had TOTP, in order to
  let users modify their authenticator app – given that now it's not
  possible for them to disable TOTP and set it up again with another
  authenticator app.
  So, basically, now instead of storing the new `otp_secret` in the
  user, we store it in the session until the process of set up is
  finished.
  This was because, as it was before, when users clicked on 'Edit' in
  the new two-factor methods lists page, but then went back without
  finishing the flow, their `otp_secret` had been changed therefore
  invalidating their previous authenticator app, making them unable to
  log in again using TOTP.

Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>

* refactor: fix eslint errors

The PR build was failing given that linting returning some errors.
This commit attempts to fix them.

* refactor: normalize i18n translations

The build was failing given that i18n translations files were not
normalized.
This commits fixes that.

* refactor: avoid having the webauthn gem locked to a specific version

* refactor: use symbols for routes without '/'

* refactor: avoid sending webauthn disabled email when 2FA is disabled

When an admins disable 2FA for users, we were sending two mails
to them, one notifying that 2FA was disabled and the other to notify
that WebAuthn was disabled.
As the second one is redundant since the first email includes it, we can
remove it and send just one email to users.

* refactor: avoid creating new env variable for webauthn_origin config

* refactor: improve flash error messages for webauthn pages

Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>
2020-08-24 16:46:27 +02:00