This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new e590614a67b [infra] Opt in to immutable OIDC subject claims (#4712)
e590614a67b is described below

commit e590614a67b94dd0cfbf59985ae75d3e14b63e91
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Wed Nov 25 16:38:07 2026 +0800

    [infra] Opt in to immutable OIDC subject claims (#4712)
    
    ## Summary
    
    Opt in to GitHub Actions' immutable OIDC subject claim format by setting
    `github.oidc_subject.use_immutable_subject: true` in `.asf.yaml`.
    
    This changes the `sub` claim in GitHub-issued OIDC tokens for this
    repository:
    
    - **Before**: `repo:apache/doris-website:ref:refs/heads/master`
    - **After**:
    `repo:apache@47359/doris-website@149782046:ref:refs/heads/master`
    
    The suffix (`:ref:refs/heads/master`) is unchanged; the repository is
    now identified by its immutable owner and repository IDs (owner `apache`
    = `47359`, repository `doris-website` = `149782046`).
    
    ## Why
    
    Cloud trust policies authorize a workflow by matching the OIDC `sub`
    claim. The name-based claim can match a different repository if
    `apache/doris-website` were renamed, deleted, and re-created. The
    ID-based claim cannot: a re-created repository gets different IDs, so it
    cannot satisfy a trust policy written for the original one.
    
    This follows GitHub's [immutable subject
    
claims](https://docs.github.com/en/actions/reference/security/oidc#immutable-subject-claims)
    guidance. GitHub uses this format by default for repositories created
    after 2026-07-15; older repositories keep the name-based format until
    they opt in.
    
    ## Required coordinated change (Aliyun RAM) — do this BEFORE merging
    
    `.asf.yaml` changes the token GitHub issues, but Aliyun validates it.
    Both OIDC roles must accept the new subject first:
    
    - the website deploy role (`vars.ALIYUN_WEBSITE_ROLE_ARN`)
    - the archived-PDF role (`vars.ALIYUN_WEBSITE_PDF_ROLE_ARN`)
    
    Current trust condition (both roles):
    
    ```json
    "StringEquals": {
      "oidc:iss": "https://token.actions.githubusercontent.com";,
      "oidc:aud": "sts.aliyuncs.com",
      "oidc:sub": "repo:apache/doris-website:ref:refs/heads/master"
    }
    ```
    
    Recommended migration:
    
    1. Add the new `sub` while keeping the old one (two statements, or a
    list of values), so both formats are accepted:
       `repo:apache@47359/doris-website@149782046:ref:refs/heads/master`
    2. Merge this `.asf.yaml` change.
    3. Run the **Verify Website OSS OIDC** workflow (`workflow_dispatch`,
    master only) to confirm the new subject can assume the website role.
    Optionally run a manual deploy or the archived-PDF workflow.
    4. Remove the old `sub` from both trust policies.
    
    If this is merged before RAM is updated, OIDC token exchange fails and
    the website deploy (push to `master` / manual deploy) plus the
    archived-PDF upload will fail until the trust policy is corrected.
    
    ## Scope and non-goals
    
    - This pins **who the repository is** (immutable IDs), not **which
    workflow** may assume the role. Any workflow on `refs/heads/master` with
    `id-token: write` still produces a matching subject. Pinning the
    workflow (`include_claim_keys: [repo, context, job_workflow_ref]`) would
    require per-workflow RAM trust statements — the website role is shared
    by the cron deploy, manual deploy, and the OIDC probe — and is left as a
    follow-up.
    - This does not replace branch protection or review requirements. A
    malicious commit merged to `master` can still use the role; review
    hardening is the control for that.
    - No change to the `aud`, `iss`, or session duration.
    
    ## Rollback
    
    Reverting requires `use_immutable_subject: false` (removing the key
    leaves the format as-is, per the asfyaml documentation), plus the
    corresponding RAM trust policy change.
    
    ## Validation
    
    - `.asf.yaml` parses as valid YAML and the block matches the
    `github.oidc_subject` schema documented by
    `apache/infrastructure-asfyaml`.
    - `oidc_subject` is a newer asfyaml setting; please validate it against
    the ASF asfyaml deployment/sandbox before merge.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-authored-by: morningman <[email protected]>
    Co-authored-by: Claude Code <[email protected]>
---
 .asf.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
index c429645af52..c4ff473edad 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -41,6 +41,11 @@ github:
     squash:  true
     merge:   false
     rebase:  false
+  # Opt in to the immutable, ID-based OIDC subject claim. The default claim
+  # repo:apache/doris-website:ref:refs/heads/master becomes
+  # repo:apache@47359/doris-website@149782046:ref:refs/heads/master.
+  oidc_subject:
+    use_immutable_subject: true
   pull_requests:
     allow_update_branch: true   
     del_branch_on_merge: true


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to