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

BHBC-2068: Migrate Keycloak to Standard Realm #902

Merged
merged 37 commits into from
Jan 9, 2023
Merged

BHBC-2068: Migrate Keycloak to Standard Realm #902

merged 37 commits into from
Jan 9, 2023

Conversation

curtisupshall
Copy link
Contributor

Overview

Migrate Keycloak to use the Standard Gold Realm: https://bcgov.github.io/sso-requests.

Links to Jira tickets

Description of relevant changes

App changes

  • Adds User GUID as a required field when filling out the Add System User form.

API changes

  • API endpoints now distinguish users by GUID rather than user identifier
  • Adds new Keycloak utils for parsing Keycloak tokens and determining GUIDs, identifiers
  • New User Service method to maintain system user records
  • Adds tests for new functions

Database changes

  • Adds user_guid to the system users table.
  • Removed IDIR test users from the users table seeder; Added user GUIDs to active developer IDIR accounts.
  • Distinguished BCeID basic and business identity sources

Pipeline changes

  • Adds Keycloak-related environment variables (local instances require a make clean web)

PR Checklist

Code

  • New files/classes/functions have appropriately descriptive names and comment blocks to describe their use/behaviour
  • I have avoided duplicating code when possible, moving re-usable pieces into functions
  • I have avoided hard-coding values where possible and moved any re-usable constants to a constants file
  • My code is as flat as possible (avoids deeply nested if/else blocks, promise chains, etc)
  • My code changes account for null/undefined values and handle errors appropriately
  • My code uses types/interfaces to help describe values/parameters/etc, help ensure type safety, and improve readability

Style

  • My code follows the established style conventions
  • My code uses native material-ui components/icons/conventions when possible

Documentation

  • I have commented my code sufficiently, such that an unfamiliar developer could understand my code
  • I have added/updated README's and related documentation, as needed

Tests

  • I have added/updated unit tests for any code I've added/updated
  • [] I have added/updated the Postman requests/tests to account for any API endpoints I've added/updated

Linting/Formatting

  • I have run the linter and fixed any issues, as needed
    See the lint commands in package.json
  • I have run the formatter and fixed any issues, as needed
    See the format commands in package.json

SonarCloud

  • I have addressed all SonarCloud Bugs, Vulnerabilities, Security Hotspots, and Code Smells

@curtisupshall curtisupshall marked this pull request as ready for review January 6, 2023 22:02
.config/config.json Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Merging #902 (40509a4) into dev (43fd16b) will increase coverage by 13.45%.
The diff coverage is 35.06%.

@@             Coverage Diff             @@
##              dev     #902       +/-   ##
===========================================
+ Coverage   66.48%   79.94%   +13.45%     
===========================================
  Files         339      173      -166     
  Lines       10877     6651     -4226     
  Branches     1908     1227      -681     
===========================================
- Hits         7232     5317     -1915     
+ Misses       3243     1052     -2191     
+ Partials      402      282      -120     
Impacted Files Coverage Δ
.../src/paths/project/{projectId}/participants/get.ts 96.00% <ø> (ø)
api/src/paths/user/list.ts 85.71% <ø> (ø)
api/src/paths/user/self.ts 96.29% <ø> (ø)
api/src/paths/user/{userId}/get.ts 96.42% <ø> (ø)
api/src/repositories/error-repository.ts 100.00% <ø> (ø)
api/src/repositories/project-repository.ts 83.92% <ø> (ø)
api/src/repositories/validation-repository.ts 84.21% <ø> (ø)
api/src/services/summary-service.ts 82.14% <0.00%> (-2.61%) ⬇️
...utils/media/csv/validation/csv-header-validator.ts 94.44% <ø> (ø)
api/src/utils/media/media-utils.ts 78.72% <ø> (ø)
... and 200 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 9, 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

@curtisupshall curtisupshall merged commit 9338f0c into dev Jan 9, 2023
@curtisupshall curtisupshall deleted the BHBC-2068 branch January 9, 2023 22:26
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.

3 participants