kanidm (Update): internal redirect URIs for the internal-only apps #173

Merged
ginjiruu merged 1 commit from internal-redirects into master 2026-11-20 20:52:39 +00:00
Owner

lab/clusters #1759 + portable-cluster-argocd-apps #142 + ghost-blog #2 move these apps to serve only on .apps.caosh.int.animeteamspeak.moe (lab root CA, cilium-internal, internal DNS) and drop their public records. Their kanidm clients must accept the internal callback or every login dies with redirect_uri mismatch: actual, argoworkflows, drop, grafana, harbor, karakeep, opencloud, open-webui, paperless, privatemedia. Localhost/desktop URIs untouched; public apps (immich, jellyfin, argocd, forgejo, matrix, frigate, carwash-frigate, git) untouched. Terraform applies through the tofu-controller runner, not locally.

lab/clusters #1759 + portable-cluster-argocd-apps #142 + ghost-blog #2 move these apps to serve only on <app>.apps.caosh.int.animeteamspeak.moe (lab root CA, cilium-internal, internal DNS) and drop their public records. Their kanidm clients must accept the internal callback or every login dies with redirect_uri mismatch: actual, argoworkflows, drop, grafana, harbor, karakeep, opencloud, open-webui, paperless, privatemedia. Localhost/desktop URIs untouched; public apps (immich, jellyfin, argocd, forgejo, matrix, frigate, carwash-frigate, git) untouched. Terraform applies through the tofu-controller runner, not locally.
Collaborator

tf-controller plan output:


OpenTofu used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place (current -> planned)

