Releases: cisco-open/go-lanai
v0.15.1
Description
Minor release to upgrade Go and Nodejs dependencies
Upgraded Go Modules
Library | From | To |
---|---|---|
github.com/rs/cors | v1.10.1 | v1.11.0 |
github.com/hashicorp/vault/api | v1.12.2 | v1.14.0 |
github.com/hashicorp/vault/api/auth/kubernetes | v0.6.0 | v0.7.0 |
github.com/hashicorp/go-retryablehttp | v0.6.6 | v0.7.7 |
github.com/cockroachdb/copyist | v1.6.0 | v1.7.0 |
github.com/jackc/pgproto3/v2 | v2.1.1 | v2.3.2* |
github.com/jackc/pgconn | v1.10.0 | v1.14.1* |
------- | ----- | ----- |
github.com/IBM/sarama | v1.43.0 | v1.43.2 |
github.com/beevik/etree | v1.3.0 | v1.4.1 |
github.com/aws/aws-sdk-go-v2 | v1.26.0 | v1.30.3 |
github.com/aws/aws-sdk-go-v2/config | v1.27.8 | v1.27.27 |
github.com/aws/aws-sdk-go-v2/credentials | v1.17.8 | v1.17.27 |
github.com/aws/aws-sdk-go-v2/service/acm | v1.25.3 | v1.28.4 |
github.com/aws/aws-sdk-go-v2/service/sts | v1.28.5 | v1.30.3 |
github.com/getkin/kin-openapi | v0.123.0 | v0.127.0 |
github.com/gin-gonic/gin | v1.9.1 | v1.10.0 |
github.com/go-playground/validator/v10 | v10.19.0 | v10.22.0 |
github.com/go-git/go-git/v5 | v5.11.0 | v5.12.0 |
github.com/go-redsync/redsync/v4 | v4.12.1 | v4.13.0 |
github.com/gorilla/websocket | v1.5.1 | v1.5.3 |
github.com/hashicorp/consul/api | v1.28.2 | v1.29.2 |
github.com/jackc/pgx/v5 | v5.5.5 | v5.6.0 |
github.com/miekg/dns | v1.1.58 | v1.1.61 |
github.com/onsi/gomega | v1.32.0 | v1.34.1 |
github.com/open-policy-agent/opa | v0.62.1 | v0.67.1 |
github.com/shirou/gopsutil/v3 | v3.24.2 | v3.24.5 |
github.com/spf13/cobra | v1.8.0 | v1.8.1 |
github.com/spyzhov/ajson | v0.9.1 | v0.9.3 |
go.step.sm/crypto | v0.43.1 | v0.51.1 |
go.uber.org/fx | v1.21.0 | v1.22.2 |
golang.org/x/crypto | v0.23.0 | v0.25.0 |
golang.org/x/net | v0.25.0 | v0.27.0 |
golang.org/x/term | v0.20.0 | v0.22.0 |
golang.org/x/text | v0.15.0 | v0.16.0 |
gorm.io/driver/postgres | v1.5.7 | v1.5.9 |
gorm.io/gorm | v1.25.8 | v1.25.11 |
(*) Higher version available with potential breaking changes
v0.15.0
This Release Includes Breaking Changes
This release includes breaking changes.
- Extended the framework to support wider selections of SQL/PostgreSQL compatible database.
- Package
postgresql
is added underdata
for supporting any PostgreSQL compatible databases. - Package
cockroach
is moved topostgresql
as sub-package to provide CockroachDB-only features. - Properties (application.yml) under
data.cockroach
section is moved todata.db
. - Any "PostgreSQL" specific types are moved to
types/pqx
package.
- Package
- Extended the framework to support more JWS algorithms. (
security/oauth2/jwt
package)- RSA specific implementations like
jwt.NewRSAJwtEncoder
are replaced by generic implementations likejwt.NewSignedJwtDecoder
- HS, RS and ES signing algorithms are supported and the algorithm is automatically determined based on the type of public/private keys
- Extended the private/public key support to various
jwt.JwkStore
implementations - Added
jwt.RemoteJwkStore
to leverage remoteJWKSet
endpoint JWKSet
endpoint insecurity/oauth2/auth
now supportsRSA
,EC
,oct
(HMAC secret) andOKP
(EdDSA)
- RSA specific implementations like
Other Changes
- Introduced
auth.ApprovalStore
interface to allow customizing how to store user's approval decisions during OAuth2/Open ID Connect "authorization code" flow. See Auth Server Example ittest
is now supporting HTTP recording/playback without usingapptest.Bootstrap()
.- Improved documentations of various packages such as
data
,test
,test/dbtest
,test/sectest
,test/ittest
, etc. - Dependencies update
- Various bug fixes
PR History
- persist oauth2 authorize request approval in session by @TimShi in #411
- Added support for Postgresql database by @TimShi in #412
- Fixed an intermittent error in httpclient/client_test caused by test set up by @TimShi in #413
- updated the version of golang.org/x/net package by @TimShi in #415
- Added README for test package. by @TimShi in #414
- Updated license file to have the full apache license text. by @TimShi in #423
- Improvement of
security/oauth2/jwt
by @stonedu1011 in #418 - Improved JWK Support by @stonedu1011 in #424
- .github: Add Scorecard workflow by @cisco-service in #427
- Improve jwk file store to support different by @TimShi in #426
- Ittest improve by @stonedu1011 in #425
New Contributors
- @cisco-service made their first contribution in #427
Full Changelog: v0.14.0...v0.15.0
v0.14.0
This Release Includes Breaking Changes
This release includes breaking changes. The changes are introduced in order to extend the framework to add more implementation options for service discovery and distributed lock. In addition, support for go-kit
is dropped.
What's Changed
New Features
- Consul become an optional package. When initialized (
consul.Use()
), Consul is registered withappconfig
as a source of application properties - Vault become an optional package. When initialized (
vault.Use()
), Vault is registered withappconfig
as a source of application properties. - Added
dnssd
for DNS SRV based service lookup.dnssd
also support static service discovery as "fallback" - Added Redis based distributed lock implementation
Breaking Changes
- Breaking change in
discovery
package:- consul backed service discovery is moved to a separate package. To use it,
consulsd
(formally known asdiscoveryinit
) package need to be initialized withconsulsd.Use()
.consul.Use()
is also a prerequisite for using Consul based service discovery - Properties for
consulsd
is relocated to tocloud.discovery.consul
fromcloud.consul.discovery
- consul backed service discovery is moved to a separate package. To use it,
- Breaking change in
integrate/httpclient
package:httpclient.Client.WithService(...)
is changed to take optionalSDOptions
. Options includes default HTTP scheme and context-path, SD error handling and SD selector- The client now supports retry back-off period and custom retry logic
- go-kit interfaces are removed
- Breaking change in
integrate/security
package:- Property
integrate.security.service-name
moved tointegrate.security.endpoints.service-name
- Added properties
integrate.security.endpoints.scheme
andintegrate.security.endpoints.context-path
- Property
- Breaking change due to dropping usage and compatibility support of go-kit:
log.Logger
no longer implements go-kit'sLogger
interface.discovery.Instancer
concrete implementations no longer implement go-kit'ssd.Instancer
interface.web
package interfaces re-organized to remove usage of go-kit's abstraction and server implementation.
- Breaking change due to
dsync
package refactoring:- dsync package is refactored to three packages
dsync
,consuldsync
andredisdsync
dsync.Use()
is removed,consuldsync.Use()
orredisdsync.Use()
should be used instead.- Removed
web.Registrar.RegisterWithLifecycle()
- dsync package is refactored to three packages
Bug Fixes
- Fixed: When using go 1.21 or later, lanai-cli's
init
command would fail if the service's go.mod file contains a replace directive that pointed to a none-existent location. - Fixed: a bug in
make init-cli
when go-lanai is not replaced by a local copy in the go.mod file. - Fixed: a typo causing
data
packages fail to build when CGO_ENABLED=0 - Fixed: a bug in
errorutils
whereerrorutils.CodedError
does not correctly implementerrorutils.NestedError
- Fixed: a bug in bootstrap where
bootstrap.AddOptions()
was actually adding options tobootstrap.Module.PriorityOptions
instead ofbootstrap.Module.Options
- Fixed: a bug where
httpclient
package's error was not well formatted (#408).
Others
- Updated make files in examples to match the latest make file template.
- Updated main README.md and restructured documentation locations.
- Tracing package refactored to reduce unnecessary indirect dependencies. Instrument implementations are moved to their corresponding feature packages.
Full Changelog: v0.13.0...v0.14.0
v0.13.0
This Release Includes Breaking Changes
In this release, the module name is changed to github.com/cisco-open/go-lanai
. This is a breaking change from previous release.
In addition some previously public methods and variables from security
package is made private.
What's Changed
- Updated swagger UI to 4.19.1. Fixed the "standalone layout not found" error.
- Fixed a bug that caused tests with
apptest.Bootstrap()
to fail to start if there is no otherapptest.XXX
options configured. - Security context, session and other security related items are now stored in
utils.MutableContext
instead ofgin.Context
. - All context keys of
security
andweb
are made private. - Breaking change of
utils.MutableContext
.gin.Context
is no longer implementingutils.MutableContext
interface. - Breaking change of
security.Clear()
. It now sets an empty authentication instead of remove the authentication. - Added
security.Set(ctx, auth)
.security.Set(ctx, nil)
is equivalent to the oldsecurity.Clear()
behaviour. - Breaking change of renaming module path to
github.com/cisco-open
- Updated Dockerfile and Makefile templates to properly initialize development environment for projects that may use private modules.
Full Changelog: v0.12.0...v0.13.0
v0.12.0
Note
This is the last version of go-lanai
under the name of https://cto-github.cisco.com/NFV-BU/go-lanai
and this version contains all commits made to the original repository before it's migrated here.
What's Changed
- Upgraded dependencies.
- Vulnerability Fixes.
- Added examples for OAuth2 authentication/authorization service and resource service.
- Updated documents
- Increased test coverage on various feature packages.
- Bug fixes
What's New
- Added
bootstrap.OrderedCliRunner
to fine control execution order of tests/runners log
is now backed byzap
instead ofgo-kit/log
for performance improvement
Full Changelog: v0.11.0...v0.12.0