Skip to content

Conversation

@devinleighsmith
Copy link
Contributor

Pull Request for JIRA Ticket: ----JASPER-702----

Issue ticket number and link

https://jira.justice.gov.bc.ca/browse/JASPER-702

Description

Add service account oauth to JASPER CSO order upsert API endpoint.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Tested via postman. confirmed authentication, authorization on endpoint.

Test Configuration:
If applicable

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Documentation References

Put any doc references here

@devinleighsmith devinleighsmith self-assigned this Jan 17, 2026
@devinleighsmith devinleighsmith added the enhancement New feature or request label Jan 17, 2026

public static bool IsCsoServiceAccountUser(this ClaimsPrincipal claimsPrincipal)
=> claimsPrincipal.HasClaim(c => c.Type == CustomClaimTypes.PreferredUsername) &&
claimsPrincipal.FindFirstValue(CustomClaimTypes.PreferredUsername).Equals("service-account-cso-jasper-dev");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the -dev be ommited?

"Microsoft.Hosting.Lifetime": "Information"
}
},
"CsoKeycloak": {
Copy link
Contributor

@ronaldo-macapobre ronaldo-macapobre Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be reflected in our [docker-compose.yaml] (https://github.com/bcgov/jasper/blob/master/docker/docker-compose.yaml) file and in Terraform too?

Copy link
Contributor Author

@devinleighsmith devinleighsmith Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed pushing a commit, and updated.

}

resource "aws_secretsmanager_secret" "keycloak_cso_secret" {
name = "external/${var.app_name}-keycloak_cso_secret-${var.environment}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name = "external/${var.app_name}-keycloak_cso_secret-${var.environment}"
name = "external/${var.app_name}-keycloak-cso-secret-${var.environment}"

Just so its consistent with other secret names

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants