storage

A Mongo Storage backend for https://github.com/ory/fosite

APACHE-2.0 License

Stars
20
storage - v0.34.0 Latest Release

Published by matthewhartstonge 8 months ago

v0.34.0 - 2024-02-22

Added

  • user: adds support for regions.

Changed

Full Changelog: https://github.com/matthewhartstonge/storage/compare/v0.33.0...v0.34.0

storage - v0.33.0

Published by matthewhartstonge about 1 year ago

v0.33.0 - 2023-08-25

Fixed

  • user: aligns bson, json and xml marshalling to the name of the mfaFactors property.
storage - v0.32.0

Published by matthewhartstonge over 1 year ago

v0.32.0 - 2023-07-18

Added

  • user: Adds support for MFA factors.

Changed

storage - v0.31.0

Published by matthewhartstonge almost 2 years ago

🚢 v0.31.0 - 2023-01-10

Changed

Fixed

  • examples/mongo/authorizationserver: sets session subject and username. fixes #65.
  • examples/mongo/authorizationserver: properly logs out the generated user id.
  • mongo/mongo: reduces read errors occurring in a mongo replica set. fixes #68. Thanks to @qkrgksqkr for the original reports, debugging and solution!

Changes: https://github.com/matthewhartstonge/storage/compare/v0.30.1...v0.31.0

storage - v0.30.1

Published by matthewhartstonge about 2 years ago

🚢 v0.30.1 - 2022-08-08

Added

  • user_manager: adds support for filtering users given a list of people ids.
  • mongo/user_manager: adds support for filtering users given a list of people ids.

Changed

Changes: https://github.com/matthewhartstonge/storage/compare/v0.30.0...v0.30.1

storage - v0.30.0

Published by matthewhartstonge about 2 years ago

storage - v0.29.0

Published by matthewhartstonge about 2 years ago

🚢 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 SetBackground due to MongoDB 4.0 EOL.

Changes: https://github.com/matthewhartstonge/storage/compare/v0.28.0...v0.29.0

storage - v0.28.0

Published by matthewhartstonge about 3 years ago

🚢 v0.28.0 - 2021-10-18

Added

  • mongo: adds support for mongodb+srv connection strings.
  • mongo: binds in a default TLS Config if ssl=true and a TLS config has not been provided.
  • storage: adds Expirer interface to enable stores to add support for configuring record expiration.
  • mongo: implements storage.Expirer interface to enable TTL based expiry on tokens.

Changed

  • mongo: migrated internal use of isDup(err) to mongo.IsDuplicateKeyError(err).

Removed

  • mongo: removed internal isDup(err) function.

Changes: https://github.com/matthewhartstonge/storage/compare/v0.27.0...v0.28.0

storage - v0.27.0

Published by matthewhartstonge about 3 years ago

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-features example.

Changes: v0.26.0...v0.27.0

storage - v0.26.0

Published by matthewhartstonge about 3 years ago

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.mod to [email protected] and tidies go.sum.

Fixed

  • mongo: SetClientAssertionJWT now 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

storage - v0.25.1

Published by matthewhartstonge about 3 years ago

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.
storage - v0.25.0

Published by matthewhartstonge over 3 years ago

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

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.
  • deps: removes use of mongo-features due to bugfix released via mongo-driver.
    • mongo-driver wasn't pulling or pushing sessions into the context correctly.
    • mongo-features also 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.
storage - v0.24.0

Published by matthewhartstonge about 4 years ago

v0.24.0 - 2020-09-02

Breaking changes

As mentioned under changed:

  • AuthClientFunc and AuthUserFunc now take in a context.
  • store.DB is now of type *DB not *mongo.Database but the API remains the same. If you explicitly require type *mongo.Database, you can obtain this by stepping into the DB wrapper store.DB.Database.

Added

  • deps: adds [email protected] for mongoDB feature detection.
  • mongo: adds DB a wrapper containing *mongo.Database and *feat.Features.
  • mongo: implements mongo feature detection for correct session and transaction handling.

Changed

  • storage: AuthClientFunc and AuthUserFunc now 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.Database to our wrapper
    DB *DB in order to provide mongoDB feature detection for managing sessions
    and transactions, if available.
  • examples/mongo/authorizationserver: puts session creation behind a feature flag.
storage - v0.23.0

Published by matthewhartstonge about 4 years ago

v0.23.0 - 2020-08-27

Added

  • mongo: implements storage.Transactional

Changed

storage - v0.22.2

Published by matthewhartstonge over 4 years ago

v0.22.2 - 2020-07-06

Fixed

  • mongo: fixes UserManager.Migrate returning not found on a successful insert.
storage - v0.22.1

Published by matthewhartstonge over 4 years ago

v0.22.1 - 2020-07-06

Fixed

  • mongo: fixes filter.ScopesIntersection using filter.ScopesUnion instead of filter.ScopesIntersection.
storage - v0.22.0

Published by matthewhartstonge over 4 years ago

v0.22.0 - 2020-07-02

Changed

storage - v0.21.0

Published by matthewhartstonge over 4 years ago

v0.21.0 - 2020-07-02

Added

  • storage: added support for managing and denying JTIs due to newly added
    methods in [email protected]'s interface fosite.ClientManager.
  • mongo: added concrete implementation for DeniedJTIManager and
    DeniedJTIStorer to comply to added methods in fosite.ClientManager.
  • mongo: ensured update time is updated when updates are performed.
  • mongo: added config options to adjust mongo connection min/max pool size.

Changed

Removed

  • storage: removed missed entity constants that helped define cache
    table/schema/collection.
  • mongo: removed dead-code index constants resulting from the removal of the
    cache collection.
storage - v0.20.0

Published by matthewhartstonge over 4 years ago

v0.20.0 - 2020-06-26

Breaking changes

Removes 'Cache' implementation which actually added a level of indirection,
doubling required database calls in some instances.

Changed

  • mongo: uses a defined database for testing.
  • examples/mongo/authorizationserver: uses a defined database for the demo.

Fixed

  • travisci: fixes travis not running tests over the whole code base.

Removed

  • cache: removed cache structure, interfaces and db
  • storage.SessionCache (struct)
  • storage.Cacher (interface)
  • storage.CacheManager (interface)
  • storage.CacheStorer (interface)
  • storage.RequestManager.Cache (interface binding to a storage.CacheStorer)
  • mongo.CacheManager (concrete implementation of storage.CacheManager)
storage - v0.19.0

Published by matthewhartstonge over 4 years ago

v0.19.0 - 2020-06-26

Breaking changes

This release migrates to the official Go MongoDB driver.

If you have any custom code using mgo that feeds into storage, you will need to migrate these to use mongo-go-driver patterns.

Added

Changed

  • deps: updates to [email protected].
  • deps: migrates from globalsign/mgo to mongodb/mongo-go-driver.
  • readme: references examples/mongo instead of having a wad of example code in the readme.