OpenTofu will perform the following actions:

  # kanidm_group.opencloud_groups will be updated in-place
  ~ resource "kanidm_group" "opencloud_groups" {
      ~ entry_managed_by = "018fa4a0-0d5b-4068-98e0-534e0f00e735" -> "opencloud-bind@auth.animeteamspeak.moe"
        id               = "c893a6cf-23b8-4569-942a-986bc20ad81d"
      ~ members          = [
          - "0c020e8a-2da6-415e-8316-7e5e873aae46",
          - "38068641-dba1-43cd-a178-37ecb01825d9",
          - "5fc24424-e6b0-4cef-8e73-e1c4e67f1af2",
          - "d131685d-249c-4adb-9941-600c6c1ddfb4",
          - "opencloud-bind@auth.animeteamspeak.moe",
        ] -> (known after apply)
        name             = "opencloud-groups"
        # (1 unchanged attribute hidden)
    }

  # kanidm_oauth2_basic.actual will be updated in-place
  ~ resource "kanidm_oauth2_basic" "actual" {
        id                       = "816871ca-1c0d-4d3d-8605-6a377ec1f1ab"
        name                     = "actual"
      ~ redirect_uris            = [
          - "https://actual.animeteamspeak.moe/openid/callback",
          - "https://actual.animeteamspeak.moe/path/openid/callback",
          + "https://actual.apps.caosh.int.animeteamspeak.moe/openid/callback",
          + "https://actual.apps.caosh.int.animeteamspeak.moe/path/openid/callback",
        ]
        # (4 unchanged attributes hidden)

        # (8 unchanged blocks hidden)
    }

  # kanidm_oauth2_basic.argoworkflows will be updated in-place
  ~ resource "kanidm_oauth2_basic" "argoworkflows" {
        id                                 = "aef88dc7-916e-4cfa-b907-a11864c8d65b"
        name                               = "argoworkflows"
      ~ redirect_uris                      = [
          - "https://workflows.animeteamspeak.moe/oauth2/callback",
          + "https://workflows.apps.caosh.int.animeteamspeak.moe/oauth2/callback",
        ]
        # (4 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # kanidm_oauth2_basic.drop will be updated in-place
  ~ resource "kanidm_oauth2_basic" "drop" {
        id                                 = "e84c437c-42f7-4ed1-95c3-101e8be45ee5"
        name                               = "drop"
      ~ redirect_uris                      = [
          - "https://games.animeteamspeak.moe/api/v1/auth/oidc/callback",
          + "https://games.apps.caosh.int.animeteamspeak.moe/api/v1/auth/oidc/callback",
        ]
        # (4 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # kanidm_oauth2_basic.grafana will be updated in-place
  ~ resource "kanidm_oauth2_basic" "grafana" {
        id            = "2c2b7c74-8a0d-4931-9869-91cbfdd1c2a3"
        name          = "grafana"
      ~ redirect_uris = [
          - "https://grafana.animeteamspeak.moe/login/generic_oauth",
          + "https://grafana.apps.caosh.int.animeteamspeak.moe/login/generic_oauth",
        ]
        # (3 unchanged attributes hidden)

        # (7 unchanged blocks hidden)
    }

  # kanidm_oauth2_basic.harbor will be updated in-place
  ~ resource "kanidm_oauth2_basic" "harbor" {
        id            = "eaa855c8-c19e-4e6a-82e6-07eae06ddf92"
        name          = "harbor"
      ~ redirect_uris = [
          - "https://harbor.animeteamspeak.moe/c/oidc/callback",
          + "https://harbor.apps.caosh.int.animeteamspeak.moe/c/oidc/callback",
        ]
        # (3 unchanged attributes hidden)

        # (8 unchanged blocks hidden)
    }

  # kanidm_oauth2_basic.karakeep will be updated in-place
  ~ resource "kanidm_oauth2_basic" "karakeep" {
        id                       = "85815ae5-475b-4001-bbb1-e4ec0cc72bfd"
        name                     = "karakeep"
      ~ redirect_uris            = [
          - "https://keep.animeteamspeak.moe/api/auth/callback/custom",
          + "https://keep.apps.caosh.int.animeteamspeak.moe/api/auth/callback/custom",
        ]
        # (4 unchanged attributes hidden)

        # (8 unchanged blocks hidden)
    }

  # kanidm_oauth2_basic.openwebui will be updated in-place
  ~ resource "kanidm_oauth2_basic" "openwebui" {
        id                                 = "279007e9-19ac-4d09-8ae3-41b698128cf8"
        name                               = "openwebui"
      ~ redirect_uris                      = [
          - "https://ai.animeteamspeak.moe/oauth/oidc/callback",
          + "https://ai.apps.caosh.int.animeteamspeak.moe/oauth/oidc/callback",
        ]
        # (4 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # kanidm_oauth2_basic.paperless will be updated in-place
  ~ resource "kanidm_oauth2_basic" "paperless" {
        id            = "2a183ebc-9a5a-49c5-ab97-415dcd84b807"
        name          = "paperless"
      ~ redirect_uris = [
          - "https://paper.animeteamspeak.moe/accounts/oidc/kanidm/login/callback/",
          + "https://paper.apps.caosh.int.animeteamspeak.moe/accounts/oidc/kanidm/login/callback/",
        ]
        # (3 unchanged attributes hidden)

        # (8 unchanged blocks hidden)
    }

  # kanidm_oauth2_basic.privatemedia will be updated in-place
  ~ resource "kanidm_oauth2_basic" "privatemedia" {
        id            = "277cb02e-e493-40a8-8792-be1d7908c51e"
        name          = "privatemedia"
      ~ redirect_uris = [
          - "https://admin.media.animeteamspeak.moe/oauth2/callback",
          + "https://admin.media.apps.caosh.int.animeteamspeak.moe/oauth2/callback",
        ]
        # (3 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # kanidm_oauth2_public.opencloud_web will be updated in-place
  ~ resource "kanidm_oauth2_public" "opencloud_web" {
        id            = "42a90867-b10b-4ebf-b68b-9d8fa873348b"
        name          = "opencloud-web"
      ~ redirect_uris = [
          - "https://cloud.animeteamspeak.moe/oidc-callback.html",
          - "https://cloud.animeteamspeak.moe/oidc-silent-redirect.html",
          + "https://cloud.apps.caosh.int.animeteamspeak.moe/oidc-callback.html",
          + "https://cloud.apps.caosh.int.animeteamspeak.moe/oidc-silent-redirect.html",
            # (4 unchanged elements hidden)
        ]
        # (2 unchanged attributes hidden)

        # (8 unchanged blocks hidden)
    }

Plan: 0 to add, 11 to change, 0 to destroy.

To apply this plan, please merge this pull request.

tf-controller plan output: ```hcl OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: ~ update in-place (current -> planned) OpenTofu will perform the following actions: # kanidm_group.opencloud_groups will be updated in-place ~ resource "kanidm_group" "opencloud_groups" { ~ entry_managed_by = "018fa4a0-0d5b-4068-98e0-534e0f00e735" -> "opencloud-bind@auth.animeteamspeak.moe" id = "c893a6cf-23b8-4569-942a-986bc20ad81d" ~ members = [ - "0c020e8a-2da6-415e-8316-7e5e873aae46", - "38068641-dba1-43cd-a178-37ecb01825d9", - "5fc24424-e6b0-4cef-8e73-e1c4e67f1af2", - "d131685d-249c-4adb-9941-600c6c1ddfb4", - "opencloud-bind@auth.animeteamspeak.moe", ] -> (known after apply) name = "opencloud-groups" # (1 unchanged attribute hidden) } # kanidm_oauth2_basic.actual will be updated in-place ~ resource "kanidm_oauth2_basic" "actual" { id = "816871ca-1c0d-4d3d-8605-6a377ec1f1ab" name = "actual" ~ redirect_uris = [ - "https://actual.animeteamspeak.moe/openid/callback", - "https://actual.animeteamspeak.moe/path/openid/callback", + "https://actual.apps.caosh.int.animeteamspeak.moe/openid/callback", + "https://actual.apps.caosh.int.animeteamspeak.moe/path/openid/callback", ] # (4 unchanged attributes hidden) # (8 unchanged blocks hidden) } # kanidm_oauth2_basic.argoworkflows will be updated in-place ~ resource "kanidm_oauth2_basic" "argoworkflows" { id = "aef88dc7-916e-4cfa-b907-a11864c8d65b" name = "argoworkflows" ~ redirect_uris = [ - "https://workflows.animeteamspeak.moe/oauth2/callback", + "https://workflows.apps.caosh.int.animeteamspeak.moe/oauth2/callback", ] # (4 unchanged attributes hidden) # (4 unchanged blocks hidden) } # kanidm_oauth2_basic.drop will be updated in-place ~ resource "kanidm_oauth2_basic" "drop" { id = "e84c437c-42f7-4ed1-95c3-101e8be45ee5" name = "drop" ~ redirect_uris = [ - "https://games.animeteamspeak.moe/api/v1/auth/oidc/callback", + "https://games.apps.caosh.int.animeteamspeak.moe/api/v1/auth/oidc/callback", ] # (4 unchanged attributes hidden) # (2 unchanged blocks hidden) } # kanidm_oauth2_basic.grafana will be updated in-place ~ resource "kanidm_oauth2_basic" "grafana" { id = "2c2b7c74-8a0d-4931-9869-91cbfdd1c2a3" name = "grafana" ~ redirect_uris = [ - "https://grafana.animeteamspeak.moe/login/generic_oauth", + "https://grafana.apps.caosh.int.animeteamspeak.moe/login/generic_oauth", ] # (3 unchanged attributes hidden) # (7 unchanged blocks hidden) } # kanidm_oauth2_basic.harbor will be updated in-place ~ resource "kanidm_oauth2_basic" "harbor" { id = "eaa855c8-c19e-4e6a-82e6-07eae06ddf92" name = "harbor" ~ redirect_uris = [ - "https://harbor.animeteamspeak.moe/c/oidc/callback", + "https://harbor.apps.caosh.int.animeteamspeak.moe/c/oidc/callback", ] # (3 unchanged attributes hidden) # (8 unchanged blocks hidden) } # kanidm_oauth2_basic.karakeep will be updated in-place ~ resource "kanidm_oauth2_basic" "karakeep" { id = "85815ae5-475b-4001-bbb1-e4ec0cc72bfd" name = "karakeep" ~ redirect_uris = [ - "https://keep.animeteamspeak.moe/api/auth/callback/custom", + "https://keep.apps.caosh.int.animeteamspeak.moe/api/auth/callback/custom", ] # (4 unchanged attributes hidden) # (8 unchanged blocks hidden) } # kanidm_oauth2_basic.openwebui will be updated in-place ~ resource "kanidm_oauth2_basic" "openwebui" { id = "279007e9-19ac-4d09-8ae3-41b698128cf8" name = "openwebui" ~ redirect_uris = [ - "https://ai.animeteamspeak.moe/oauth/oidc/callback", + "https://ai.apps.caosh.int.animeteamspeak.moe/oauth/oidc/callback", ] # (4 unchanged attributes hidden) # (4 unchanged blocks hidden) } # kanidm_oauth2_basic.paperless will be updated in-place ~ resource "kanidm_oauth2_basic" "paperless" { id = "2a183ebc-9a5a-49c5-ab97-415dcd84b807" name = "paperless" ~ redirect_uris = [ - "https://paper.animeteamspeak.moe/accounts/oidc/kanidm/login/callback/", + "https://paper.apps.caosh.int.animeteamspeak.moe/accounts/oidc/kanidm/login/callback/", ] # (3 unchanged attributes hidden) # (8 unchanged blocks hidden) } # kanidm_oauth2_basic.privatemedia will be updated in-place ~ resource "kanidm_oauth2_basic" "privatemedia" { id = "277cb02e-e493-40a8-8792-be1d7908c51e" name = "privatemedia" ~ redirect_uris = [ - "https://admin.media.animeteamspeak.moe/oauth2/callback", + "https://admin.media.apps.caosh.int.animeteamspeak.moe/oauth2/callback", ] # (3 unchanged attributes hidden) # (1 unchanged block hidden) } # kanidm_oauth2_public.opencloud_web will be updated in-place ~ resource "kanidm_oauth2_public" "opencloud_web" { id = "42a90867-b10b-4ebf-b68b-9d8fa873348b" name = "opencloud-web" ~ redirect_uris = [ - "https://cloud.animeteamspeak.moe/oidc-callback.html", - "https://cloud.animeteamspeak.moe/oidc-silent-redirect.html", + "https://cloud.apps.caosh.int.animeteamspeak.moe/oidc-callback.html", + "https://cloud.apps.caosh.int.animeteamspeak.moe/oidc-silent-redirect.html", # (4 unchanged elements hidden) ] # (2 unchanged attributes hidden) # (8 unchanged blocks hidden) } Plan: 0 to add, 11 to change, 0 to destroy. ``` To apply this plan, please **merge** this pull request.
ginjiruu merged commit 746ac16076 into master 2026-11-20 20:52:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/iac!173
No description provided.