Skip to content

Releases: networknt/light-4j

1.5.25

24 Dec 16:37
Compare
Choose a tag to compare

1.5.25 (2018-12-24)

Full Changelog

Closed issues:

  • give wait a default value for backward compatibility #339

1.5.24

15 Dec 04:11
Compare
Choose a tag to compare

1.5.24 (2018-12-15)

Full Changelog

Implemented enhancements:

  • Attachment Handler #326
  • refactor the dump handler to support response body logging #23

Closed issues:

  • ignore the random number test in balance #338
  • add a new services method to the Cluster #336
  • make round robin load balance start with random number #335
  • A bug that shows Unknown protocol light in service discovery #334
  • In consul client the hard coded wait value changed through configuration. #332
  • add a new method to get local IP for interactive queries #331

Merged pull requests:

Upgrade Guidelines:

  • This is a release to fix defects and add features so it is backward compatible in the codebase. Just update the version in your pom.xml should work.
  • If you are using consul.yml to connect to a Consul cluster for service discovery, you need to add one more config into the consul.yml
# endpoints that support blocking will also honor a wait parameter specifying a maximum duration for the blocking request.
# This is limited to 10 minutes. This value can be specified in the form of "10s" or "5m" (i.e., 10 seconds or 5 minutes,
# respectively).
wait: 600s
  • Upgrade json-schema-validator to 0.1.25 if you are using light-rest-4j.
        <version.json-schema-validator>0.1.25</version.json-schema-validator>

1.5.23

01 Dec 19:11
Compare
Choose a tag to compare

1.5.23 (2018-12-01)

Full Changelog

Closed issues:

  • light-4j benchmark #315
  • Need to allow server to be embedded #312

Upgrade Guidelines:

  • This is a release to fix defects and add features so it is backward compatible. Just update the version in your pom.xml should work.

1.5.22

10 Nov 16:05
Compare
Choose a tag to compare

1.5.22 (2018-11-10)

Full Changelog

Fixed bugs:

  • handle the situation that the alias is not server in the server.keystore #317

Closed issues:

  • add monad-result module to wrap success T and failure Status #325
  • add successful status code to status.yml #324
  • gzip and deflate encoding and decoding support in middleware handlers #323
  • add static CONFIG_NAME to serverConfig #320
  • add another default method in LightHttpHandler to bubble up the status #319
  • support default path in handler.yml for single page application #316
  • update status.yml ERR10016 to have only one parameter #314

Merged pull requests:

  • fixes #316 update resource and handler to support SPA from handler.yml #318 (stevehu)
  • Refactored code from main() to init() so server can be embedded. #311 (farrukhnajmi)

Upgrade Guidelines:

  • This is a release to fix defects and add features so it is backward compatible. Just update the version in your pom.xml should work.

1.5.21

26 Oct 20:25
Compare
Choose a tag to compare

1.5.21 (2018-10-26)

Full Changelog

Implemented enhancements:

  • Collect environment element in the Metrics Handler #310
  • Enhance logging in the AuditHandler #295
  • Environment config in client only applications #272

Fixed bugs:

  • Set correct status code if Method or URI from request could not be resolved in the handler chain #308

Upgrade Guidelines:

  • This is a release to fix defects and add features so it is backward compatible. Just update the version in your pom.xml should work.
  • If you access the service with a wrong path/method combination, an exception will show up in the log. This won't impact the functionality of the service and there is a workaround documented at #314

1.5.20

05 Oct 12:18
Compare
Choose a tag to compare

1.5.20 (2018-10-05)

Full Changelog

Fixed bugs:

  • MiddlewareHandler.register is called for each endpoint #305

Closed issues:

  • Handler needs to properly escape characters in the Status description #306
  • provide default security.yml and move providerId to jwt.yml #304
  • Indicate that the BufferSize is too small in client.yml if Body cannot be parsed #302
  • Intermittent issues with Consul API discovery #301
  • make bufferSize configurable for default buffer pool in Http2Client #299
  • Add more debug info during startup for the Kubernetes status.hostIP #297
  • Update the config module output to error only when config file not found #294
  • Update OAuthHelper to include new method to support SAML grant type flow #290
  • server does not create zip file from config server correctly #157

Upgrade Guidelines:

  • This is a release to fix defects and add features so it is backward compatible. Just update the version in your pom.xml should work.
  • The bufferSize has been added to the client.yml config file for Http2Client if the request body is bigger than 24KB which is the default if it is not set.
  • A default security.yml for JwtHelper is included in the security module. To enable or disable Jwt verification and scope verification can be done by both security.yml or framework specific security config like openapi-security.yml

1.5.19

22 Sep 12:33
Compare
Choose a tag to compare

1.5.19 (2018-09-22)

Full Changelog

Fixed bugs:

  • Consul heartbeat stream limit being exceeded #279

Closed issues:

  • Update the config module output to error only when config file not found #294
  • move light-tokenization status codes to status.ym in light-4j #289
  • remove unused status code from status.yml #288
  • add status code for user-management in light-portal #287
  • fix a typo in HashUtil #286
  • BodyHandler Middleware to support configurable Content-Type #285
  • add pattern matching to differentiate email and userId in StringUtils #283
  • update EmailSender to trust the host from the email.yml #278
  • change email module name to email-sender #277
  • create http-url module for url related utility #276
  • create a new http-string module that depends on Undertow #275
  • add replaceOnce to StringUtil in utility module #274
  • set the right default port number for DirectRegistry #273
  • add error codes for light-config-server #271
  • rename datasource to data-source #269
  • rename deref to deref-token #268
  • rename limit to rate-limit #267
  • rename basic to basic-auth #266
  • update deregisterAfter from 90m to 2m #264
  • OpenAPI and GraphQL ValidatorHandlers conflict on config file names #252
  • add a handler for IP whitelisting #235

Merged pull requests:

  • Updated oauth helper files to handle SAMLBearer grant type #292 (dguncb)
  • Update Readme #284 (anilmuppalla)
  • Related to #249, adds an EndpointSource interface for injecting path,… #282 (logi)
  • fixes #279 Consul heartbeat stream limit being exceeded #281 (stevehu)
  • enhancement for light-oauth2 provider module #265 (stevehu)

Upgrade Guidelines:

This release added more features and fixed several bugs. It should be backward compatible for most existing services. Just update the pom.xml version should work from previous release 1.5.18. If you are in an older version, please follow the guideline to upgrade to 1.5.18 first or just regenerate your project with the latest light-codegen.

  • Several modules are renamed with two words and they are all optional modules. If you are using them, please update the pom.xml in the dependencies section. They are basic-auth, rate-limit, deref-token email-sender, and data-source.
  • A new module http-string is created with all the Undertow HTTP headers. This is extracted from the utility module to remove the dependency of Undertow from the utility. If you see some HTTP Header cannot be resolved, please add this into the dependencies.
  • A typo is fixed in the HashUtil and this utility used internally most of the case.
  • ip-whitelist is a new security middleware handler. It will be used for /health to ensure requests are from Consul cluster.
  • multiple chains defined in handler.yml is the recomended way to handle middleware handlers instead of service.yml file. For more info on how to config it, please see example at https://github.com/networknt/light-example-4j/tree/master/middleware-performance

1.5.18

16 Aug 14:10
Compare
Choose a tag to compare

1.5.18 (2018-08-15)

Full Changelog

Implemented enhancements:

  • Support HandlerProvider definitions in handler.yml configuration definitions #258
  • When stopping the server, give 30 seconds grace period to let service discovery propagate to all clients #20

Fixed bugs:

  • Fix issue causing path variables not to show up in query params when using new handler config #250
  • Reproduce issue in handler chaining, ensure that the MiddlewareHandler interface is respected #247

Closed issues:

  • Re-starting Server no longer works #263
  • health endpoint with serviceId as path parameter #262
  • Address graceful server shutdown while encountering an exception during start-up #261
  • add a default consul.yml for consul client #260
  • flatten the config files into the same directory for k8s #257
  • add getJwtClaimsWithExpiresIn for digital signing only in light-oauth2 token service #256
  • remove description in the CorrelationHandler config file #255
  • enable http2 for consul client when TLS is enabled #246
  • catastrophic setExchangeStatus calls without args #244
  • upgrade to undertow 2.0.11.Final #243
  • several enhancements for Consul registration #242
  • networknt page is not working #238
  • extend Http2Client to OAuth 2.0 provider communication to support arbitrary number of parameters #181

Merged pull requests:

  • Adding HandlerProvider support to list of handlers. #259 (NicholasAzar)
  • Do not require ignored config #254 (logi)
  • Descriptive Exception on unknown chain or handler in handler.yml #253 (logi)
  • Fix issue causing query params to be missing from exchange. #251 (NicholasAzar)
  • Safer set exchange status #245 (logi)

Upgrade Guidelines:

  • There are two dependencies are upgraded in this release.
<version.undertow>2.0.11.Final</version.undertow>
<version.json-schema-validator>0.1.21</version.json-schema-validator>
  • A new consul.yml has been introduced to provide three options for health checks. httpCheck is recommended.
# Consul URL for accessing APIs
consulUrl: https://198.55.49.188:8500
# deregister the service after the amount of time after health check failed.
deregisterAfter: 2m
# health check interval for TCP or HTTP check. Or it will be the TTL for TTL check. Every 10 seconds,
# TCP or HTTP check request will be sent. Or if there is no heartbeat request from service after 10 seconds,
# then mark the service is critical.
checkInterval: 10s
# One of the following health check approach will be selected. Two passive (TCP and HTTP) and one active (TTL)
# enable health check TCP. Ping the IP/port to ensure that the service is up. This should be used for most of
# the services with simple dependencies. If the port is open on the address, it indicates that the service is up.
tcpCheck: false
# enable health check HTTP. An HTTP get request will be sent to the service to ensure that 200 response status is
# coming back. This is suitable for a service that depends on a database or other infrastructure services. You should
# implement a customized health check handler that checks dependencies. i.e. if DB is down, return status 400.
httpCheck: true
# enable health check TTL. When this is enabled, Consul won't actively check your service to ensure it is healthy,
# but your service will call check endpoint with a heartbeat to indicate it is alive. This requires that the service
# is built on top of light-4j and the above options are not available. For example, your service is behind NAT.
ttlCheck: false

Here is the document on how to use it.

https://doc.networknt.com/tutorial/common/discovery/http-health/

  • Consul client parameters are moved to consul.yml from service.yml
- com.networknt.consul.client.ConsulClient:
  - com.networknt.consul.client.ConsulClientImpl
  • A new handler.yml has been introduced to support multiple middleware handler chains. For more detail please refer to https://doc.networknt.com/concern/handler/

  • All config files in tls and oauth subfolders are moved to the parent config directory for Kubernetes and Openshift secrets creation. The following files have references to the files in sub folders before and need to be updated. server.yml, client.yml, security.yml and jwt.yml

1.5.17

15 Jul 22:11
Compare
Choose a tag to compare

1.5.17 (2018-07-15)

Full Changelog

Closed issues:

  • update readme.md to fix the document links #239

Upgrade Guidelines:

This release contains only small enhancements and it is backward compatible.

1.5.16

05 Jul 21:18
Compare
Choose a tag to compare

1.5.16 (2018-07-05)

Full Changelog

Implemented enhancements:

  • Add "severity" to Status #232
  • Extending handler chain configuration functionality #222

Closed issues:

  • move HandlerProvider interface to handler package from server #236
  • separate de-reference middleware handler to its own module #233
  • add error status for token dereference in light-oauth2 token service #230
  • add an error status code for light-oauth2 client registration #229
  • log the class, method, file and line number for status #228
  • move the basic authentication middleware handler from light-rest-4j #226
  • enhance client module to add de-reference token in OauthHelper #225
  • Add a middleware handler to de-reference opaque access token to JWT #224
  • log error if config file cannot be found in all possible locations #223

Merged pull requests:

Upgrade Guidelines:

Most changes in this release are backward compatible except the HandlerProvider package name change. If you have an existing project, you need to update two different places.

  • In service.yml config file
# HandlerProvider implementation
- com.networknt.server.HandlerProvider:
  - com.networknt.oauth.client.PathHandlerProvider

change to

# HandlerProvider implementation
- com.networknt.handler.HandlerProvider:
  - com.networknt.oauth.client.PathHandlerProvider
  • If you have any classes that import HandlerProvider, you need to change the package name after upgrade to 1.5.16 and your IDE will help you to resolve the issue.

If you have too many projects that need to be updated in a batch, please take a look at regex-replace at https://github.com/networknt/light-config-test/tree/master/light-bot/regex-replace/replace-all

Here is the section in the config file.

- glob: "{**/service.yml,**/service.yml.rocker.raw}"
  match: com.networknt.server.HandlerProvider
  old_value: "server"
  new_value: "handler"

- glob: "{**/*.java}"
  match: com.networknt.server.HandlerProvider
  old_value: "server"
  new_value: "handler"