Repository navigation
edge.sh access: update reusable policies at the account endpoint; keep the minted secret on a redirected failure - #86
Merged
Conversation
…p the minted secret on a redirected failure Closes #85
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.
Fixes the two
edge.sh accessbugs from #85, found on nabz's first production run.What changed
edge.shreadsreusablefrom the app's policy list. A reusable policy is updated atPUT /accounts/{account}/access/policies/{id}, because Cloudflare refuses the app endpoint for it with error 12130. A legacy policy is still updated at the app endpoint. Creating a policy is unchanged.on_exitprints the minted secrets to fd 3. Before, adieinsidecf PUT … >/dev/nullran the EXIT trap with that redirection still active, so the secret it said it was printing went into/dev/null.reusableis refused at the app endpoint with 12130 and updated at the account endpoint, as Cloudflare does. A policy whose name containsfailfails its update, to simulate a failure after a token has been minted.Verification
./run-tests:(The skipped ones are
harden_test.sh, which only runs on a disposable machine, and the two Windows-only.ps1suites.)The new cases fail on
main'sedge.sh:Mutation test: with only the
>&3change reverted, the redirected-failure case fails:Not verified
The fix hasn't been run against the real Cloudflare API yet. The first real call will be nabz's production
infra-access, once nabz pins the release that contains this change.Closes #85