Skip to content

Latest commit

 

History

History
1024 lines (733 loc) · 31.9 KB

CHANGELOG.md

File metadata and controls

1024 lines (733 loc) · 31.9 KB

Table of Contents

Release date: 2024/09/12

  • Prevent unset plugin's configuration "record" fields to be filled with empty tables: {} for deck files. Since, deck doesn't fill defaults anymore, this fix ensures that deck doesn't pass empty record fields while syncing plugin configurations. #467

Release date: 2024/09/04

  • Enhance the utils FillPluginsDefaults* functions to allow individually selecting whether to fill normal and auto fields with default values. #466

Release date: 2024/08/29

  • When fields marked as auto are passed to kong without a value they are auto generated by the gateway. In that case, comparing with "defaults" doesn't work, so in order to compute a correct diff they must be copied from Kong's configuration. This change adds a new FillPluginsDefaultsAutoFields utils function that in addition to default fields, adds auto fields to the configuration. It takes an additional parameter: oldPlugin, which represents the plugin as defined in the config from Kong: auto fields are copied from it so that they don't show up in the diff. #465

Release date: 2024/08/05

  • Fill default values for shorthand_fields in plugin configuration. If values are passed for shorthand_fields, they are retained and nested configuration is backfilled with shorthand_field values. #458

Release date: 2024/06/25

  • Breaking change ReloadDeclarativeRawConfig now doesn't return a response body as its first return value - the body can be obtained from APIError returned when the response is not successful. #453

Release date: 2024/06/25

  • ReloadDeclarativeRawConfig now returns APIError when it retrieves a valid HTTP response, allowing inspection of the response status code. #452

Release date: 2024/05/14

  • Add Validate method in SchemaService to validate arbitrary type of Kong entities. #443

Release date: 2024/04/03

  • Allow overriding Client request dispatch function. #430

Release date:

  • Support record-level default schema values. #431

Release date: 2024/03/26

  • Allow configuration of User-Agent for the client. #427

Release date: 2024/01/23

  • Added extract of details field in response when CRUD API fails to extract details from Konnect APIs. #399

Release date: 2024/01/09

  • Added workspace parameter to FillID method of entities to avoid entities with same key in different workspaces to have the same ID, which is unique cross all workspaces. #395

Release date: 2024/01/04

  • Added Validate method in vault service to validate vaults. #392
  • Added FillID() method for vault. #391

Release date: 2023/10/30

  • Route's priority field type is changed from int to uint64. #378
  • Fix a bug preventing users to set fields to empty arrays when a default for those fields exist. #374

Release date: 2023/08/29

  • Added method Validate to RouteService #368

Release date: 2023/07/17

  • Added method FillID() method for Consumer Group. #357
  • Added support for scoping plugins to Consumer Groups. #352

Release date: 2023/07/03

  • Added Client.Config handler, that can be used to obtain Kong's config. #354

Release date: 2023/06/22

  • Fix: handle empty array as nil when filling record defaults #345
  • Fix leaking response body from Client.Do(). From now on kong.Response does not contain the http.Response field which was in fact leaking the implementation detail. It now contains the response headers, status and status code. If users want to get the response body they can still provide the v parameter to Do() to get the body unmarshalled into it (or copied into it if an io.Writer was to be provided). #348

Release date: 2023/06/06

  • Added missing use_srv_name and healthchecks.active.headers to Upstream entity. #331
  • Fix regressions when filling defaults for set and record schema types. #333 #336

Release date: 2023/05/15

  • Added Details and SetDetails methods to APIError struct to enable propagating status-specific details in there. Introduced ErrTooManyRequestsDetails struct that's going to be available as an APIError's Details when Admin API returns status code 429 along with a Retry-After header. That should be useful for handling rate limiting on an application level. #323
  • Use modern schema retrieval function for plugin schema retrieval. This provides compatibility with upcoming Kong releases. #326

Release date: 2023/04/25

  • Added FillID method for Service, Route and Consumer entities. It allows setting a deterministic ID to an entity. #299

Release date: 2023/04/07

  • Added support for the /licenses endpoint. #304

Release date: 2023/04/05

This release reverts the fix from 0.39.1 while debugging an issue not originally caught in tests.

Release date: 2023/04/04

  • fix: default population now correctly handles arrays of records. #302

