Граф коммитов

137 Коммитов

Автор SHA1 Сообщение Дата
John Morgan eb26b45446
#235 - rotate key to explicit placeholder (#236) 2023-08-02 17:11:37 -04:00
Lee Richardson 70ad6144b0
📫 #222 postman election tests (#225)
* Add requests through election creation

* close key ceremony
* create manifest
* create context
* create election

* Prefix and convert variables to environment and make consistent

* upload ballots, refactor key-name to var

* Refactor rename key-name

* Fix broken tests

* Run tally, extract user1id and user2id to vars
2022-03-29 13:24:05 -04:00
Lee Richardson 8a53797d9e
📫 #221 Postman Collection Tests for Election Ceremony (#224)
* Add new collection with login and create user steps

* Create a local environment teams can import

* Extract credentials

* Create key ceremony and guardians

* Complete all key ceremony steps

* Add test assert statements to each request
2022-03-23 16:26:12 -04:00
Lee Richardson 38c9c95c06
🪲 Bug #219 tally fixup (#220)
* Logging and bug fixes

* Upgrade electionguard from 1.2.2 to 1.2.3

* Fix ballot submission from Any to Dto per PR feedback in #138
2022-03-14 16:31:20 -04:00
Steve Maier b80ff2e590
Removed old port number from settings (#218) 2022-03-08 11:13:42 -05:00
Lee Richardson 16ee505396
🗳️ list elections with ballots (#217)
* add endpoint to get list election summary

* Require authentication for election endpoints

* Return name of election from manifest

* Show state as description

* Update postman

* Sort reverse chronologically

* Fix linting

* Fix tests

* PR Feedback
2022-03-07 10:38:26 -05:00
Lee Richardson 56351b0d72
🗳️ fix ballot upload (#212)
* fix naming

* Start a ballotsubmit2 with real params to replace the old Any based one

* Validate ballots in submit2

* Implement logging

* Validate ballots, add logging

* implement nonce and timestamp

* Implemented most of ContestDto

* Implement proof

* Implement most of ballot selection

* Implement proof

* Implemented extended data

* Convert types to support latest sample data

* Remove old submit

* Add a sample ballot json payload that nearly works to upload

* Fix formatting of manifest.json

* Simplify manifest

Also I think the old manifest was not what's actually in the system

* Simplified manifest

* Simplify ballot.json

* This ballot passes validation

* Fix ballot encryption

* Better ballot logging

* Fix error with submitting ballot when one doesn't exist

* Fix linting errors

* Fix linting errors

* Fix failing tests

* Fix more linting errors

* PR review feedback

* Little more clean up of the any objects

* Typo per PR

* Simplify logger file per PR

* Add auth to ballot endpoints

* Default the state to cast not spoiled

* Moved test data files into tests folder

* Simplified logging config per PR
2022-03-03 11:06:54 -05:00
Lee Richardson 1a32140cce
👤 User retrieval (#205)
* Add POST /user/find endpoint

* Update postman

- add find users
- fix create user
- add find key ceremony

* Specify create user response model

- change API to `PUT /user` from `POST /user/create`

* Add first and last name to users

* Fix bug with settings being injected into UserScope API's

* Fix /user/me not working

* Require auth for search users

* Fix postman with latest API changes
2022-02-10 08:56:14 -05:00
Lee Richardson d9062674bd
✉️ Context serialization (#201)
* Rename CiphertextElectionContext to CiphertextElectionContextDto

* Serialize election conext correctly

* Refactoring for better var and method names

* Better error messages

* Better naming per PR

* Move exception handling to higher level

* Move type mapping to different file

* Support hex int's

* Fix linting errors

* Fix type error

* Better error messages per PR

* More PR Feedback

Type mapper now accepts a Union[int, str]

* Implement final PR review comments
2022-02-04 14:19:50 -05:00
Lee Richardson 2faba34c6f
Update swagger meta-data for the context object for creating an election (#198)
* Update swagger meta-data for context for creating an election

* Fix compiler error
2022-02-02 10:53:36 -05:00
Lee Richardson 06ffeb0df5
Nswag Support (#197)
* Fix CORS to match UI

* Show error details in logs for election endpoints

* Exclude auth endpoint duplication in 1.1

* 1.1 causes errors in nswag, so replacing it with 1_1

* Document the 401 and 404 auth responses for swagger

* Fix linting error
2022-01-19 10:02:14 -05:00
Lee Richardson 3ec30c7795
API V1.1 (#194)
* fix typo

* Adds support for a V2 of the API

More specifically creates a single endpoint at PUT api/v2/election that doesn't currently do anything, but the routes are all there for more easily fleshing out #178

* Fix failing integration tests

* Rename folder to v1_1 per PR Feedback

* Rename the new endpoints from v2 to v1.1 per PR feedback

* Fix unused imports

Co-authored-by: Keith Fung <keithrfung@users.noreply.github.com>
2022-01-17 11:28:52 -05:00
Steve Maier eafce325ae
Changed the default admin password to a message to the devs (#195)
Added comments that this will be changing
2022-01-10 10:59:13 -05:00
Lee Richardson cbc7cc57b4
🐛 #192 - Guardian 404 (#193)
* Fixes the 404 errors for Fetch Guardian and Fetch Public Keys
* Log stack traces on error
* Remove the memory repository, it didn't work
* Notify client if there are duplicate guardians
* typo
* Show stack trace if errors occur retrieving guardians
* Debugging should default to local storage for simplicity
* Debug windows documentation
* Fix linting
* Minor cleanup to postman
2021-12-21 14:02:48 -05:00
Lee Richardson ff32ddfc18
docker-postman-test now works on Windows (#190)
Co-authored-by: Keith Fung <keithrfung@users.noreply.github.com>
2021-12-14 11:44:36 -05:00
Lee Richardson cdba1a6627
🐛 Fix error "Protocols cannot be instantiated" (#189)
* Fix error "Protocols cannot be instantiated"

* Fix linting error

* PR Feedback
2021-12-14 11:29:58 -05:00
Lee Richardson 3070ff92b1
🐛 Bug #183 - Windows Should Fail Fast (#186)
* makefile now fails fast on Windows

* Update readme for clarity on Windows
2021-12-09 18:20:57 -05:00
Lee Richardson 5e59d10c04
Upgrade dockerfile to python3.9 (#185) 2021-12-08 15:32:35 -05:00
Lee Richardson 9702fd687d
🐛 Resolve Windows Docker Bug & 🐍 Upgrade to Python 3.9 (#181)
* Remove unnecessary variables

This variable definition syntax doesn't work on Windows, but those are the defaults anyway, so they aren't necessary

* Clearer documentation of different way of running

* Expose 8081 as 8181 to avoid conflicts on Windows 11

* Update GitHub workflows to Python 3.9

* Upgrade to python 39 and upgrade black

* Upgrade uvicorn

* Revert "Upgrade uvicorn"

This reverts commit 0e70b60be0.

* Pin electionguard to 1.2.3 per Keith

* Revert "Upgrade to python 39 and upgrade black"

This reverts commit c19db4d45b.

* poetry update

* Upgrade python and black (again)

* `poetry add --dev black@21.7b0` PR feedback from Keith

* Downgrade electionguard to 1.2.2 per Steve

* PR Feedback

* Fixed linting errors

* more linting fix
2021-12-08 14:58:22 -05:00
dependabot[bot] 6525173b94
Bump mkdocs from 1.2.1 to 1.2.3 (#175)
Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.2.1 to 1.2.3.
- [Release notes](https://github.com/mkdocs/mkdocs/releases)
- [Commits](https://github.com/mkdocs/mkdocs/compare/1.2.1...1.2.3)

---
updated-dependencies:
- dependency-name: mkdocs
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-19 10:31:50 -05:00
Matt Wilhelm c5753f4e50
🛡. Add authentication and authorization (#172)
* Add authentication and authorization

* pr self review

* . Pylint Corrections

*  mypy fixes

*  Fix mypy around scopeto

*  LGTM fixes surrounding __all__

Co-authored-by: Keith Fung <keith.robert.fung@gmail.com>
Co-authored-by: Keith Fung <keithrfung@users.noreply.github.com>
2021-11-19 09:40:01 -05:00
Pradumna Saraf 806fe06a82
📝. Update README.md (#170)
Co-authored-by: Keith Fung <keithrfung@users.noreply.github.com>
2021-11-17 10:18:17 -05:00
Steve Maier 17d98336b7
Add calls for ui to get guardians (#164)
* Add calls for ui to get guardians

* fixing a test

* fixed import ordering

* Add branch name to pull_request workflow

Co-authored-by: Keith Fung <keithrfung@users.noreply.github.com>
2021-10-28 11:53:11 -04:00
Jay Shepherd 24c6005fc5
Migrate deprecated ::set-env (#166)
CVE-2020-15228
2021-10-11 12:47:44 -04:00
Keith Fung 3c9154b091 Adjust Contributing and Update Templates 2021-09-20 15:22:13 -04:00
dependabot[bot] 8f3dbe65e6
Bump fastapi from 0.61.2 to 0.65.2 (#162)
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.61.2 to 0.65.2.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.61.2...0.65.2)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-09 07:42:48 -04:00
Matt Wilhelm 28444eda9b
Tally Decryption (#161)
* make find functions posts

add an allowed route

* Add Ballot Inventory

* update docstring

* refactor election cache queries to their own file

* Add Tally/Decrypt

Add tally/encrypt functions.  rework some of the ballot and election api's to be more consistent.  Add sample data.

* update the postman collection

* clean up imports, docs

* more doc cleanup
2021-08-17 15:31:48 -04:00
Matt Wilhelm bee0f8d2e4
Feature/key ceremony (#159)
* Initial commit of key ceremony api's and structures

this will likely change

* add challenge methods

* move refactor a bunch of api's

* add guardian requests and responses

* add mongo connection

* use key name when fetching key guardian

* update electionguard package

* work through guardian api's up to backups

* use consistent public key structure

* update collection

clean up todo's and types

* clean up imports, add docs

* use default response status

* add commitment hash to joint key

* update description hash to manifest hash

* add response models

* clean up imports

* add functional interface for combining keys in tests

* Add settings to routes

add settings to routes so that the application state can be configurable for tests

* fix lint errors

* add missing mkdocs things
2021-06-28 09:28:20 -04:00
Matt Wilhelm f5ecf05cc2
Add Election API's (#158)
* Add Election API's

* use pip3
2021-06-08 14:02:04 -04:00
Steve Maier 7ce6992176
Merge pull request #157 from microsoft/azure-deploy
Azure deploy from Github Actions
2021-06-04 13:34:52 -04:00
SteveMaier-IRT d7a1eb5a23 upped the cpu/memory values and changed to deploying on pushed to main instead of local branch 2021-06-03 11:40:07 -04:00
SteveMaier-IRT fe114e513a cleaned up tags and when workflow will run 2021-06-03 11:13:32 -04:00
SteveMaier-IRT cacdc1b93c more environment testing 2021-06-02 16:25:15 -04:00
SteveMaier-IRT 4a160c0b39 fixing secure variables 2021-06-02 16:17:16 -04:00
SteveMaier-IRT 34838404fc renames environment settings 2021-06-02 15:35:10 -04:00
SteveMaier-IRT 4754b09904 getting environment variables to work 2021-06-02 15:24:50 -04:00
SteveMaier-IRT 52a2f25163 using local message queue 2021-06-02 15:11:55 -04:00
SteveMaier-IRT 05e292fb91 adding cpu and memory 2021-06-02 15:03:10 -04:00
SteveMaier-IRT b3b968c47c changing ports to a string instead of an int 2021-06-02 14:34:18 -04:00
SteveMaier-IRT 3e7f2f7715 trying to get a single container group 2021-06-02 14:11:10 -04:00
SteveMaier-IRT 90b341abe5 add guardian to deploy and renamed mediator 2021-06-02 12:17:50 -04:00
SteveMaier-IRT 7f603c2cec added path for message queue 2021-06-02 11:54:50 -04:00
SteveMaier-IRT 6482837b78 getting 2 containers running at the same time 2021-06-02 11:13:32 -04:00
SteveMaier-IRT 69721bcd64 deploying mediator and message queue 2021-06-02 10:53:25 -04:00
SteveMaier-IRT 17b032245d updating azure deploy 2021-06-02 10:15:11 -04:00
SteveMaier-IRT 9fb6b245f3 trigger Github Action 2021-06-02 09:56:27 -04:00
Steve Maier 7946171b26
Create azure_deploy.yml 2021-06-02 09:44:25 -04:00
Matt Wilhelm debaf77ba4
Feature/manifest api (#156)
* Add Submit Ballot API

refactor cache and queue into interfaces.  Refactor base models.  Fix linting configuration and issues, separate files, update postman tests

* Add manifest storage

* update postman collection

* fix http status code

* fix linter errors

* add collections to mongo init
2021-06-01 16:16:22 -04:00
Matt Wilhelm 742d9e9178
Add Submit Ballot API (#154)
* Add Submit Ballot API

refactor cache and queue into interfaces.  Refactor base models.  Fix linting configuration and issues, separate files, update postman tests

* address pr feedback
2021-06-01 15:01:01 -04:00
Steve Maier d1b65f345f
Merge pull request #155 from microsoft/feature/enhance-start
Enhanced the makefile for local dev work
2021-06-01 14:46:25 -04:00