Skip to content

Consumed Services

Dylan Barkowsky edited this page Jul 17, 2023 · 4 revisions

Common Hosted Form Service (CHEFS)

The CHEFS service is a BCGov project that allows users to build custom forms through a drag-and-drop user interface. It makes creating forms quick and easy without extensive technical knowledge.

This was a core component of the SPR project and was one of the client's requirements as established pre-development. SPR uses it as the initial form for reimbursement requests, later redirecting users back to the application's internal pages.

Pros

  • Creating complex forms is easy. Users could edit these forms without developer knowledge.
  • An option to send the POST requests to an external API is built in.

Cons

  • Sending the data to an external API has a number of drawbacks.
    • No record of that data is stored with CHEFS. Therefore, any files uploaded are inaccessible.
    • A custom script must be written to send files. CHEFS only sends metadata about the file's supposed storage location.
  • The CHEFS UI is not customizable outside of placing components. This can make it seem out of place compared to the interfacing application.

GC Notify

GC Notify is a notification system offered through the Government of Canada. It offers both email and text notifications based on customizable templates.

Upon receiving a request to the GC Notify REST API, templates are activated and sent to recipients specified in that request. These templates allow for injection of text. SPR uses that functionality to include links to submitted requests.

SPR uses GC Notify to send emails about new or updated request records.

Pros

  • The service is free.
  • Maintaining the service is not our responsibility.
  • Quick to set up and easy to use.

Cons

  • In compliance with organizational policies on personally-identifying information, any content injected into a template must be carefully scrutinized for information that may reveal information about an individual.

Keycloak (Pathfinder SSO/Common Hosted SSO)

The Keycloak service offers authentication using the existing IDIR system within BCGov. Employees can log in to applications using their existing credentials.

An in-house solution for React and Express applications has been created to more easily interface with Keycloak. Although it is still under development, the SPR project uses that solution to expedite Keycloak integration.

To use this service, developers must first obtain a client ID and client secret from the Keycloak service team.

Read more about this service here. There is also additional info on how to use the implementation of Keycloak within each /keycloak folder. One is located in /app and another in /api.

Pros

  • No user info has to be stored within the SPR application.
  • Risk for authentication transferred to existing service.
  • One less credential for users to remember.

Cons

  • Documentation is sparse, outdated, and sometimes difficult to follow.
  • Outside authentication complicates testing, especially when a testing account has not been provisioned.

CSS API

A Common Hosted Single Sign On API exists for obtaining user information within a project's existing Keycloak realm. Keycloak users must apply for access to this service from within the Keycloak dashboard.

A Swagger page has been created to facilitate its use.

Note that there are two steps when calling on this API service.

  1. Provide the client ID and secret given when applying for this service to an authentication route. This will return a token necessary for part 2.
  2. Make the appropriate HTTP call to the API, providing that token from step 1.

Within SPR, this service is useful to get info about users, such as their email address, based only upon their IDIR.

Code Climate

Code Climate is a code quality service that can be configured to analyze the contents of the the project's code and report back on issues with complexity and testing.

In this project, each pull request triggers a workflow the invokes the CodeClimate service. The changed code is scanned for any updates in complexity, line maximums, or duplicate code, and that information is commented into the pull request. It also receives a coverage report for the API unit testing to ensure that it passes a minimum threshold.

Pros

  • Can be good to monitor maintainability of code base.
  • Free service.

Cons

  • Needs to be configured. Default thresholds are too restrictive.

BCGov Backup Container

This service is pulled from an existing BCGov repo. The backup container works with a number of pre-existing BCGov database images as is hosted alongside those images within the OpenShift namespace.

It offers options to make scheduled backups and can verify those backups as well. Restoring the database is done through a manual command within the container.

In the SPR project, it is scheduled to make weekly backups and then verify those backups shortly after.

Pros

  • Made with organizational needs in mind.
  • Supports a variety of databases.

Cons

  • Setup can be complicated at times.
  • Documentation is out of date. Needed to reach out to the service's team for clarification.

Jira API

Atlassian's Jira tool offers a way for developers to organize their work using the Agile methodology. The work can be broken down into tickets that are organized into sprints.

This service comes with a REST API for completing these tasks programmatically. For this project, the route that creates new tickets was used as part of the user issue submission process. New user issues are tagged with a unique ticket type and added to the backlog of the project.

Pros

  • Documentation, provided by Atlassian, is very robust.

Cons

  • N/A