Release date: 2023/03/17

  • feat: add GraphQL-RateLimiting-Advanced and DeGraphQL DAOs (#288) #288

Release date: 2023/02/22

  • Omit response body from error when config push fails. The body can be quite large and will result in massive logs downstream if included in the error. The body is returned along with the error and downstream clients and log it separately if they so desire.

Release date: 2023/02/13

  • Added instance_name to Plugin schema. #280

Release date: 2023/02/03

  • Breaking change: the ConfigService is now directly embedded in the kong.Client. Configurations are collections of entities, not entities themselves, so they do not fit with other go-kong services.
  • Breaking change: ReloadDeclarativeRawConfig() (formerly part of ConfigService, now part of kong.Client) now has the response signature ([]byte, error) instead of error. The byte slice is the config response body. The error is unchanged.
  • Breaking change: ReloadDeclarativeRawConfig() now requires a flattenErrors boolean argument. When true, requests will include flatten_errors=1 in the query string, to activate the functionality added in Kong/kong#10161. #273

Release date: 2023/01/24

  • Added NewAPIErrorWithRaw() to return a go-kong APIError along with the original raw error body. #237 #267

Release date: 2023/01/19

  • Add consumer_groups tags support #265
  • Add IsForbiddenErr error checking for 403s #264

Release date: 2022/12/22

  • Fix ingestion of entity defaults with arbitray map values #258

Release date: 2022/12/19

  • Add support to consumer_groups #221
  • Add Keys and Key-sets as core entities #238
  • Add BaseRootURL() to Client #255
  • Add possibility to client to send declarative configs via ReloadDeclarativeRawConfig() #252
  • Add OAuth2 client_type field #235
  • Fix ingestion of entity defaults with map values #244
  • Add support to filling entity defaults using JSON schemas. #231

Release date: 2022/10/05

  • Add support to Kong Vaults #224
  • Add plugin to a route #217

Release date: 2022/08/23

This release is not yet fully compatible with Kong 3.x. The target service MarkHealthy() and MarkUnhealthy() functions do not yet work on 3.x. Other functionality supports 3.x, but may not yet support all new 3.x schema fields.

  • Added support for 3.x Enterprise version strings. #207
  • Added support for expression and priority route fields. #210
  • Dropped support for 1.5 Enterprise, which exited sunset support in 2022-04.
  • Added 3.x to test matrices.

Release date: 2022/08/23

  • Fixed support for plugins with IDs in ForService variants of plugin calls. #205

Release date: 2022/08/16

  • Updated to Go 1.19.
  • Added ForService variants of plugin calls, which use /service/<id>/plugins/ endpoints. #192
  • Added support for Kong 3.0 upstream fields. #200

Release date: 2022/07/11

  • Updated to Go 1.18. #164
  • Fixed an issue with the HTTP client wrapper not setting any transport when none was configured. It now uses the default transport. #179
  • Added support for the new ordering field on Enterprise 3.x plugins. #187

Release date: 2022/03/25

  • Fixed a bug where HTTPClientWithHeaders() could not accept a nil (default) client. #138
  • Fixed a bug where the plugin service's Validate() method could not handle errors associated with empty responses. #142
  • Fixed a bug where plugin schema default retrieval included fields outside the plugin's config object. #145
  • Fixed a typo in the EntityCRUD.CRUDPath JSON serialization. #149
  • Added support for the new configuration_hash field in the status service. #150
  • Fixed incorrect JSON marshalling/unmarshalling for RBAC endpoint permissions. #148
  • Fixed a bug with RBAC endpoint permission path construction. #148

Release date: 2022/02/22

  • Export the requiredFeatures struct to be able to use RunWhenEnterprise() in other packages. #135

Release date: 2022/02/14

  • The RunWhenKong() and RunWhenEnterprise() functions are now exported for other packages that need to condition tests on Kong versions. #132
  • RBAC permission actions are now an array of strings rather than a single comma-separated string to properly reflect their Kong type. #131
  • Enterprise versions returned by ParseSemanticVersion() now include their supplemental Enterprise version as build info, rather than as a prerelease. This fixes an issue where semver comparisons saw the initial patch of a minor release as a lower version of that release. #129

Release date: 2022/02/03

  • Zero values (boolean false and integer 0) now override default values when filling entity defaults. #125

Release date: 2022/01/31

  • Add missing entity fields from newer Kong releases. #120
  • Add SchemaService and FillEntityDefaults utility supporting filling defaults for Services, Routes, Upstream and Targets. #119
  • Add GetFullSchema to plugins to retrieve their complete schema. Also add FillPluginsDefaults utility to fill a plugin with its defaults. #114

Release date: 2021/12/08

v0.25.1 reverts the k8s.io/code-generator version originally used in v0.25.0 to avoid an unwanted upgrade of its github.com/go-logr/logr dependency.

Release date: 2021/12/08

  • Healthcheck types now include CRD validation annotations for Kubebuilder. #104

Release date: 2021/11/05

Added

  • A Listeners() method was added to the Kong Client in order to retrieve the proxy_listeners and stream_listeners from the root conveniently. #101

Release date: 2021/09/22

Breaking changes

  • The plugin service Validate() API's return signature is now bool, string, err rather than bool, err. The additional string value contains the validation failure reason if validation successfully determined that the proposed configuration was not valid. The err value is now only set if Validate() could not successfully retrieve validation information because of a timeout/DNS lookup failure/etc.

Release date: 2021/09/22

Added

  • Test that target updates work as expected. #85
  • Workspace service supports new ExistsByName() API. This is similar to Exists(), but it only accepts names, not IDs. This function can check if a workspace exists even if the RBAC user has access to that namespace only. Exists() requires access to the default namespace. #90

Fixed

  • The generic exists() client functions uses GETs instead of HEADs. Kong <=2.6 respond to HEAD requests with 200s as long as the endpoint has a valid form. They do not check if entities actually exist, and exists() would return true for entities that don't exist because of this. #90

Release date: 2021/08/26

Added

  • oauth2 entities support hash_secret. #74

Fixed

  • Plugin validation checks against the correct status code. #81

Release date: 2021/07/07

Added

  • FriendlyName is now defined for entities based on deck types. #68
  • Added Info service for interacting with information exposed by the admin API root endpoint. #65
  • Implemented client-level support for Kong workspaces. #62

Changed

  • Internally wrapped errors now use the standard Go library instead of a 3rd party wrapping lib and consequently several string versions of errors have changed. #66
  • Various improvements to repository CI: caching go modules, updating codegen, e.t.c.

Release date: 2021/05/05

Added

  • Client now allows reading the version of Kong. #48

Release date: 2021/05/05

Added

  • Workspace and tag existence functions. #56
  • Plugin schema retrieval. #57

Changed

  • The default client now sets a default timeout. #51
  • Optimized HTTP header handling. #49
  • Changed return type of kong.HTTPClientWithHeaders(...): now returns *http.Client instead of http.Client. #46
  • Now uses Go 1.16 module semantics. #40
  • Now uses Dependabot to manage GitHub Actions. #41, #42
  • Now uses code-generator v0.21.0. #43
  • CI no longer uses Bintray repositories. #55
  • Dropped testing against older versions of Kong. #58

Release date: 2021/04/05

Added

  • Added support for Developer entities. Thanks to @ChristianJacquot! #27
  • Added support for Developer Role entities. Thanks to @mmorel-35! #30
  • RBAC roles now support pagination and listing all entities. Thanks to @mmorel-35! #30
  • Tests can now require the Portal. Added helpers to enable the Portal and related settings. #30
  • Clients now use interfaces. Other libraries that use go-kong can define mock types that implement these interfaces for unit tests that do not require an actual Kong instance. #24

Fixed

  • RBAC roles now properly include their negative field in requests to Kong. #32

Release date: 2021/03/03

Added

  • Service now includes URL.

Release date: 2021/01/22

Added

  • Route now includes RequestBuffering and ResponseBuffering.

Release date: 2021/01/12

Breaking changes

  • HTTP error format changed to feature HTTP codes

Added

  • RBACUser support
  • Support for auto-expiring key-auth key TTL
  • Support for RBAC roles
  • Support for RBAC permissions
  • DeepCopy annotations for enterprise entities

Release date: 2020/08/04

Summary

This release renames the package from github.com/hbagdi/go-kong to github.com/kong/go-kong.

Release date: 2020/07/30

Summary

This release adds support for Kong 2.1 series and a number of enterprise entities.

Added

  • Added HTTPClientWithHeaders helper function to inject authn/authz related HTTP headers in requests to kong.

  • New fields in types:

    • Service struct has three new fields:
      • TLSVerifyDepth
      • TLSVerify
      • CACertificates
    • ClientCertificate field has been added to Upstream struct.
    • Type field has been added to PassiveHealthcheck struct.
  • Following new services for Kong Enterprise have been introduced:

    • WorkspaceService to manage workspaces in kong
    • AdminService to manage users of Kong Manager
    • MTLSAuthService to manage MTLS credentials

Misc

  • Changed the branch name from master to main
  • Introduced linters to improve code health

Release date: 2020/01/17

Summary

  • This release adds support for Kong 2.0.0.

Added

  • Threshold field has been added to Upstream struct.
  • PathHandling field has been added to Route struct.

Release date: 2019/10/27

Summary

  • This release adds support for Kong 1.4.

Added

  • HostHeader field has been added to Upstream struct.
  • Tags field has been added to the following types:
    • KeyAuth
    • Basicauth
    • HMACAuth
    • Oauth2Credential
    • ACLGroup
    • JWTAuth

Release date: 2019/08/24

Breaking changes

  • client.Do() returns a response object even on errors so that clients can inspect the response directly when needed. The error condition has changed to include HTTP status codes 300 to 399 as success and not failure. b1f9eda31
  • String() method has been dropped from all types defined in this package.

Added

  • NewRequest() method helping with creating HTTP requests is now exported
  • URLs parsed inside the package are more robust.
  • New method GetByCustomID has been introduced to fetch Consumers by custom_id.

Release date: 2019/08/21

Added

  • Oauth2Credential type and service has been added which can be used to create Oauth2 credentials in Kong for some Oauth2 flows.

Release date: 2019/08/13

Summary

This release brings support for CRUD methods for authentication credentials in Kong.

Added

  • The following credentials and corresponding services have been added:
    • key-auth
    • basic-auth
    • hmac-auth
    • jwt
    • acl

Release date: 2019/08/09

Fix

  • Add missing omitempty tag to ClientCertificate field

Release date: 2019/08/09

Fix

  • Fix a typo in Service struct definition for YAML tag

Release date: 2019/08/09

Summary

  • This release adds support for Kong 1.3.

Breaking change

  • Validator Interface has been dropped and Valid() method from all entities is dropped. #8

Added

  • Headers field has been added to Route struct. #5
  • ClientCertificate field has been added to Service struct. #5
  • CACertificate is a new core entity in Kong. A struct to represent it and a corresponding new service is added. #5
  • Algorithm field has been added to Upstream struct. #9

Release date: 2019/08/05

Fix

  • Add missing healthchecks.active.unhealthy.interval field to Upstream #6

Release date: 2019/06/07

Summary

  • This release adds support for Kong 1.2.

Added

  • Added HTTPSRedirectStatusCode property to Route struct. #3

Breaking change

  • Create() for Custom Entities now supports HTTP PUT method. If id is specified in the object, it will be used to PUT the entity. This was always POST previously. #3

Release date: 2019/04/11

Fix

  • Add omitempty property to Upstream fields for Kong 1.0 compatibility

Release date: 2019/04/06

Summary

  • This release adds support for features released in Kong 1.1. This version is compatible with Kong 1.0 and Kong 1.1.

Breaking Change

  • Please note that the version naming scheme for this library has changed from x.y.z to vX.Y.Z. This is to ensure compatibility with Go modules.

Added

  • Tags field has been added to all Kong Core entity structs.
  • List methods now support tag based filtering introduced in Kong 1.1. Tags can be ANDed or ORed together. ListOpt struct can be used to specify the tags for filtering.
  • Protocols field has been added to Plugin struct.
  • New fields Type, HTTPSSni and HTTPSVerifyCertificate have been introduced for Active HTTPS healthchecks.
  • TargetService has two new methods MarkHealthy() and MarkUnhealthy() to change the health of a target.

Release date: 2018/12/19

Summary

  • This release adds support for Kong 1.0. It is not compatible with 0.x.y versions of Kong due to breaking Admin API changes as the deprecated API entity is dropped.
  • The code and API for the library is same as 0.2.0, with the exception that struct defs and services related to API is dropped.

Breaking changes

  • API struct definition is no longer available.
  • APIService is no longer available. Please ensure your code doesn't rely on these before upgrading.
  • Plugin struct has dropped the API field.

Release date: 2018/12/19

Summary

  • This release adds support for Kong 0.15.x. It is not compatible with any other versions of Kong due to breaking Admin API changes in Kong for Plugins, Upstreams and Targets entities.

Breaking changes

  • Target struct now has an Upstream member in place of UpstreamID.
  • Plugin struct now has Consumer, API, Route, Service members instead of ConsumerID, APIID, RouteID and ServiceID.

Added

  • RunOn property has been added to Plugin.
  • New properties are added to Route for L4 proxy support.

Release date: 2018/12/01

Summary

  • Debut release of this library
  • This release comes with support for Kong 0.14.x
  • The library is not expected to work with previous or later releases of Kong since every release of Kong is introducing breaking changes to the Admin API.