Skip to content

Releases: stitchfix/stitches

v5.0.0

24 Jun 19:21
Compare
Choose a tag to compare

What's Changed

Most significantly, API key use is now optional. By default, v5 will not enable API Key auth or generate the api_client tables. To disable API Key auth on your app, there's a new configuration parameter you can add to the initializer documented in the README.

This might be useful if your platform has alternative approaches for restricting access to services.

You can read more about the changes here:

  • Configuration to disable api key support: #123
  • Separate API Key auth support generation: #124

Here's a full breakdown:

New Contributors

Full Changelog: v4.2.2...v5.0.0

Redact expired api keys in logging

20 Sep 15:03
Compare
Choose a tag to compare

API keys that were expired but still allowed to be used during the grace period were being logged along with the warning message. For better security, they are now redacted, showing only the last eight characters.

Add disabled API key leniency

12 Aug 16:10
cef2b5d
Compare
Choose a tag to compare

In some cases we may want to allow a leniency period after an API key has been disabled. This release introduces the concept of an optional disabled_at field to the api_clients table. When it is set and the enabled field is set to false, stitches uses the configuration to determine if it should continue to allow the API key to be used with a warning.

Upgrading to this version should include creating a migration to create the new field using the command:
bundle exec rails generate stitches:add_disabled_at_to_api_clients

See the readme for more information on configuration and migration

Use match? over =~ to avoid MatchData object allocation

11 Feb 23:27
Compare
Choose a tag to compare

See #98 for more details and benchmarks.

v4.0.1

12 Nov 17:36
Compare
Choose a tag to compare
  • Adds support for 'application/protobuf' mime type

Introducing an API Key cache

27 Jul 16:06
f07a1af
Compare
Choose a tag to compare

Version 4.0.0 of stitches now includes an API Key cache. For some applications this can significantly lower the overhead of each HTTP request.

Also, this release removes the previously deprecated whitelist syntax. If you have not yet updated your use you should do that before upgrading to 4.0.0 courtesy of @davetron5000

Fix Change with Rack Unauthorized Response

16 Jan 23:59
Compare
Choose a tag to compare

to_ary was removed from Response In Rack's update from 2.0.8 to 2.1.1. Stitches inherits from this class and expected a to_ary method to be aliased to Response's finish method.

Apps can't update Rack until this is fixed.

v3.8.1

10 Sep 22:02
Compare
Choose a tag to compare
  • Replace deprecated Module#parent calls with calls to Module#module_parent in Rails 6 apps (see #83)

Remove Apitome runtime dependency

07 Aug 20:35
Compare
Choose a tag to compare

Take advantage of ActionController::API

16 May 16:44
Compare
Choose a tag to compare

Api::ApiController will now inherit from ActionController::API which does not include many of the modules needed for browser support like CSRF protection, Flash, etc.

Because API's only respond with JSON, we can take advantage of ActionController::API and remove the need for stuff like respond_to blocks, skip :verify_authenticity_token or protect_from_forgery.