Releases: matthewhartstonge/storage
Releases · matthewhartstonge/storage
v0.29.0
🚢 v0.29.0 - 2022-07-28
Breaking Change:
If you are running on Mongo<4.0, please update as the indices will now build in the foreground. Mongo>4.0 has changed to a new indexing engine and this option is now deprecated.
Removed
- mongo: deprecates
SetBackgrounddue to MongoDB 4.0 EOL.
Changes: v0.28.0...v0.29.0
v0.28.0
🚢 v0.28.0 - 2021-10-18
Added
- mongo: adds support for
mongodb+srvconnection strings. - mongo: binds in a default TLS Config if
ssl=trueand a TLS config has not been provided. - storage: adds
Expirerinterface to enable stores to add support for configuring record expiration. - mongo: implements
storage.Expirerinterface to enable TTL based expiry on tokens.
Changed
- mongo: migrated internal use of
isDup(err)tomongo.IsDuplicateKeyError(err).
Removed
- mongo: removed internal
isDup(err)function.
Changes: v0.27.0...v0.28.0
v0.27.0
v0.27.0 - 2021-09-24
This release will add a new hashed index on signature for the accessTokens collection. This makes the old accessTokens.idxSignatureId index redundant and can be removed.
Added
- mongo: migrates to using a hashed index for the signature index on access tokens.
- The signature for an access token could grow quite large, leading to a large index. By migrating to using a hashed index, the size can be reduced to 2% of the original indices size. In our testing we went from 2.8GB -> 57MB.
Fixed
- examples/mongo/authorizationserver: removes
mongo-featuresexample.
Changes: v0.26.0...v0.27.0
v0.26.0
v0.26.0 - 2021-08-05
Added
- utils: adds functions to help with adding and removing items from string sets.
- user: adds test cases for enabling and disabling person access.
- user: adds tests for
user.FullName(). - user: adds test cases to check create time and update time equality.
- user: adds test cases to check equality of allowed person ids, person id and extra fields in user record.
- user: adds support for storing user roles.
- storage: adds a benchmark for
user.Equal().
Changed
- user: refactors enable and disable functions to use util append/remove functions.
- examples/mongo: updates
go.modto[email protected]and tidiesgo.sum.
Fixed
- mongo:
SetClientAssertionJWTnow logs unknown errors if deleting expired JTIs fails. - mongo: fixes do not pass a nil Context (staticcheck)
- user: fixes whitespace issues when returning a user's full name.
Removed
- deps: removed support for dep.
Changes: v0.25.1...v0.26.0
v0.25.1
v0.25.1 - 2021-07-27
Changed
- deps: updates to
[email protected].- This mongo driver release contains a fix to prevent clearing server connection pools on operation-scoped timeouts.
v0.25.0
v0.25.0 - 2021-06-01
Added
- README: updates documentation.
- Adds links to download Go.
- Adds information for working with Go modules.
- Changes build badge link to travis-ci.com.
- Changes mgo link to the official MongoDB mongo-driver.
Changed
- deps: migrates from
pborman/uuidtogoogle/uuid. - deps: updates dependencies.
- updates module to go1.14 (go@n-2).
- updates to
[email protected]. - updates to
[email protected]. - migrates from
pborman/uuidtogoogle/[email protected]. - removed
[email protected].
- .travis: removes
[email protected], adds[email protected].
Fixed
- mongo: not found on token revocation should return nil.
- .travis: go install goveralls binary.
Removed
- transactional: removes transactional interface implementation.
- There isn't an easy way to tell via the mongo driver if the version of mongo running is compatible with transactions (>mongo 4.4) without enabling admin commands to be run for example,
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } ). Therefore, for now, it's easier to remove it until every current mongo version supports transactions.
- There isn't an easy way to tell via the mongo driver if the version of mongo running is compatible with transactions (>mongo 4.4) without enabling admin commands to be run for example,
- deps: removes use of
mongo-featuresdue to bugfix released viamongo-driver.mongo-driverwasn't pulling or pushing sessions into the context correctly.mongo-featuresalso relied on admin commands/permissions to detect the running mongo version to ascertain if the mongo version connected to was transaction compatible, so no longer needed.
v0.24.0
v0.24.0 - 2020-09-02
Breaking changes
As mentioned under changed:
AuthClientFuncandAuthUserFuncnow take in a context.store.DBis now of type*DBnot*mongo.Databasebut the API remains the same. If you explicitly require type*mongo.Database, you can obtain this by stepping into theDBwrapperstore.DB.Database.
Added
- deps: adds
[email protected]for mongoDB feature detection. - mongo: adds
DBa wrapper containing*mongo.Databaseand*feat.Features. - mongo: implements mongo feature detection for correct session and transaction handling.
Changed
- storage:
AuthClientFuncandAuthUserFuncnow accept a context.type AuthClientFunc func() (Client, bool)=>type AuthClientFunc func(ctx context.Context) (Client, bool)type AuthUserFunc func() (User, bool)=>type AuthUserFunc func(ctx context.Context) (User, bool)
- mongo: all handlers have moved from
DB *mongo.Databaseto our wrapper
DB *DBin order to provide mongoDB feature detection for managing sessions
and transactions, if available. - examples/mongo/authorizationserver: puts session creation behind a feature flag.
v0.23.0
v0.23.0 - 2020-08-27
Added
- mongo: implements
storage.Transactional
Changed
- deps: upgrades to
[email protected]