Skip to content

Releases: matthewhartstonge/storage

v0.13.0-alpha1

17 Jun 22:17

Choose a tag to compare

v0.13.0-alpha1 Pre-release
Pre-release

v0.13.0-alpha1 - 2018-06-18

Added

  • mongo: Added New to re-support custom mongo configuration and hashers.
  • Store: Added top level function override to enable Store to conform to the required fosite interfaces.
  • Store: Added interface tests to Store to ensure the functions are available at the top level!

Changed

  • Storer: Changed storage.Storer to Storage.Store to be more idiomatic.
  • Storer: Changed from named interfaces to a struct composition to enable the
    required fosite interface functions to be raised to the top level.
  • mongo: Changed MongoStore to Store to be more idiomatic.
  • mongo: Changed ConnectToMongo to Connect to be more idiomatic.
  • mongo: Changed NewDefaultMongoStore to NewDefaultStore to be more idiomatic.
  • mongo: exported cacheMongoManager
  • mongo: exported clientMongoManager
  • mongo: exported requestMongoManager
  • mongo: exported userMongoManager
  • mongo: Changed CacheMongoManager to CacheManager to be more idiomatic.
  • mongo: Changed ClientMongoManager to ClientManager to be more idiomatic.
  • mongo: Changed RequestMongoManager to RequestManager to be more idiomatic.
  • mongo: Changed UserMongoManager to UserManager to be more idiomatic.
  • mongo: Changed unexported attributes db and hasher to be exported to enable custom data store composition.

Fixed

  • documentation: typo in user_manager referring to clients instead of users.

v0.13.0-alpha

13 Jun 13:25
4222c98

Choose a tag to compare

v0.13.0-alpha Pre-release
Pre-release

v0.13.0-alpha - 2018-06-14

Added

  • mongo: Added indices for quick look up.
  • mongo: Added a way to pass the mongo session via context.Context
  • OpenTracing: Added OpenTracing support. You can now gain distributed tracing information on how your mongo queries are performing.
  • logging: Added logging support. Now provides a way to bind in your own logrus logger to get information, or debug output from the storage driver.
  • Client: Added to the domain model. Provides a data storage model for OAuth 2 clients.
  • AuthClientMigrator: Added to the domain model. Provides an interface to help enable migration of hashes for legacy clients.
  • AuthUserMigrator: Added to the domain model. Provides an interface to help enable migration of hashes for legacy users.
  • Configurer: Provides an interface to initialize datastore entities if required.
  • Cache: Added to the domain model. Provides caching functionality.
  • Tests: Added fosite interface tests to easily test API compatibility with newer version of fosite.
  • Users: Added to the domain model. Provides a data storage model for OAuth 2 users.
  • Requests: Added to the domain model. Provides a data storage model for OAuth 2 auth session requests.
  • Entity Names: Added to the domain model. Provides a way to use the entity names consistently between multiple backend storage implementations.
  • Storer: Added to the domain model. Provides a struct for composing backend storage drivers. See MongoStore for an example of how to bind this in.
  • AuthorizeCode: Added support for InvalidateAuthorizeCodeSession(ctx context.Context, code string) (err error) as per [email protected]
  • fosite: v0.20.X support.

Changed

Pretty much everything..

Storage has been re-written in such a way that multiple datastore backends can
be created, and bound together. This can become useful over time as you need to
scale out and would like to switch components out to a different backend.

For example, hitting the cache. You could implement and compose in a Redis
CacheManager, which you could bind into your mongo storage implementation.

  • OSS: Updated licenses and added attributions.
  • Client: Secret is now stored as a string rather than bytes.
  • Configurer: requires passing in context.Context

Removed

  • DeleteAuthorizeCodeSession(ctx context.Context, code string) (err error) has been removed from the interface and is no longer used by the upstream, fosite, library.
  • The old API

Known Issues

  • There are no mongo integration tests.
  • Documentation needs to be updated to match current API.

v0.12.0

31 May 10:58
d54a6b4

Choose a tag to compare

v0.12.0 Pre-release
Pre-release

v0.12.0 - 2018-05-31

This is the last upgrade to storage before revamping the lib.

Fosite v0.17.0 adds a storage interface for PKCE, so will be a breaking change as it is.
Before adding that, this PR moves package managers to dep and removes a couple of functions that were deprecated, hence the minor pre-release bump.

