vault (Fix): OIDC UI callback on the ADR-0005 OpenBao name #180

Merged
ginjiruu merged 1 commit from openbao-oidc-adr-name into master 2026-11-21 01:22:23 +00:00
Owner

Answers the OpenBao OIDC question from the cutover audit (#179).

Which instance is which

  • vault stack here → c1 OpenBao (openbao-config, VAULT_ADDR=https://10.30.20.21:8200). It does manage the oidc/ mount and its default role, so pointing the provider at OpenBao covered the config. The role's allowed_redirect_uris still listed https://vault.animeteamspeak.moe/..., a name that always pointed at mini's legacy Vault, never at this OpenBao. The c1 UI OIDC login has never had a valid callback.
  • vault.apps.caosh.int → mini's legacy Vault (OpenBao 2.0.4, ns vault, backs ClusterSecretStore/vault-backend). It is not in this repo, and its own oidc/ role is configured by hand inside it.

This PR

  • c1 role allowed_redirect_uris = https://secrets.infra.caosh.int.animeteamspeak.moe:8200/ui/vault/auth/oidc/oidc/callback. The name comes from machine-configs ADR-0005 ("OpenBao's API name becomes secrets.infra.caosh.int.animeteamspeak.moe").
  • The kanidm vault client (shared by both instances, oidc_client_id = "vault") allows both UI callbacks: mini's vault.apps.caosh.int and c1's ADR name.

Not live until #50

secrets.infra.caosh.int.animeteamspeak.moe has no DNS record yet, and the think API certs carry openbao.int... + IP SANs only. #50 tracks both: the record, below the cluster layer, plus the cert reissue. Until then, c1 UI OIDC still can't complete. Note that #50's body says secrets.infra.int... without the site code, while ADR-0005 has the newer secrets.infra.caosh.int...; this PR follows the ADR.

Checks

tofu fmt -check clean; branch plans decoded with tofu 1.12.1: openbao-config-pr-180 has 1 update (vault_jwt_auth_backend_role.animeteamspeak_default_role allowed_redirect_uris only); kanidm-config-pr-180 has 1 update (kanidm_oauth2_basic.vault redirect_uris gains the c1 callback). Nothing else.

Answers the OpenBao OIDC question from the cutover audit (#179). ## Which instance is which - **`vault` stack here → c1 OpenBao** (`openbao-config`, `VAULT_ADDR=https://10.30.20.21:8200`). It does manage the `oidc/` mount and its `default` role, so pointing the provider at OpenBao covered the config. The role's `allowed_redirect_uris` still listed `https://vault.animeteamspeak.moe/...`, a name that always pointed at mini's legacy Vault, never at this OpenBao. The c1 UI OIDC login has never had a valid callback. - **`vault.apps.caosh.int` → mini's legacy Vault** (OpenBao 2.0.4, ns `vault`, backs `ClusterSecretStore/vault-backend`). It is not in this repo, and its own `oidc/` role is configured by hand inside it. ## This PR - c1 role `allowed_redirect_uris` = `https://secrets.infra.caosh.int.animeteamspeak.moe:8200/ui/vault/auth/oidc/oidc/callback`. The name comes from machine-configs ADR-0005 ("OpenBao's API name becomes `secrets.infra.caosh.int.animeteamspeak.moe`"). - The kanidm `vault` client (shared by both instances, `oidc_client_id = "vault"`) allows both UI callbacks: mini's `vault.apps.caosh.int` and c1's ADR name. ## Not live until #50 `secrets.infra.caosh.int.animeteamspeak.moe` has no DNS record yet, and the think API certs carry `openbao.int...` + IP SANs only. #50 tracks both: the record, below the cluster layer, plus the cert reissue. Until then, c1 UI OIDC still can't complete. Note that #50's body says `secrets.infra.int...` without the site code, while ADR-0005 has the newer `secrets.infra.caosh.int...`; this PR follows the ADR. ## Checks `tofu fmt -check` clean; branch plans decoded with tofu 1.12.1: `openbao-config-pr-180` has 1 update (`vault_jwt_auth_backend_role.animeteamspeak_default_role` allowed_redirect_uris only); `kanidm-config-pr-180` has 1 update (`kanidm_oauth2_basic.vault` redirect_uris gains the c1 callback). Nothing else.
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:

  # vault_jwt_auth_backend_role.animeteamspeak_default_role will be updated in-place
  ~ resource "vault_jwt_auth_backend_role" "animeteamspeak_default_role" {
      ~ allowed_redirect_uris        = [
          - "https://vault.animeteamspeak.moe/ui/vault/auth/oidc/oidc/callback",
          + "https://secrets.infra.caosh.int.animeteamspeak.moe:8200/ui/vault/auth/oidc/oidc/callback",
        ]
        id                           = "auth/oidc/role/default"
        # (26 unchanged attributes hidden)
    }

Plan: 0 to add, 1 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: # vault_jwt_auth_backend_role.animeteamspeak_default_role will be updated in-place ~ resource "vault_jwt_auth_backend_role" "animeteamspeak_default_role" { ~ allowed_redirect_uris = [ - "https://vault.animeteamspeak.moe/ui/vault/auth/oidc/oidc/callback", + "https://secrets.infra.caosh.int.animeteamspeak.moe:8200/ui/vault/auth/oidc/oidc/callback", ] id = "auth/oidc/role/default" # (26 unchanged attributes hidden) } Plan: 0 to add, 1 to change, 0 to destroy. ``` To apply this plan, please **merge** this pull request.
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_oauth2_basic.vault will be updated in-place
  ~ resource "kanidm_oauth2_basic" "vault" {
        id            = "1d7cf580-ffc7-4f82-af01-2b90c990fc5b"
        name          = "vault"
      ~ redirect_uris = [
          + "https://secrets.infra.caosh.int.animeteamspeak.moe:8200/ui/vault/auth/oidc/oidc/callback",
            # (1 unchanged element hidden)
        ]
        # (3 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

Plan: 0 to add, 1 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_oauth2_basic.vault will be updated in-place ~ resource "kanidm_oauth2_basic" "vault" { id = "1d7cf580-ffc7-4f82-af01-2b90c990fc5b" name = "vault" ~ redirect_uris = [ + "https://secrets.infra.caosh.int.animeteamspeak.moe:8200/ui/vault/auth/oidc/oidc/callback", # (1 unchanged element hidden) ] # (3 unchanged attributes hidden) # (4 unchanged blocks hidden) } Plan: 0 to add, 1 to change, 0 to destroy. ``` To apply this plan, please **merge** this pull request.
ginjiruu merged commit 80702e77e1 into master 2026-11-21 01:22:23 +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!180
No description provided.