-
Notifications
You must be signed in to change notification settings - Fork 34
Anonymous credentials draft endpoints #1016
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
Draft
LDiazN
wants to merge
71
commits into
master
Choose a base branch
from
userauth-dep
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
2d81a8a
Fix capitalization in dockerfile
LDiazN e6c5fdc
Clone userauth repo into include dir
LDiazN 294af32
Add ooniauth-py as dependency
LDiazN 6754df8
Remove unused imports
LDiazN 42b5ec5
Add server state model for anonymous credentials
LDiazN 7c11874
remove unnecessary pass
LDiazN 0970cb5
Add utility functions to work with protocol objects
LDiazN c97f3ba
Add initialization of server state table
LDiazN 950cbe3
Add manifest endpoint
LDiazN a9990ed
Fix error with postgres dep
LDiazN 94a7936
Init server state dep in tests
LDiazN bcffac5
fix bare except
LDiazN 7b602c2
remove unused import
LDiazN 50e0c47
Add test file for anonymous credentials
LDiazN ad14987
Add register endpoint for anonymous credentials
LDiazN d286c76
Add test for credential sign request
LDiazN bfb5600
Add line to check if user is able to verify credential
LDiazN f582c8f
Improve error reporting
LDiazN db5763a
Add test for not found error
LDiazN f06ce42
Add test for protocol error
LDiazN 08413d7
Add test for bad serialization
LDiazN 75eead1
Refactor to share metrics to the entire module
LDiazN ddf860a
Creating manifest table
LDiazN 2baff84
Added foreign key to server state to fetch keys
LDiazN 4dd14be
Change register endpoint to use manifest version
LDiazN 9810800
Use new manifest style in endpoints
LDiazN 355e059
Use extra fields in measurement submission
LDiazN b9b9250
Testing measurement submission
LDiazN cff7f32
Improve testing of measurement submission
LDiazN ec63895
Fix broken test
LDiazN 6c667f0
Fix broken tests
LDiazN 985e89a
Fix bad fiture downgrade
LDiazN 4328d27
Add anonymous credentials related data to fastpath
LDiazN f93131a
Merge branch 'master' into userauth-dep
LDiazN 28cb8e0
fix broken tests
LDiazN 3b3bfb2
Add fastpath migration to oonimeasurements tests
LDiazN e0f4432
refactor to_http_exception
LDiazN 5b12744
Add new ooniauth dependency url
LDiazN f895dc8
Add anonymous creentials columns to ooniprobe test schema
LDiazN e7336cb
Use alter table instead of directly changing the table
LDiazN ca7e93d
Inline compression ratio; rename s_or_n to serialize_optional
LDiazN 536e774
Add error message to info log
LDiazN c40e14b
Add error message to info log
LDiazN 5deb275
Add utility functions for testing in ooniprobe
LDiazN 98f0025
Merge conflict
LDiazN cb52441
Add utils file for tests
LDiazN 0e0648e
Add better docstrings
LDiazN e315218
Add better docstrings
LDiazN d06e830
Add initial version of credential update endpoints
LDiazN 5fccf4a
Adding tests for credential update
LDiazN a8519a2
Fix bad error message
LDiazN 15ef04a
Add simple credential update test
LDiazN b8a3d9f
Refactor to move fixtures to conftest
LDiazN 1ffd959
Remove unused import
LDiazN c2f4e16
Add test with full workflow
LDiazN bc3069f
Merge branch 'master' into userauth-dep
LDiazN 4657422
Black reformat
LDiazN 49d15f5
Read manifest from s3 instead of from database
LDiazN 22f51fa
Fix age calculation of old cache
LDiazN 7874176
Add script to generate new server state
LDiazN 503d86b
Refactor manifest fetch
LDiazN 6737cb8
Remove unused postgres models
LDiazN 89e5f5d
Add anonymous credentials parameters to health check
LDiazN c481f81
Remove unnecessary migration
LDiazN 8ed162e
Fix broken tests
LDiazN ecf8cdd
Fix broken test
LDiazN 9619a98
Add cached version of manifest fetch function
LDiazN 499c504
Make script executable
LDiazN 2cb0097
Update fastpath changelog
LDiazN 3500451
Trigger ci
LDiazN 924a16d
Tag anonc version of submit measurement
LDiazN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/usr/bin/env python3 | ||
|
|
||
| """ | ||
| Use this script to generate a new server state for the anonymous credentials protocol | ||
|
|
||
| Two Keys will be generated: | ||
|
|
||
| - Secret key: Save it in parameter store as a secret string, do not share it | ||
| - Public parameters: A string that will be shared with probes to run the ZKP verification | ||
|
|
||
| """ | ||
|
|
||
| import ooniauth_py | ||
|
|
||
| state = ooniauth_py.ServerState() | ||
|
|
||
| secret_key = state.get_secret_key() | ||
| public_params = state.get_public_parameters() | ||
|
|
||
| print( | ||
| f""" | ||
| Secret Key: | ||
|
|
||
| {secret_key} | ||
|
|
||
| Public Parameters: | ||
|
|
||
| {public_params} | ||
| """) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.