Repository navigation
Conversation
…ngs (#1112) - postgres create: --ip-allow IP_OR_CIDR:PORTS[=DESCRIPTION] (repeatable) and --block-public-access. - postgres update: --add-ip-allow and --remove-ip-allow, which matches a rule ID or every rule for a source against the current list. - postgres get lists the IP rules and their IDs. - pgConfig validation accepts the 22 new settings and checks the four closed-value ones. Co-authored-by: Alasdair Brown <sdairs@users.noreply.github.com>
|
|
…ickstack-c05d' into cursor/openapi-drift-1112-cli-postgres-c05d Co-authored-by: Alasdair Brown <sdairs@users.noreply.github.com>
cursor
Bot
changed the base branch from
cursor/openapi-drift-remediation-1112-c05d
to
cursor/openapi-drift-1112-api-clickstack-c05d
October 21, 2026 21:03
This was referenced Oct 21, 2026
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.
CLI exposure for the Postgres part of the #1112 drift remediation. Refs #1112. Stacked on API 3 (#1121,
cursor/openapi-drift-1112-api-clickstack-c05d), which it merges; the Postgres library changes it uses are in API 1 (#1117).Follow-up issues
I can't open issues from this environment. This PR's tracking issue would read:
Changes
postgres createadds--ip-allow IP_OR_CIDR:PORTS[=DESCRIPTION](repeatable).PORTSis5432,6432or an inclusive range like5432..6432. Sources must be IPv4 (the API ignores IPv6), and clap rejects bad input as a usage error.--block-public-accesssends an empty list; it conflicts with--ip-allow. Without either flag, the request still omitsipAccessList, which keeps the API's allow-all default.postgres updateadds--add-ip-allow(same syntax) and--remove-ip-allow RULE_ID_OR_SOURCE. Removal matches a rule ID or every rule for a source (a bare IP means its/32) against the list returned by the pre-update GET. The update already did that GET for tags; it now also runs with--clear-tagswhen a removal is requested, and the permission declaration says so. An unmatched value is a usage error before any PATCH, mirroringcloud service update --remove-ip-allow.postgres get(human output) lists the rules with their IDs, ornone (public access blocked)for an empty list.pgConfig: the 22 new settings are accepted, anddefault_toast_compression,enable_parallel_hash,io_methodandlog_lock_waitsare checked against the libraryVALUES.cli-help-textskill. The create help warns about the allow-all default, and the update help notes that removals apply first and can partially succeed.docs/guides/managed-postgres.mdgains a "Restrict network access" section.Tests
--block-public-access/--ip-allowconflict, value validation (IPv6, CIDR prefix, port range bounds and order, empty description).ipAccessListpatch serialization).--clear-tags); an unmatched removal exits 2 without a PATCH;getprints the rules.Verification
cargo fmt --all --check,cargo clippy -p clickhousectl -- -D warnings,cargo clippy -p clickhousectl --all-targets --no-default-features -- -D warnings,cargo check -p clickhousectl --no-default-featuresandcargo test -p clickhousectlall pass. No files added or renamed.