Releases: matthewhartstonge/storage
v0.13.0-alpha1
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
Storeto conform to the requiredfositeinterfaces. - Store: Added interface tests to
Storeto ensure the functions are available at the top level!
Changed
- Storer: Changed
storage.StorertoStorage.Storeto 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
MongoStoretoStoreto be more idiomatic. - mongo: Changed
ConnectToMongotoConnectto be more idiomatic. - mongo: Changed
NewDefaultMongoStoretoNewDefaultStoreto be more idiomatic. - mongo: exported
cacheMongoManager - mongo: exported
clientMongoManager - mongo: exported
requestMongoManager - mongo: exported
userMongoManager - mongo: Changed
CacheMongoManagertoCacheManagerto be more idiomatic. - mongo: Changed
ClientMongoManagertoClientManagerto be more idiomatic. - mongo: Changed
RequestMongoManagertoRequestManagerto be more idiomatic. - mongo: Changed
UserMongoManagertoUserManagerto be more idiomatic. - mongo: Changed unexported attributes
dbandhasherto be exported to enable custom data store composition.
Fixed
- documentation: typo in
user_managerreferring to clients instead of users.
v0.13.0-alpha
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
MongoStorefor 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
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
ctxto 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
- Tested against upstream [email protected]
- Tested against upstream [email protected]
- Tested against upstream [email protected]
- Tested against upstream [email protected]
- Tested against upstream [email protected]
Removed
- request: Removed CreateImplicitAccessTokenSession function as per github issue removed implicit storage as its never used
- storage_mongo: Removed CreateImplicitAccessTokenSession function as per github issue removed implicit storage as its never used
v0.11.2
v0.11.1
v0.11.0
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
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 configureconfig.Portas well. - Configuration now allows passing a custom tls.Config to the Config. This
requires manual initialization of atls.Configstruct, 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
- Fixes AllowedPeopleAccess filtering.
v0.9.0
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
AllowedAccesshas been changed toAllowedTenantAccessto better represent the underlying data.- The
bson/json/xmltags have also been updated fromtenantIDstoallowedTenantAccess
- The
AllowedPeopleAccesshas been added to the user model support enabling and disabling explicit access to people accounts.- Added
EnablePeopleAccessmethod to user - Added
DisablePeopleAccessmethod to user - User
AddTenantIDsmethod conformed toEnableTenantAccess - User
RemoveTenantIDsmethod conformed toDisableTenantAccess
Client
- Client
TenantIDshave been changed to conform toAllowedTenantAccess, same as user. - Client
AddScopesmethod has been changed toEnableScopeAccess - Client
RemoveScopesmethod has been changed toDisableScopeAccess - Client
AddTenantIDsmethod has been changed toEnableTenantAccess - Client
RemoveTenantIDsmethod has been changed toDisableTenantAccess
v0.8.0
- Makes users filterable with
user.Filtervia theGetUsers(filters user.Filter)function