Repository navigation
docs: reflect changes from lamassuiot#749 (refactor(authz): unify x-current-user and x-principal-id into a single header) - #27
Open
gh-lamassu-docsagent[bot] wants to merge 1 commit into
Conversation
Signed-off-by: Lamassu Docs Bot <lamassu-docs-bot@users.noreply.github.com>
Author
|
📖 Preview status: https://www.lamassu.io/docs/pr-preview/pr-27/ The workflow succeeded and the preview URL is reachable. Affected pages (1) — turn on Mostrar cambios in the preview to highlight what changed: |
Collaborator
|
fix it |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the user-facing changes from lamassuiot/lamassuiot.
Source: lamassuiot/lamassuiot#749
Summary
I'll load both skills first.
Both skills loaded. Now let me read the supplied context: PR metadata, changed-file list, and the conventions file.
The skill base directory is outside my allowed area. Let me check for a conventions file within the workspace and look at the overall structure.
No CONVENTIONS.md accessible (the skill dir is read-protected; I'll follow the workflow guidance in the skill text itself). Now let me read the diff — it's small (2 non-test files).
A tiny refactor diff:
x-current-user→X-Principal-IDin the ext-authz controller and the monolithic gateway's header propagation. The feature behind it is the external authorization (ext-authz) flow. Let me create my notes file and explore both the source behavior and existing docs coverage.Key find:
access-control.mdxline 60 documentsx-current-user— the exact header this PR removes. Let me search for all header references and the ext-authz docs.Only one stale reference in docs. Now let me understand the full ext-authz behavior from source. Reading the controller and the gateway assembler:
Now the monolithic gateway's header propagation and related header handling:
Now let me see how services consume
X-Principal-ID(admin-mode sentinel, authz middleware):I now have the full picture. Let me record facts and check the docs structure — the access-control page and any ext-authz related config docs:
The docs page is well-structured; only the line-60 statement is now stale. Let me check whether other docs mention the ext-authz gateway flow, config keys, or the monolithic gateway:
Let me check the deployment docs to understand which gateway carries the ext_authz flow in production, and read the troubleshooting page section:
Let me check if the source contains any Envoy ext_authz configuration that shows how the header propagates in the Kubernetes deployment, and check whether docs mention the monolithic gateway:
The docs describe the Envoy flow. Let me check whether any docs page covers the gateway's header handling (stripping) and look at the docs repo structure for the pki section:
Let me verify whether the source contains any Envoy config (for the helm path) showing how
X-Principal-IDpropagates, and check the wfx HTTP schema action names mentioned in the docs:All context gathered. The PR's user-facing impact is exactly one stale docs statement: the identity header returned by the ext-authz decision. Everything else in the access-control page remains accurate. Let me record the decision and apply the fix:
Now the embedded review pass. Let me verify the edited paragraph in context, confirm no remaining
x-current-userreferences anywhere in docs, and re-check the surrounding section for coherence:The edit reads coherently after the numbered decision flow, and no stale header references remain. Now the build gate:
No shell tool is available in this session, so I can't invoke
./context/check-builddirectly. Let me inspect what the check script validates so I can verify the same criteria manually:No shell tool is available to me, so I'll compensate with a rigorous manual verification of everything
check-buildcovers (frontmatter, meta.json slugs, MDX parsing, links) and flag the build step explicitly. First, final coherence checks across the docs:All structural checks pass. Let me do one last sweep for any Job Manager / integration page that might describe the identity header, then finalize:
Coverage assessment complete. Let me finalize my working notes with the done/left state:
Feature assessment (source PR #749)
The diff is a two-line header unification, but the feature behind it is the external authorization flow: the
authzservice exposes the Envoy-compatible/v1/ext_authz/checkendpoint; when it allows a request it returns the selected principal (the principal whose policy granted the HTTP route, else the first matched principal) in a response header, which the Gateway propagates downstream as the identity context. Before this PR the ext-authz service setx-current-user, which the monolithic gateway immediately translated intox-principal-id; nothing consumedx-current-useron its own. The PR standardizes onX-Principal-IDin both the ext-authz controller andpropagateAuthzHeaders— the header already used as the internal trust sentinel (admin-modebypass in the authz gin-middleware, gateway header stripping, internal service-to-service clients).Doc-worthiness: yes — a small diff that reveals a stale docs statement. A reader following
access-control.mdxwould be told the wrong header name.What I changed
docs/content/docs/platform/pki/access-control.mdx(1 sentence, line 60): the sentence describing the allow path now readsauthzdevuelve el principal seleccionado en la cabecera de respuestaX-Principal-ID(previouslyx-current-user), keeping the existing hedged "El Gateway puede propagar esa cabecera al servicio…". Verified against source: only this page referenced the removed header; the rest of the page (ext-authz flow steps,failOpen, multi-principal semantics, bootstrap, troubleshooting) remains accurate, so no restructuring.Embedded review findings (software-documentation-reviewer)
MatchedPrincipalIDbehavior; header spelling matches the PR and code (header names are case-insensitive on the wire).X-Principal-Idis verified only for the monolithic gateway, while this section describes the Envoy flow — documenting it would overstate; not part of this PR's user-facing change.Build readiness
./context/check-build: this session exposes no shell/execute tool (only file tools). Instead I manually verified everything the script's failure classes cover: frontmatter intact (stringtitle/description),meta.jsonfiles untouched and valid (theaccess-controlslug still resolves), the edit is prose-only with inline backticks — no<,{, JSX, imports, or new links — and no files added/moved/deleted. The application must run the build before publishing; the risk from this edit is minimal.Summary for the docs PR body