Repository navigation
docs: publish from CI with a system client's token - #50
Open
EgorPashko wants to merge 1 commit into
Open
EgorPashko wants to merge 1 commit into
EgorPashko wants to merge 1 commit into
Conversation
docs/publishing.md gains a section on publishing from CI: an administrator registers a system client for the document on the server, the job asks the server's token endpoint for the client's token with the client credentials grant, naming the organization's API resource, and runs loft publish with the token in LOFT_REMOTE_TOKEN and the document's address in LOFT_REMOTE_ENDPOINT. It says what the token reaches, that the job commits the labels and the lock back, and what a withdrawal or a rotation of the secret does to the job. The changelog records it under the line's section. Nothing in loft changes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
What changed and why
docs/publishing.mdgains a section, "Publishing from CI". Until now the page said only thatLOFT_REMOTE_ENDPOINTandLOFT_REMOTE_TOKENpoint a command at the server with a token of itsown; it did not say where a CI job gets one. Now it does: an administrator registers a system
client for the document on the server, the job asks the server's token endpoint for the client's
token with the client credentials grant, naming the organization's API resource, and runs
loft publishwith the token and the document's address. The section also says what the tokenreaches, that the job commits
spec/labels.yamlandloft.lock.jsonback, and what a withdrawalor a rotation of the secret does to the job.
CHANGELOG.mdrecords it under## Unreleased in 3.0.0. Nothing inloftchanges.How it fits
sequenceDiagram participant CI as CI job participant T as Token endpoint participant R as Document's remote CI->>T: grant_type=client_credentials, client_id, client_secret, resource T-->>CI: access_token, expires_in (an hour at most, no refresh token) CI->>R: loft publish, with LOFT_REMOTE_ENDPOINT and LOFT_REMOTE_TOKEN R-->>CI: the labels and the lock CI->>CI: commit spec/labels.yaml and loft.lock.jsonDeliberately missing
spec/: the criteria for the two variables stand in "Reaching a remote", and nonode governs
docs/.not the agent's.
Test plan
cargo nextest run -p loft-cli american_english(the guards module, 10 passed)🤖 Generated with Claude Code