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 a CAPTCHA check during registration #460

Merged
merged 73 commits into from
Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
8d1eb8a
Pull in captcha lib
nmattia Nov 12, 2021
e95cef8
wip
nmattia Nov 15, 2021
d569f46
Seed captcha with raw_rand
nmattia Nov 16, 2021
4738a41
wip
nmattia Nov 16, 2021
028f293
Add backend code for generating captcha challenges
nmattia Nov 16, 2021
5de6f18
Add frontend flow for captcha
nmattia Nov 16, 2021
9a7dd24
Remove StaticRng
nmattia Nov 16, 2021
67ba405
Small renaming
nmattia Nov 18, 2021
a60baff
Format ts
nmattia Nov 18, 2021
6bcaccc
Fail to move captcha
nmattia Nov 18, 2021
9747000
Finish moving captcha to confirm screen
nmattia Nov 18, 2021
3f8de9b
Captcha clean up
nmattia Nov 18, 2021
462dbcf
Retry captcha on failure
nmattia Nov 18, 2021
3ebb377
Clean up captcha retry
nmattia Nov 18, 2021
01f19dd
Update backend-test.hs did
nmattia Nov 18, 2021
2de894d
Fix did file
nmattia Nov 18, 2021
8064cd6
Bump haskell-candid and update hs deps
nmattia Nov 18, 2021
e85b421
Fix build issues in backend-tests
nmattia Nov 18, 2021
4b64b7a
Bump GHC version on CI
nmattia Nov 18, 2021
5dc380e
Revert GHC to 884 and fix freeze accordingly
nmattia Nov 19, 2021
038c1fc
Make sure aeson is recent enough
nmattia Nov 19, 2021
02059be
Reset canister randomness before register
nmattia Nov 19, 2021
12a4b1c
Simplify captcha for tests
nmattia Nov 19, 2021
dfaab87
Revert cabal files
nmattia Nov 19, 2021
9f472f3
Use correct webauthPK in backend-tests
nmattia Nov 19, 2021
f2eaa33
Add captcha input in e2e tests
nmattia Nov 19, 2021
32c78db
Show text when captcha didn't work
nmattia Nov 22, 2021
91a4474
Try debugging lost request
nmattia Nov 22, 2021
079c761
Dummy commit to trigger Actions
nmattia Nov 22, 2021
7425146
Run formatter
nmattia Nov 22, 2021
85bb672
Fix backend-tests files
nmattia Nov 22, 2021
385a64e
Try fixing e2e-tests
nmattia Nov 22, 2021
a66d126
Update backend-tests post rebase
nmattia Nov 23, 2021
f20a5ae
Change disabled logic in confirmRegister
nmattia Nov 23, 2021
69aba2f
npm run format
nmattia Nov 23, 2021
37bff2b
Bump captcha waitForEnabled timeout to 10s
nmattia Nov 23, 2021
7c328ca
Disabled e2e tests to populate cache
nmattia Nov 23, 2021
7c3b56e
Re-enable e2e-tests
nmattia Nov 23, 2021
e5b2042
Disable emulator e2e tests
nmattia Nov 23, 2021
82cd547
Add conditional compilation for emulator
nmattia Nov 23, 2021
9ac57ce
Rename captcha feature and use in tests
nmattia Nov 23, 2021
0e84f74
Add conditional USE_DUMMY_CAPTCHA build
nmattia Nov 23, 2021
efd4d6e
Re-enable selenium emulator tests
nmattia Nov 23, 2021
b6f2836
Clean up rust CAPTCHA code
nmattia Nov 23, 2021
330760a
Document dummy_captcha
nmattia Nov 23, 2021
e572ca0
Clean up frontend code
nmattia Nov 23, 2021
bfae49f
Add some TODOs
nmattia Nov 23, 2021
87a6b34
Update lodepng-rust
nmattia Nov 23, 2021
3353904
Clean up backend-tests
nmattia Nov 23, 2021
678f75a
Rename CaptchaResponse
nmattia Nov 23, 2021
d0ee991
Clean up frontend code more
nmattia Nov 23, 2021
4a32f63
Improve CAPTCHA trap messages
nmattia Nov 23, 2021
a9a163f
Move ProofOfWork to create_challenge
nmattia Nov 25, 2021
8a65e6c
Make ChallengeKey a string
nmattia Nov 26, 2021
e982c9e
Show error if captcha is wrong
nmattia Nov 26, 2021
a239453
Remove leftover
nmattia Nov 26, 2021
7e814a2
Return 'BadChallenge' on bad CAPTCHA
nmattia Nov 26, 2021
835d667
Post rebase fix
nmattia Nov 26, 2021
636ad73
Clean up
nmattia Nov 26, 2021
ca3b601
Add about USE_DUMMY_BUILD in backend tests
nmattia Nov 26, 2021
d6b458f
Remove fake comment
nmattia Nov 29, 2021
499cc36
Bump number of inflight challenges to 500
nmattia Nov 29, 2021
1ac9466
Clarify error message
nmattia Nov 29, 2021
e2ea0fc
Remove old logs
nmattia Nov 29, 2021
025d50f
Link to tickets for updating libs
nmattia Nov 29, 2021
e4c4139
Update lodepng-rust
nmattia Nov 29, 2021
e8c3df2
Disable selenium tests to populate GH cache
nmattia Nov 29, 2021
2754e6b
Re-enable tests
nmattia Nov 29, 2021
740cc63
Wait for enabled captchaInput
nmattia Nov 29, 2021
cba2298
Bump CAPTCHA timeout
nmattia Nov 29, 2021
2ad96f7
Clarify USE_DUMMY_CAPTCHA usage
nmattia Nov 30, 2021
8171f11
Request CAPTCHA during Identity creation
nmattia Dec 3, 2021
46de558
Add metric for inflight challenges
nmattia Dec 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1
key: ${{ runner.os }}-cargo-dummy-captcha-${{ hashFiles('**/Cargo.lock') }}-1
nmattia marked this conversation as resolved.
Show resolved Hide resolved

- name: Cache ~/.cabal/store
uses: actions/cache@v2
Expand Down Expand Up @@ -66,7 +66,9 @@ jobs:

- name: Build backend canister
run: |
cargo build --target wasm32-unknown-unknown --release
# we use the dummy_captcha feature which ensures the captcha string
# is always "a"
cargo build --features dummy_captcha --target wasm32-unknown-unknown --release

- name: Run Tests
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/selenium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:
- name: Deploy Internet Identity
run: |
export II_ENV=development
# we use the dummy_captcha feature which ensures the captcha string
# is always "a"
export USE_DUMMY_CAPTCHA=1
dfx deploy --no-wallet --argument '(null)'

- name: Deploy whoami canister
Expand Down
Loading