Skip to content

Commit

Permalink
Merge branch 'main' into feat/773-lambda-segregation
Browse files Browse the repository at this point in the history
  • Loading branch information
basilv committed Sep 5, 2023
2 parents a264c29 + 4026caf commit 5a91347
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 9 deletions.
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,70 @@
# Changelog

## [1.3.0](https://github.com/bcgov/nr-forests-access-management/compare/v1.2.2...v1.3.0) (2023-08-30)


### Features

* [#478](https://github.com/bcgov/nr-forests-access-management/issues/478) add gc notify email endpoint ([#789](https://github.com/bcgov/nr-forests-access-management/issues/789)) ([93ee292](https://github.com/bcgov/nr-forests-access-management/commit/93ee292e9f7ae30abec736eba14f8d41e58f23e7))
* [#561](https://github.com/bcgov/nr-forests-access-management/issues/561) API audit logs ([#772](https://github.com/bcgov/nr-forests-access-management/issues/772)) ([f027191](https://github.com/bcgov/nr-forests-access-management/commit/f02719122e34b4f22cbc07cb64a9adfeb11ecd2f))
* [#561](https://github.com/bcgov/nr-forests-access-management/issues/561) audit for auth login ([#766](https://github.com/bcgov/nr-forests-access-management/issues/766)) ([e15d94b](https://github.com/bcgov/nr-forests-access-management/commit/e15d94b7af89ae3d47dc6d8ddae3f3f62cc972da))
* [#679](https://github.com/bcgov/nr-forests-access-management/issues/679) integrate idim lookup proxy ([#728](https://github.com/bcgov/nr-forests-access-management/issues/728)) ([1e71989](https://github.com/bcgov/nr-forests-access-management/commit/1e71989f57196fd3f5d56f2f5e6c4c97948b1a9f))
* [#688](https://github.com/bcgov/nr-forests-access-management/issues/688) Restrict admins from self-modification ([#705](https://github.com/bcgov/nr-forests-access-management/issues/705)) ([197e505](https://github.com/bcgov/nr-forests-access-management/commit/197e50576c44953952b9403ebb8cade49d38b582))
* [#700](https://github.com/bcgov/nr-forests-access-management/issues/700) input sanitization ([#837](https://github.com/bcgov/nr-forests-access-management/issues/837)) ([d2703d1](https://github.com/bcgov/nr-forests-access-management/commit/d2703d1f72870b83f618d5e2706c8b7e29386694))
* [#704](https://github.com/bcgov/nr-forests-access-management/issues/704) switch to carbon icons ([#754](https://github.com/bcgov/nr-forests-access-management/issues/754)) ([846a579](https://github.com/bcgov/nr-forests-access-management/commit/846a57950b858dd652cf4d7e3e89a008e1033c5a))
* [#718](https://github.com/bcgov/nr-forests-access-management/issues/718) Reduce access of API DB user ([#745](https://github.com/bcgov/nr-forests-access-management/issues/745)) ([ac18807](https://github.com/bcgov/nr-forests-access-management/commit/ac18807d1d2b056f5c75e084a984014d51bf3452))
* [#718](https://github.com/bcgov/nr-forests-access-management/issues/718) Use seperate auth lambda database user ([#731](https://github.com/bcgov/nr-forests-access-management/issues/731)) ([a012ab0](https://github.com/bcgov/nr-forests-access-management/commit/a012ab0d820ff1366d2aa01666bbba545238d9e6))
* [#725](https://github.com/bcgov/nr-forests-access-management/issues/725) add waf terraform ([#797](https://github.com/bcgov/nr-forests-access-management/issues/797)) ([d2a79ff](https://github.com/bcgov/nr-forests-access-management/commit/d2a79ffa43db56e63da7bdc22f5b19c67100b28c))
* [#726](https://github.com/bcgov/nr-forests-access-management/issues/726) Added redirect urls for forest client test and prod in terraform ([#741](https://github.com/bcgov/nr-forests-access-management/issues/741)) ([56cc3e4](https://github.com/bcgov/nr-forests-access-management/commit/56cc3e41de4c6476cedc21d61037069b2c1272e5))
* [#818](https://github.com/bcgov/nr-forests-access-management/issues/818) onboard support for Silva ([#821](https://github.com/bcgov/nr-forests-access-management/issues/821)) ([84c7fdd](https://github.com/bcgov/nr-forests-access-management/commit/84c7fdd9fea43094f9445466123d86694002646c))
* 575 implement bcgovpubcode ([#723](https://github.com/bcgov/nr-forests-access-management/issues/723)) ([10234fa](https://github.com/bcgov/nr-forests-access-management/commit/10234fa788ddb54160ad01a4ecb8a29ef04820a7))
* 616 frontend main page ([#699](https://github.com/bcgov/nr-forests-access-management/issues/699)) ([55d8f4a](https://github.com/bcgov/nr-forests-access-management/commit/55d8f4a43cb7f2327bcf3d87ba5e07efdae699b5))


### Bug Fixes

* [#561](https://github.com/bcgov/nr-forests-access-management/issues/561) update audit log ([#807](https://github.com/bcgov/nr-forests-access-management/issues/807)) ([6577df7](https://github.com/bcgov/nr-forests-access-management/commit/6577df7d7c781f5cd5fe0807133452d7255b44a1))
* [#704](https://github.com/bcgov/nr-forests-access-management/issues/704) fix frontend pipeline build error caused by type ([#811](https://github.com/bcgov/nr-forests-access-management/issues/811)) ([bcf7d23](https://github.com/bcgov/nr-forests-access-management/commit/bcf7d23a8908ad21c655e6ccfedeba37b9843e59))
* [#714](https://github.com/bcgov/nr-forests-access-management/issues/714) cleanup frontend code ([#756](https://github.com/bcgov/nr-forests-access-management/issues/756)) ([1806a35](https://github.com/bcgov/nr-forests-access-management/commit/1806a35f28e421dff3026645b551fe85ce3ac25d))
* [#721](https://github.com/bcgov/nr-forests-access-management/issues/721) style unit px to rem ([#806](https://github.com/bcgov/nr-forests-access-management/issues/806)) ([69113fe](https://github.com/bcgov/nr-forests-access-management/commit/69113fe78746e41d6bbb1bcd44b79d70b69e60ef))
* [#733](https://github.com/bcgov/nr-forests-access-management/issues/733) Disable grant access button when there is no application selected ([#749](https://github.com/bcgov/nr-forests-access-management/issues/749)) ([9bf2f3d](https://github.com/bcgov/nr-forests-access-management/commit/9bf2f3dc1cafddfec67ec2a83675503390ac0325))
* [#735](https://github.com/bcgov/nr-forests-access-management/issues/735) error handling fix ([#746](https://github.com/bcgov/nr-forests-access-management/issues/746)) ([5d2a709](https://github.com/bcgov/nr-forests-access-management/commit/5d2a70915c66aa1cae226abf09e92bf437c9c9a0))
* [#748](https://github.com/bcgov/nr-forests-access-management/issues/748) - Fixing the Forest Client Number at Summary Page ([#803](https://github.com/bcgov/nr-forests-access-management/issues/803)) ([a431623](https://github.com/bcgov/nr-forests-access-management/commit/a4316236c618c61bfef2b263ce5f0e60eec103bf))
* [#750](https://github.com/bcgov/nr-forests-access-management/issues/750) frontend minor fixes ([#819](https://github.com/bcgov/nr-forests-access-management/issues/819)) ([496a302](https://github.com/bcgov/nr-forests-access-management/commit/496a302a7156e5931b3c4682e57d703d941af0c1))
* [#755](https://github.com/bcgov/nr-forests-access-management/issues/755) cleaning up stylesheet, and updating classes ([#822](https://github.com/bcgov/nr-forests-access-management/issues/822)) ([855e711](https://github.com/bcgov/nr-forests-access-management/commit/855e71178ff9c2a1e1892303a6dd59dc9fc1ce23))
* [#759](https://github.com/bcgov/nr-forests-access-management/issues/759) Show Next button in the grant access page, but disabled it until meet requirement. ([#768](https://github.com/bcgov/nr-forests-access-management/issues/768)) ([438f5a8](https://github.com/bcgov/nr-forests-access-management/commit/438f5a819ad694a92848e56b457302ae39e1b58d))
* [#800](https://github.com/bcgov/nr-forests-access-management/issues/800) Frontend test breaks the pipeline build ([#801](https://github.com/bcgov/nr-forests-access-management/issues/801)) ([a679747](https://github.com/bcgov/nr-forests-access-management/commit/a6797475b4cb77ce76364dcb6404c93a0aa2070d))
* [#814](https://github.com/bcgov/nr-forests-access-management/issues/814) update dynamic icon import to fix pipeline slow issue ([#816](https://github.com/bcgov/nr-forests-access-management/issues/816)) ([241d124](https://github.com/bcgov/nr-forests-access-management/commit/241d1246358746b4f8d8a71ba20ba6d1cea50d38))
* [#815](https://github.com/bcgov/nr-forests-access-management/issues/815) large filesize image ([#823](https://github.com/bcgov/nr-forests-access-management/issues/823)) ([51dd608](https://github.com/bcgov/nr-forests-access-management/commit/51dd6086cbcee15e8c4cb745de843cec9eda5dc0))
* [#825](https://github.com/bcgov/nr-forests-access-management/issues/825) 403 error interceptor ([#829](https://github.com/bcgov/nr-forests-access-management/issues/829)) ([0258ccc](https://github.com/bcgov/nr-forests-access-management/commit/0258cccc4c6a4ef1c2fbcdb1a5246fb2c967b9eb))
* [#826](https://github.com/bcgov/nr-forests-access-management/issues/826) clear previous success message on dashboard ([#830](https://github.com/bcgov/nr-forests-access-management/issues/830)) ([f432d0c](https://github.com/bcgov/nr-forests-access-management/commit/f432d0cee6dba88a16e77ec2a5b4202d2b7e8772))
* [#827](https://github.com/bcgov/nr-forests-access-management/issues/827) logout causing type error ([#828](https://github.com/bcgov/nr-forests-access-management/issues/828)) ([6a86b0c](https://github.com/bcgov/nr-forests-access-management/commit/6a86b0c5b320fd83f62abdfffdbc956b651c55b8))
* minor backend adjustment ([#812](https://github.com/bcgov/nr-forests-access-management/issues/812)) ([5ba837d](https://github.com/bcgov/nr-forests-access-management/commit/5ba837d3f25bc738639382649ced664ae882e319))
* server/backend/requirements.txt upgrade cryptography from 41.0.1 to 41.0.2 ([#702](https://github.com/bcgov/nr-forests-access-management/issues/702)) ([b5220e3](https://github.com/bcgov/nr-forests-access-management/commit/b5220e37a7b9bf8b403cc78c4f1347630cde3b52))


### Miscellaneous

* [#684](https://github.com/bcgov/nr-forests-access-management/issues/684) update fam architecture diagram ([#706](https://github.com/bcgov/nr-forests-access-management/issues/706)) ([eec32c7](https://github.com/bcgov/nr-forests-access-management/commit/eec32c768415708d749c1c578051257d5922527c))
* bump bcgov-nr/action-test-and-analyst to v0.0.2 ([#783](https://github.com/bcgov/nr-forests-access-management/issues/783)) ([bc7fab9](https://github.com/bcgov/nr-forests-access-management/commit/bc7fab9ddabf0c066195167ebbd0a8a05d3f2b6e))
* **deps-dev:** Bump @antfu/utils from 0.7.2 to 0.7.5 in /frontend ([#771](https://github.com/bcgov/nr-forests-access-management/issues/771)) ([3869c3d](https://github.com/bcgov/nr-forests-access-management/commit/3869c3d0da84199706f719686469e5e3eed25bde))
* **deps-dev:** bump tough-cookie from 4.1.2 to 4.1.3 in /frontend ([#770](https://github.com/bcgov/nr-forests-access-management/issues/770)) ([47a46c5](https://github.com/bcgov/nr-forests-access-management/commit/47a46c57b9fb293037747edba1d24bd784c7d2b8))
* **deps-dev:** bump vite from 4.3.7 to 4.3.9 in /frontend ([#757](https://github.com/bcgov/nr-forests-access-management/issues/757)) ([dda1b66](https://github.com/bcgov/nr-forests-access-management/commit/dda1b66000ce7f37c0620d0585ddadaca1c5794c))
* **deps:** bump @nestjs/core and @openapitools/openapi-generator-cli in /client-code-gen ([#769](https://github.com/bcgov/nr-forests-access-management/issues/769)) ([fd8977f](https://github.com/bcgov/nr-forests-access-management/commit/fd8977f8e1aa34f5d016a78b31d92f6181f59919))
* **deps:** bump fast-xml-parser and aws-amplify in /frontend ([#752](https://github.com/bcgov/nr-forests-access-management/issues/752)) ([35ef36f](https://github.com/bcgov/nr-forests-access-management/commit/35ef36f2d55d0b6571b55d6a2584f7b99748cce6))
* **deps:** update boto ([#784](https://github.com/bcgov/nr-forests-access-management/issues/784)) ([d295b33](https://github.com/bcgov/nr-forests-access-management/commit/d295b3337073d956bed82a69dbe977cebacaaf0d))
* **deps:** update dependency @types/node to v18 ([#817](https://github.com/bcgov/nr-forests-access-management/issues/817)) ([f82bfa7](https://github.com/bcgov/nr-forests-access-management/commit/f82bfa7c703311cf5b0c10b5fc759c46cd2d3826))
* **deps:** update dependency authlib to v1.2.1 ([#675](https://github.com/bcgov/nr-forests-access-management/issues/675)) ([b201161](https://github.com/bcgov/nr-forests-access-management/commit/b201161a65d10e96f4c60ad72434a97c4f8b9fe3))
* **deps:** update dependency botocore to v1.31.23 and boto3 to v1.28.23 ([#761](https://github.com/bcgov/nr-forests-access-management/issues/761)) ([068440a](https://github.com/bcgov/nr-forests-access-management/commit/068440a305d99bc812715bee706a5092468b7af9))
* **deps:** update dependency cryptography to v41.0.3 [security] ([#732](https://github.com/bcgov/nr-forests-access-management/issues/732)) ([d8274de](https://github.com/bcgov/nr-forests-access-management/commit/d8274dea48618799eb20ac095905e701b0a2aaaa))
* **deps:** update dependency flake8 to v6 ([#809](https://github.com/bcgov/nr-forests-access-management/issues/809)) ([ed72388](https://github.com/bcgov/nr-forests-access-management/commit/ed72388f5b2842df2ac661f5b36e015280d08f87))
* **deps:** update dependency psycopg2-binary to v2.9.7 ([#776](https://github.com/bcgov/nr-forests-access-management/issues/776)) ([6b84476](https://github.com/bcgov/nr-forests-access-management/commit/6b844765345303958d47fde5c3a327a264fa6e1e))
* **deps:** update dependency uvicorn to v0.23.2 ([#777](https://github.com/bcgov/nr-forests-access-management/issues/777)) ([907c477](https://github.com/bcgov/nr-forests-access-management/commit/907c477af346629c26b0e4c89e941314c25a1cb0))
* **deps:** update vitest monorepo to ^0.34.0 ([#785](https://github.com/bcgov/nr-forests-access-management/issues/785)) ([69d461f](https://github.com/bcgov/nr-forests-access-management/commit/69d461ff2e8122bcc0853a597067e8191672abbf))
* Enable dev deployment for push on main. ([#767](https://github.com/bcgov/nr-forests-access-management/issues/767)) ([16431d3](https://github.com/bcgov/nr-forests-access-management/commit/16431d39b9a416b89473909fd33056f3c843efa7))
* increase renovate PR limit ([#774](https://github.com/bcgov/nr-forests-access-management/issues/774)) ([1160f7c](https://github.com/bcgov/nr-forests-access-management/commit/1160f7cf3d5b065afe9a6b7b03cdeb298beea82e))
* update and triggers for frontend tests ([#788](https://github.com/bcgov/nr-forests-access-management/issues/788)) ([b8334b5](https://github.com/bcgov/nr-forests-access-management/commit/b8334b50925967946c1a5e63498f0ce053e92400))

## [1.2.2](https://github.com/bcgov/nr-forests-access-management/compare/v1.2.1...v1.2.2) (2023-07-13)


Expand Down
2 changes: 1 addition & 1 deletion scripts/kc_data_transfer/src/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mypy==0.991
mypy==1.5.1
flake8==6.0.0
13 changes: 10 additions & 3 deletions server/backend/api/app/routers/router_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

@router.get("", response_model=List[schemas.FamApplication], status_code=200)
def get_applications(
response: Response,
# response: Response,
db: Session = Depends(database.get_db),
access_roles: dict = Depends(jwt_validation.get_access_roles)
):
Expand All @@ -24,8 +24,15 @@ def get_applications(
"""
LOGGER.debug(f"running router ... {db}")
query_data = crud_application.get_applications_by_granted_apps(db, access_roles)
if len(query_data) == 0:
response.status_code = 204

# from fastapi v0.79.0, setting status_code to 204, 304, or any code below 200 (1xx) will remove the body from the response
# so when return response with status code 204, response will have no content return to user
# if we want to use status code 204 for empty case, we might want to apply to other methods as well
# and it will impact some test cases, casue the response cannot be conver to json in empty case

# if len(query_data) == 0:
# response.status_code = 204

return query_data


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def delete_user_role_assignment(

audit_event_log = AuditEventLog(
request=request,
event_type=AuditEventType.CREATE_USER_ROLE_ACCESS,
event_type=AuditEventType.REMOVE_USER_ROLE_ACCESS,
event_outcome=AuditEventOutcome.SUCCESS
)

Expand Down
1 change: 1 addition & 0 deletions server/backend/api/app/utils/audit_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

class AuditEventType(str, Enum):
CREATE_USER_ROLE_ACCESS = "Grant User Role(S) Access"
REMOVE_USER_ROLE_ACCESS = "Remove User Role(S) Access"


class AuditEventOutcome(str, Enum):
Expand Down
5 changes: 3 additions & 2 deletions server/backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
boto3==1.28.24
botocore==1.31.24
fastapi==0.78.0
fastapi==0.100.0
httpx==0.24.1
uvicorn[standard]==0.23.2
sqlmodel==0.0.8
email-validator==2.0.0.post2
Expand All @@ -9,4 +10,4 @@ psycopg2-binary==2.9.7
mangum==0.17.0
python-jose==3.3.0
cryptography==41.0.3
authlib==1.2.1
authlib==1.2.1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_get_application_success(

response = test_client_fixture_unit.get(f"{endPoint}", headers=headers(token))

assert response.status_code == 204
assert response.status_code == 200
data = response.json()
assert data == []

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.2
1.3.0

0 comments on commit 5a91347

Please sign in to comment.