Skip to content

Commit abbf4ef

Browse files
committed
chore: remove OW4 from Terraform
1 parent 5609719 commit abbf4ef

File tree

1 file changed

+4
-89
lines changed

1 file changed

+4
-89
lines changed

infra/auth0/main.tf

Lines changed: 4 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,15 @@ data "auth0_client" "vengeful_vineyard_frontend" {
230230
locals {
231231
projects = {
232232
# Key here is name of doppler project
233+
monoweb-web = data.auth0_client.monoweb_web
234+
monoweb-dashboard = data.auth0_client.monoweb_dashboard
235+
monoweb-rpc = data.auth0_client.rpc
236+
vengeful-vineyard = data.auth0_client.vengeful_vineyard_frontend
233237

234-
vengeful-vineyard = data.auth0_client.vengeful_vineyard_frontend
235-
onlineweb4 = data.auth0_client.onlineweb4
236-
onlineweb-frontend = data.auth0_client.onlineweb_frontend
237238
appkom-opptakssystem = data.auth0_client.appkom_opptak
238239
appkom-onlineapp = data.auth0_client.appkom_events_app
239240
appkom-autobank = data.auth0_client.appkom_autobank
240241
appkom-veldedighet = data.auth0_client.appkom_veldedighet
241-
242-
monoweb-web = data.auth0_client.monoweb_web
243-
monoweb-dashboard = data.auth0_client.monoweb_dashboard
244-
monoweb-rpc = data.auth0_client.rpc
245242
}
246243
}
247244

@@ -289,38 +286,6 @@ resource "doppler_secret" "auth0_audiences" {
289286
value = auth0_resource_server.online.identifier
290287
}
291288

292-
resource "auth0_client" "onlineweb_frontend" {
293-
cross_origin_auth = true # this is set to avoid breaking client. It was set in auth0 dashboard. Unknown motivation.
294-
cross_origin_loc = "https://online.ntnu.no/*"
295-
app_type = "spa"
296-
allowed_logout_urls = {
297-
"dev" = ["http://localhost:8080"]
298-
"prd" = ["https://old.online.ntnu.no/auth/login/", "https://online.ntnu.no"]
299-
}[terraform.workspace]
300-
callbacks = {
301-
"dev" = ["http://localhost:8080/authentication/callback"]
302-
"prd" = ["https://online.ntnu.no/authentication/callback"]
303-
}[terraform.workspace]
304-
grant_types = ["authorization_code", "implicit", "refresh_token"]
305-
name = "OnlineWeb Frontend${local.name_suffix[terraform.workspace]}"
306-
organization_require_behavior = "no_prompt"
307-
is_first_party = true
308-
oidc_conformant = true
309-
310-
jwt_configuration {
311-
alg = "RS256"
312-
}
313-
314-
refresh_token {
315-
rotation_type = "rotating"
316-
expiration_type = "expiring"
317-
}
318-
}
319-
320-
data "auth0_client" "onlineweb_frontend" {
321-
client_id = auth0_client.onlineweb_frontend.client_id
322-
}
323-
324289
resource "auth0_client" "auth0_account_management_api_management_client" {
325290
is_first_party = true
326291
app_type = "non_interactive"
@@ -337,8 +302,6 @@ resource "auth0_connection_clients" "username_password_authentication" {
337302
connection_id = auth0_connection.username_password_authentication.id
338303

339304
enabled_clients = [
340-
auth0_client.onlineweb_frontend.client_id,
341-
auth0_client.onlineweb4.client_id,
342305
auth0_client.monoweb_web.client_id,
343306
auth0_client.monoweb_dashboard.client_id,
344307
auth0_client.vengeful_vineyard_frontend.client_id,
@@ -355,8 +318,6 @@ resource "auth0_connection_clients" "feide" {
355318
connection_id = auth0_connection.feide.id
356319

357320
enabled_clients = [
358-
auth0_client.onlineweb_frontend.client_id,
359-
auth0_client.onlineweb4.client_id,
360321
auth0_client.monoweb_web.client_id,
361322
auth0_client.monoweb_dashboard.client_id,
362323
auth0_client.vengeful_vineyard_frontend.client_id,
@@ -464,52 +425,6 @@ resource "auth0_client_grant" "rpc" {
464425
]
465426
}
466427

467-
resource "auth0_client" "onlineweb4" {
468-
cross_origin_auth = true # this is set to avoid breaking client. It was set in auth0 dashboard. Unknown motivation.
469-
cross_origin_loc = "https://old.online.ntnu.no/*"
470-
allowed_clients = []
471-
allowed_logout_urls = {
472-
"dev" = ["http://localhost:8000", "http://127.0.0.1:8000"]
473-
"prd" = ["https://old.online.ntnu.no"]
474-
}[terraform.workspace]
475-
allowed_origins = []
476-
app_type = "regular_web"
477-
callbacks = {
478-
"dev" = ["http://localhost:8000/auth0/callback/", "http://127.0.0.1:8000/auth0/callback/"]
479-
"prd" = ["https://old.online.ntnu.no/auth0/callback/"]
480-
}[terraform.workspace]
481-
grant_types = ["authorization_code", "client_credentials", "refresh_token"]
482-
name = "OnlineWeb4${local.name_suffix[terraform.workspace]}"
483-
484-
is_first_party = true
485-
oidc_conformant = true
486-
organization_require_behavior = "no_prompt"
487-
488-
refresh_token {
489-
rotation_type = "rotating"
490-
expiration_type = "expiring"
491-
}
492-
493-
jwt_configuration {
494-
alg = "RS256"
495-
}
496-
}
497-
498-
data "auth0_client" "onlineweb4" {
499-
client_id = auth0_client.onlineweb4.client_id
500-
}
501-
502-
resource "auth0_client_grant" "ow4_mgmt_grant" {
503-
audience = "https://${data.auth0_tenant.tenant.domain}/api/v2/"
504-
client_id = auth0_client.onlineweb4.client_id
505-
scopes = [
506-
"update:users",
507-
"read:users",
508-
"read:user_idp_tokens",
509-
"create:user_tickets", # to send verification emails
510-
]
511-
}
512-
513428
resource "auth0_client" "monoweb_web" {
514429
cross_origin_auth = true # this is set to avoid breaking client. It was set in auth0 dashboard. Unknown motivation.
515430
cross_origin_loc = "https://online.ntnu.no/*"

0 commit comments

Comments
 (0)