Skip to content

Commit

Permalink
Add IP allowlist, release v0.3.2
Browse files Browse the repository at this point in the history
* feat: add ip config
* feat: add LastResetAt
* fix: fix URL to fetch API spec for automated drift detection
---------

Signed-off-by: Dmitry Kisler <admin@dkisler.com>
  • Loading branch information
kislerdm authored Dec 20, 2023
1 parent 7229155 commit d8f8812
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-api-spec-updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
curl -SLo openAPIDefinition_new.json "$SPEC_URL"
env:
SPEC_URL: https://dfv3qgd2ykmrx.cloudfront.net/api_spec/release/v2.json
SPEC_URL: https://neon.tech/api_spec/release/v2.json
- name: Diff spec files
id: diff
run: |
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.3.2] - 2023-12-20

The release incorporates the up-to-date [API contract](openAPIDefinition.json) as of 2023-12-20 10:37:20 GMT.

### Added

- Project level configuration of IP addresses allowed to connect to the endpoints.
- `LastResetAt` attribute indicating the last time when a branch was reset.

## [v0.3.1] - 2023-11-02

The release incorporates the up-to-date [API contract](openAPIDefinition.json) as of 2023-11-02 13:54:20 GMT.
Expand Down
8 changes: 5 additions & 3 deletions openAPIDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -4189,7 +4189,7 @@
"$ref": "#/components/schemas/EndpointPoolerMode"
},
"disabled": {
"description": "Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action. However, the compute endpoint is periodically \nenabled by check_availability operations.\n",
"description": "Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action. However, the compute endpoint is periodically\nenabled by check_availability operations.\n",
"type": "boolean"
},
"passwordless_access": {
Expand Down Expand Up @@ -4291,12 +4291,14 @@
],
"properties": {
"ips": {
"description": "A list of IP addresses that are allowed to connect to the endpoint.",
"type": "array",
"items": {
"type": "string"
}
},
"primary_branch_only": {
"description": "If true, the list will be applied only to the primary branch.",
"type": "boolean"
}
}
Expand Down Expand Up @@ -4349,7 +4351,7 @@
},
"disabled": {
"type": "boolean",
"description": "Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action. However, the compute endpoint is periodically \nenabled by check_availability operations.\n"
"description": "Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action. However, the compute endpoint is periodically\nenabled by check_availability operations.\n"
},
"passwordless_access": {
"type": "boolean",
Expand Down Expand Up @@ -4398,7 +4400,7 @@
"$ref": "#/components/schemas/EndpointPoolerMode"
},
"disabled": {
"description": "Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action. However, the compute endpoint is periodically \nenabled by check_availability operations.\n",
"description": "Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action. However, the compute endpoint is periodically\nenabled by check_availability operations.\n",
"type": "boolean"
},
"passwordless_access": {
Expand Down
6 changes: 4 additions & 2 deletions sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,10 @@ func (c Client) GetCurrentUserInfo() (CurrentUserInfoResponse, error) {
// If the list is empty, all IP addresses are allowed.
// If primary_branch_only is true, the list will be applied only to the primary branch.
type AllowedIps struct {
Ips []string `json:"ips"`
PrimaryBranchOnly bool `json:"primary_branch_only"`
// Ips A list of IP addresses that are allowed to connect to the endpoint.
Ips []string `json:"ips"`
// PrimaryBranchOnly If true, the list will be applied only to the primary branch.
PrimaryBranchOnly bool `json:"primary_branch_only"`
}

type ApiKeyCreateRequest struct {
Expand Down

0 comments on commit d8f8812

Please sign in to comment.