Some hints of the future:

  • Get up to date with Fosite
  • Enable a way to use a mongo session throughout a request's flow
  • Add ctx to all storage functions in order to pass the mongo session via ctx
  • Conform extra datastore entity access to match Google API language for a more consistent, filterable API (List, Create, Get, Update, Delete)

Added

  • client: Tests to ensure storage implements fosite interfaces correctly
  • request: Tests to ensure storage implements oauth2 interfaces correctly
  • request: Tests to ensure storage implements openid interfaces correctly
  • readme: compatibility table

Changed:

  • license: updated year, added github link.
  • mongo: conformed collection names to match javascript naming conventions (camelCase)
  • deps: changed dependency manager to dep
  • ci: changed TravisCI dependency manager to dep
  • file naming: removed package name pre-pending to file names.

Fixed

Removed

v0.11.2

30 May 12:29
609a64e

Choose a tag to compare

v0.11.2 Pre-release
Pre-release

v0.11.2 - 2018-05-30

Changed

  • git: updated repo links
  • deps: updated glide lock

v0.11.1

30 May 12:27

Choose a tag to compare

v0.11.1 Pre-release
Pre-release

v0.11.1 - 2018-05-14

Changed

  • readme: updated latest version

Fixed

  • user: Equal() now supports comparisons including personID

Removed

  • legal: Removed mergo, now not in use

v0.11.0

30 May 12:25

Choose a tag to compare

v0.11.0 Pre-release
Pre-release

v0.11.0 - 2018-05-10

Changed

  • user: Removed use of lib mergo. Please move to passing through a full update,
    instead of partials. This caused issues where fields were required to be
    blanked out, for example, disabling a user account.
  • client: Removed use of lib mergo. Please move to passing through a full update,
    instead of partials. This caused issues where fields were required to be
    blanked out, for example, disabling a client.
  • changelog: to be changelog compliant!
  • glide: unpinned fosite version. Please ensure it works with your version of
    fosite, please see readme disclaimers.

Removed

  • glide: mergo

v0.10.0

13 Apr 11:59

Choose a tag to compare

v0.10.0 Pre-release
Pre-release

v0.10.0 - 2018-04-13

Changed

  • Configuration now allows passing hostnames with included ports, for example:
    []string{"mongo.example.com:123456", "mongo.example.com:234567"}allowing
    developers to bypass having to configure config.Port as well.
  • Configuration now allows passing a custom tls.Config to the Config. This
    requires manual initialization of a tls.Config struct, but enables users
    to use their own TLS certs for connecting to mongo.
  • Cleaned up the Readme
  • Started using Keep a Changelog style for logging changes

v0.9.1

13 Apr 11:58

Choose a tag to compare

v0.9.1 Pre-release
Pre-release
  • Fixes AllowedPeopleAccess filtering.

v0.9.0

13 Apr 11:57

Choose a tag to compare

v0.9.0 Pre-release
Pre-release

v0.9.0 makes a few under the hood changes in order to conform method and attribute naming to make the API cleaner.

Mongo Driver

First of all, big shout out to @niemeyer for his amazing effort and continued support through the years to the mgo Go driver!! It's no small feat, with the driver in use today in many production stacks.

We have decided to move to the community supported fork of mgo as it has a couple of extra github issues tidied up and is moving to add support for Mongo 3.6 features which make some aggregation pipelines easier internally for us. As such, this repo is also moving to use the community fork of [mgo][mgo].

Big shoutout to @domodwyer + contributors past and future!

User

  • AllowedAccess has been changed to AllowedTenantAccess to better represent the underlying data.
    • The bson/json/xml tags have also been updated from tenantIDs to allowedTenantAccess
  • AllowedPeopleAccess has been added to the user model support enabling and disabling explicit access to people accounts.
  • Added EnablePeopleAccess method to user
  • Added DisablePeopleAccess method to user
  • User AddTenantIDs method conformed to EnableTenantAccess
  • User RemoveTenantIDs method conformed to DisableTenantAccess

Client

  • Client TenantIDs have been changed to conform to AllowedTenantAccess, same as user.
  • Client AddScopes method has been changed to EnableScopeAccess
  • Client RemoveScopes method has been changed to DisableScopeAccess
  • Client AddTenantIDs method has been changed to EnableTenantAccess
  • Client RemoveTenantIDs method has been changed to DisableTenantAccess

v0.8.0

13 Apr 12:02

Choose a tag to compare

v0.8.0 Pre-release
Pre-release
  • Makes users filterable with user.Filter via the GetUsers(filters user.Filter) function