storage

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

APACHE-2.0 License

Stars
20
storage - v0.18.9

Published by matthewhartstonge over 4 years ago

v0.18.9 - 2020-06-13

Fixed

  • mongo: RevokeAccessToken attempted to delete the access token twice from the datastore leading to fosite.ErrNotFound always being returned.
  • mongo: RevokeRefreshToken attempted to delete the refresh token twice from the datastore leading to fosite.ErrNotFound always being returned.
storage - v0.18.8

Published by matthewhartstonge over 4 years ago

v0.18.8 - 2020-06-11

Fixed

  • mongo: auth codes should be set to active by default on creation.
storage - v0.18.7

Published by matthewhartstonge over 4 years ago

v0.18.7 - 2020-05-24

Changed

  • travisci: updated to test against go@{1.14, tip}

Fixed

  • mongo: fixed ineffassign and staticcheck issues.
  • mongo: fixed maligned issues reducing config struct memory allocation from 138 bytes to 127 bytes.
  • mongo: fixed missed error check.
  • mongo: fixed lint issues where context was not the first parameter.
  • mongo: fixed user delete test creating a client instead of a user for deletion.
  • mongo: fixed create client parameter ordering.

Removed

  • travisci: support for go < 1.13
storage - v0.18.6

Published by matthewhartstonge about 5 years ago

v0.18.6 - 2019-09-25

Added

  • client: added published to enable filtering clients by published state.
storage - v0.18.5

Published by matthewhartstonge about 5 years ago

v0.18.5 - 2019-09-24

Changed

Fixed

  • client: fixes client.Equal by doing a compare on allowed regions.
storage - v0.18.4

Published by matthewhartstonge about 5 years ago

v0.18.4 - 2019-09-24

Added

  • client: added support for allowed regions. This enables filtering for clients
    based on geographic region.
  • mongo: added tests for client.list.

Changed

  • travis: updated CI testing to test against go versions 1.13.x, 1.12.x,
    1.11.x.
  • travis: migrated to go modules for dependency management.
  • deps: updated to [email protected] and [email protected].

Removed

  • client: removed redundant type conversions in various return statements.
storage - v0.18.3

Published by matthewhartstonge about 5 years ago

v0.18.3 - 2019-09-11

Fixed

  • mongo: fixes OpenTracing logging in the cache storage manager.
storage - v0.18.2

Published by matthewhartstonge about 5 years ago

v0.18.2 - 2019-09-11

Fixed

  • Calls to Cache.Get and Cache.Delete in the RevokeAccessToken and
    RevokeRefreshToken handlers were specified in the wrong order.
storage - v0.18.1

Published by matthewhartstonge over 5 years ago

v0.18.1 - 2019-02-07

Added

  • experimental support for go modules.

Fixed

  • Fixed the last ineffassign issue reported via goreportcard.
  • Tested against upstream [email protected]
  • Tested against upstream [email protected]
  • RequestManager: RequestManager.List now uses entityName instead of hardcoded storage.EntityClients #24
  • RequestManager: RequestManager.Update should use entityName instead of hardcoded storage.EntityClients #25
storage - v0.18.0

Published by matthewhartstonge almost 6 years ago

v0.18.0 - 2019-01-24

Added

  • Support for testing under Go 1.11

Changed

  • Adds support for Fosite v0.27.x
  • Client: Now has an AllowedAudiences attribute to comply to the new interface method required for fosite.Client.
  • Request: Changed attribute Scopes to RequestedScope. bson, json and xml tags remain the same.
  • Request: Changed attribute GrantedScopes to GrantedScope. bson, json and xml tags remain the same.

Fixed

  • Fixes the last golint error which was not reported when run locally.
  • Fixes ineffassign issues reported via goreportcard.

Removed

  • Support for testing under Go 1.8
storage - v0.17.0

Published by matthewhartstonge almost 6 years ago

v0.17.0 - 2018-11-07

Changed

  • Adds support for Fosite v0.26.0
  • Exported Mongo index constants have been changed to align with idiomatic Go, where the Id suffixes are now ID

Fixed

  • Fixed all golint errors
storage - v0.16.0

Published by matthewhartstonge about 6 years ago

v0.16.0 - 2018-10-15

Changed

  • Adds support for Fosite v0.25.0
storage - v0.15.0

Published by matthewhartstonge about 6 years ago

v0.15.0 - 2018-10-15

Changed

  • Adds support for Fosite v0.23.0
storage - v0.14.0

Published by matthewhartstonge about 6 years ago

v0.14.0 - 2018-10-15

Changed

  • Adds support for Fosite v0.22.0
  • Updated readme example to match upstream.
storage - v0.13.0-beta

Published by matthewhartstonge about 6 years ago

v0.13.0-beta - 2018-09-04

We have been using this release in house for the past month with our
own auth server. If you have any issues related to the mongo storage
implementation, please report an issue.

Changed

  • deps: updated Gopkg.lock to support dep v0.5.0

Fixed

  • mongo: Have added a struct tag to tell the envconfig package to
    ignore processing Config.TLSConfig, as the instantiated config it
    creates breaks TLS mongo connections.
  • user manager: Fixes filtering not being performed on PersonID
storage - v0.13.0-alpha2

Published by matthewhartstonge over 6 years ago

v0.13.0-alpha2 - 2018-07-12

Added

  • mongo: Added tests to CacheManager for Create, Get, Update, Delete and DeleteByValue.

Changed

  • CacheManager: must support Configurer interface
  • RequestManager: must support Configurer interface
  • deps: updated to support fosite v0.21.X

Fixed

  • readme: version link for v0.13.0-alpha1
  • default config: Fixed a configuration bug, where repeat connections would lead to the default port being appended multiple times to cfg.hostnames.
  • cachemanager: DeleteByValue's query selector should have been querying by attribute signature not by the non-existant bson attribute value.
  • requestmanager: Reverted session data back to []byte due to not being able to unmarshal into an interface.
storage - v0.13.0-alpha1

Published by matthewhartstonge over 6 years ago

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.
storage - v0.13.0-alpha

Published by matthewhartstonge over 6 years ago

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

Published by matthewhartstonge over 6 years ago

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

storage - v0.11.2

Published by matthewhartstonge over 6 years ago

v0.11.2 - 2018-05-30

Changed

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