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

feat: digital credential queue service tests #2330

Merged
merged 81 commits into from
Nov 27, 2023

Conversation

amanji
Copy link
Contributor

@amanji amanji commented Nov 26, 2023

Issue #: /bcgov/entity#18521

Description of changes:

  • Follow up work to add tests

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).

amanji and others added 30 commits October 25, 2023 15:16
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
* feat: devcontainer configuraton for vscode

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: hard code digital business card schema

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: hard code digital business card schema

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: issue credentials through Traction tenant

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* refactor: app initialization workflow

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: use out-of-band invitation for connecting

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: use v2.0 for issuing credential

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: web socket implmentation with flask-socketio

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: db migration script to enable revocation

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: revocation endpoint

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: replace endpoints

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: fix linting errors

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: update requirements

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: update tests

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: traction token exchanger

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: update workflow variables

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: update workflow variables

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* refactor: ws cors setting is a config option

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: fix linting errors

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* refactor: clean up init in digital credential service

Signed-off-by: Akiff Manji <amanji@petridish.dev>

---------

Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
* feat: devcontainer configuraton for vscode

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: hard code digital business card schema

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: hard code digital business card schema

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: issue credentials through Traction tenant

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* refactor: app initialization workflow

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: use out-of-band invitation for connecting

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: use v2.0 for issuing credential

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: web socket implmentation with flask-socketio

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: db migration script to enable revocation

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: revocation endpoint

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: replace endpoints

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: fix linting errors

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: update requirements

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: update tests

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: traction token exchanger

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: update workflow variables

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: update workflow variables

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* refactor: ws cors setting is a config option

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: fix linting errors

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* refactor: clean up init in digital credential service

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: endpoints to reset credential offers

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: credential id lookup table

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* feat: add business roles

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: fix tests and linting

Signed-off-by: Akiff Manji <amanji@petridish.dev>

* chore: fix tests

Signed-off-by: Akiff Manji <amanji@petridish.dev>

---------

Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
@amanji amanji changed the base branch from feature-digital-credentials to main November 26, 2023 19:52
Copy link

gitguardian bot commented Nov 26, 2023

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
- Generic High Entropy Secret fd96a6e legal-api/tests/unit/models/test_dc_definition.py View secret
- Generic High Entropy Secret fc6c34a legal-api/tests/unit/models/test_dc_definition.py View secret
7220870 Generic High Entropy Secret 6beb1b1 legal-api/tests/unit/models/test_dc_definition.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@amanji amanji marked this pull request as ready for review November 26, 2023 19:58
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Copy link

codecov bot commented Nov 27, 2023

Codecov Report

Merging #2330 (f3c1a00) into main (79511cd) will decrease coverage by 1.01%.
Report is 34 commits behind head on main.
The diff coverage is 62.09%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2330      +/-   ##
==========================================
- Coverage   77.37%   76.37%   -1.01%     
==========================================
  Files         202      176      -26     
  Lines       11602    10445    -1157     
  Branches     1961     1761     -200     
==========================================
- Hits         8977     7977    -1000     
+ Misses       2043     1988      -55     
+ Partials      582      480     -102     
Flag Coverage Δ
entity-digital-credentials 69.32% <69.32%> (?)
entityfiler ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
legal-api/src/legal_api/config.py 95.16% <100.00%> (+0.28%) ⬆️
legal-api/src/legal_api/core/filing.py 86.55% <100.00%> (+0.04%) ⬆️
legal-api/src/legal_api/core/meta/filing.py 91.11% <ø> (ø)
legal-api/src/legal_api/models/__init__.py 100.00% <100.00%> (ø)
legal-api/src/legal_api/models/dc_definition.py 90.69% <100.00%> (ø)
...l-api/src/legal_api/models/dc_revocation_reason.py 100.00% <100.00%> (ø)
...s/v2/business/business_filings/business_filings.py 65.60% <100.00%> (+6.32%) ⬆️
legal-api/src/legal_api/services/authz.py 94.54% <ø> (ø)
...gal_api/services/filings/validations/alteration.py 83.01% <100.00%> (ø)
...al-api/src/legal_api/utils/legislation_datetime.py 84.12% <100.00%> (+0.79%) ⬆️
... and 22 more

... and 42 files with indirect coverage changes

Signed-off-by: Akiff Manji <amanji@petridish.dev>
@amanji
Copy link
Contributor Author

amanji commented Nov 27, 2023

Codecov is failing to upload an artifact

Signed-off-by: Akiff Manji <amanji@petridish.dev>
@argush3
Copy link
Collaborator

argush3 commented Nov 27, 2023

Looks good. Thanks for the tests!

Can we address the remaining 2 code smells?

Signed-off-by: Akiff Manji <amanji@petridish.dev>
Signed-off-by: Akiff Manji <amanji@petridish.dev>
Copy link

sonarcloud bot commented Nov 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@argush3 argush3 merged commit e8d0216 into bcgov:main Nov 27, 2023
6 of 8 checks passed
@amanji amanji deleted the feature-digital-credentials branch November 27, 2023 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants