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

fix: #1247 #1233 add new client role, update client redirect urls #1249

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions infrastructure/server/oidc_clients_forest_client.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ resource "aws_cognito_user_pool_client" "dev_forest_client_oidc_client" {
"http://localhost:3000/dashboard",
], [for i in range("${var.dev_pr_url_count}") : "https://nr-forest-client-${i}-frontend.apps.silver.devops.gov.bc.ca/dashboard"])
logout_urls = concat([
"${var.cognito_app_client_logout_chain_url.dev}http://localhost:3000/"
], [for i in range("${var.dev_pr_url_count}") : "${var.cognito_app_client_logout_chain_url.dev}https://nr-forest-client-${i}-frontend.apps.silver.devops.gov.bc.ca/"])
"http://localhost:3000/logout"
], [for i in range("${var.dev_pr_url_count}") : "https://nr-forest-client-${i}-frontend.apps.silver.devops.gov.bc.ca/logout"])
basilv marked this conversation as resolved.
Show resolved Hide resolved
enable_propagate_additional_user_context_data = "false"
enable_token_revocation = "true"
explicit_auth_flows = ["ALLOW_REFRESH_TOKEN_AUTH"]
Expand Down Expand Up @@ -45,12 +45,11 @@ resource "aws_cognito_user_pool_client" "test_forest_client_oidc_client" {
callback_urls = [
"https://oidcdebugggersecure-c6af30-dev.apps.gold.devops.gov.bc.ca/",
"http://localhost:3000/dashboard",
"https://nr-forest-client-test-frontend.apps.silver.devops.gov.bc.ca/dashboard"
"https://forestclient-tst.nrs.gov.bc.ca/dashboard"
basilv marked this conversation as resolved.
Show resolved Hide resolved
]
logout_urls = [
"http://localhost:3000/",
"${var.cognito_app_client_logout_chain_url.test}https://nr-forest-client-test-frontend.apps.silver.devops.gov.bc.ca/",
"${var.cognito_app_client_logout_chain_url.test}https://www2.qa.gov.bc.ca/gov/content/industry/natural-resource-use/client-number"
"http://localhost:3000/logout",
"https://forestclient-tst.nrs.gov.bc.ca/logout",
]
enable_propagate_additional_user_context_data = "false"
enable_token_revocation = "true"
Expand Down Expand Up @@ -84,11 +83,11 @@ resource "aws_cognito_user_pool_client" "prod_forest_client_oidc_client" {
callback_urls = [
"https://oidcdebugggersecure-c6af30-dev.apps.gold.devops.gov.bc.ca/",
"http://localhost:3000/dashboard",
"https://nr-forest-client-prod-frontend.apps.silver.devops.gov.bc.ca/dashboard"
"https://forestclient.nrs.gov.bc.ca/dashboard"
]
logout_urls = [
"http://localhost:3000/",
"${var.cognito_app_client_logout_chain_url.prod}https://nr-forest-client-prod-frontend.apps.silver.devops.gov.bc.ca/"
"http://localhost:3000/logout",
"https://forestclient.nrs.gov.bc.ca/logout"
]
enable_propagate_additional_user_context_data = "false"
enable_token_revocation = "true"
Expand Down
13 changes: 13 additions & 0 deletions server/flyway/sql/V40__add_client_role_viewer.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Add a role for CLIENT_DEV, CLIENT_TEST and CLIENT_PROD
INSERT INTO app_fam.fam_role (
role_name,
role_purpose,
application_id,
role_type_code,
create_user,
create_date
)
VALUES ('CLIENT_VIEWER', 'Ministry role to view client information', (select application_id from app_fam.fam_application where application_name = 'CLIENT_DEV'), 'C', CURRENT_USER, CURRENT_DATE),
('CLIENT_VIEWER', 'Ministry role to view client information', (select application_id from app_fam.fam_application where application_name = 'CLIENT_TEST'), 'C', CURRENT_USER, CURRENT_DATE),
('CLIENT_VIEWER', 'Ministry role to view client information', (select application_id from app_fam.fam_application where application_name = 'CLIENT_PROD'), 'C', CURRENT_USER, CURRENT_DATE)
;
Loading