- Refactored Attachments (Event Files) Logic to b modular
- Implemented furretDB compatibility
- Replaced rec.la by backloop.dev
- Remove FlowType and convert (best-effort) typing information into JSDoc comments
- Update to MongoDB v6
- Update to node v18
- Update Docker images
- Stream deletion eventIds when deleting streams to avoid timeout
- Introduce platform DB for future cross-cores usage
- Unify SQLite usage across audit and storage
- Move attachments to per-user directories
- Finalize data-store API for first public release
- Many linting fixes
- Support for multiple CAA (certificate autorities issuer)
- Bug fixes:
- Non-reusable deleted streamIds when following auth process #484
- SQLITE_BUSY error thrown in multi-core #487
- Fix migration 1.6.x to 1.8.0 bug
- Add support for password rules: complexity, age, reuse; see API server's
auth.password*
settings- Affected methods are: create user (
POST /users
), change password ({user endpoint}/account/change-password
), reset password ({user endpoint}/account/reset-password
) and login ({user endpoint}/auth/login
)
- Affected methods are: create user (
- Add undocumented support for external stores (a.k.a. "data mapping" feature); see component
pryv-datastore
(will be published separately when appropriate)
- Fix crash caused by permissions selfRevoke used in combinaison with BACKWARD_COMPATIBILITY_SYSTEM_STREAMS_PREFIX set to true.
- Fix issue with
accesses.create
theand selfRevoke permissions that was only possible with a personalToken.
- Fix another issue when BACKWARD_COMPATIBILITY_SYSTEM_STREAMS_PREFIX is set to "true" - children streams' ids were not following the correct format
- Fix a performance issue when querying events by type
- Fix an issue which caused the service not to restart properly in some situations
- Fix issue when BACKWARD_COMPATIBILITY_SYSTEM_STREAMS_PREFIX is set to "true" - "account" streamId was handled as ".account"
- API change: Don't coerce event content and simplify known type validation process in api-server
- serviceInfo:eventTypes URL now supports
file://
protocol allowing it to load definition from file system
- Fix issue with events.getAttachment making core crash if filename contained fancy characters by putting it in the 'Content-disposition' header
- Security fix: make password reset token single-use
- Security fix: hide "newPassword" in logs when an error occurs in account.resetPassword
- Fix issue where a deleted user was kept in the cache, thus rendering the reuse of username possible, but failing all subsequent calls as the password and tokens were not returned (since the wrong userId was returned by the cache)
- Fix issue where attempting to create streams with id 'size' would return an error
- Fix socket.io CORS issue
- Fix access-info permissions
- add missing system stream permissions accesses
- change __unique properties cleanup, just match them by key suffix, not from current serializer unique props. Avoids migration error if uniqueness has been modified.
- fix nats booting after migration
- migrate tags into streams
- introduce mall abstraction
- add integrity
- refactor access permissions logic
Fixes:
- fix boolean/bool event type that was not allowed
- fix HF null values for optional values that was not fully working
Changes:
- increase username characters limit to 60
- Implement system route to deactivate MFA
- Fix welcome email: don't wait for welcome email sending before replying to client.
- Fix versioning: update unique system events bug
- Fix user deletion
- personal token can delete an account
- add external licenser: pryv/app-node-licenser
- fix security issue with users registration conflicts leaking random email addresses
- Unify configuration into boiler
- Fixes for Open Pryv.io
Fixes:
- versioning now works when trashing event
New Features:
- Stream queries for events.get
Fixes:
- usernames starting with "system" are available
- personal token expiration now fixed
- Users create call on core username error message now specifies that letters must be lowercase
Changes:
- In configuration, rename "singleNode" to "dnsLess", keeping retro-compatibility for "singleNode" with warning message
Removals:
- Deprecated "GET /who-am-i" API method removed
- Remove pryvuser-cli code (the image was not built since July)
Custom Auth function now has access to all headers.
- Fix migration that was skipping passwordHash leading to users not being able to login
- add errors if this cases arises
Fixes for dnsLess/openSource:
- /reg/service/info
- dependencies
- boost POST payload to 10MB for HF server
system streams:
- customizable (& extendable) unique and indexed account properties
- access to account properties through the events API with its access management
- user account deletion through administration API
- Bump bcrypt from 3.0.8 to 5.0.0
- Remove it from components/utils as it is in root package.json
- fix deleting app access deletes shared accesses it created
- make event types call with header 'User-Agent: Pryv.io/{API version}
- fix missing API version
- fix readTokens for shared accesses
- add username to access-info
- fix socket.io for dns-less
- fix airbrake
- load reporting lib conditionnally
- use lib-reporting:
- requires reporting:licenseName to boot api-server
- not used in open-source mode
- create user on open-source register now returns pryvApiEndpoint
- Added compatibility for open-source version with DNS-less capabilities
- upgrade socket.io from v0.9 to v2
- Update babel to v7, now compiling into node v12 (instead of v8)
- Update airbrake version
- Silence serviceInfo log for tests
- Extend Webhooks manipulation to shared accesses.
- Extend Socket.io interface to shared accesses.
- Extend Socket.io interface to accesses containing a
create-only
permission.
- Add new access permission class:
{ feature: "selfRevoke", setting: "forbidden"}
which explicitely forbids accesses to self revoke.
- Updating access via
accesses.update
has been removed. - Capacity for an access to self revoke with
accesses.delete <id>
has been extended toshared
tokens.
- Fix webhooks reactivation
- Optimize batch calls to only reload streams in case of possible change in structure
- multiple fixes to make 1.4.32 work (config)
Refactor: How service-info is used in core
- service-info can be loaded from file for dev
- eventTypes are loaded from service-info
- crash if no service-info
- Feature: create-only level for permissions
- Feature : add reporting to startup
- Fix #186 : Add 'readToken' to events.getOne attachments
- Fix #208 : Forbid to convert standard event to HFS (and vice-versa)
- Fix #210 : HFS now support basic auth
- Fix #212 : Add Meta to HFS response.
- Fix #222 : Add Meta to batch response.
- Fix preview-server module loading issue.
- Update node to 12.13.1.
- Enrich access-info call result with more access properties.
- Fix: Accesses.get gives inexact result when accesses have permissions on unexisting/deleted streams.
- Throw consistent errors for trashed HF events.
- Various fixes for HF series:
- Fix validation for events.create and events.update
- Add nats:uri to configuration
- Implement delete and update methods for HF series.
- Plug airbrake for webhooks server and improve general error reporting strategy
- Fix bug with batch streams.create calls not working for non-"star" permissions
New feature:
- Pryv.io API now support the Basic Authentication scheme
- Official release of webhooks
- Preview release of webhooks
- Fix config loading in pryv-cli
- Add route /service/info who provides a unified way for third party services to access the necessary information related to a Pryv.io platform.
- Fix pryv-cli user-delete so that it works for single-node setups and prevent it to abort if the username is already deleted on register.
- Most API calls now present a 'Pryv-Access-Id' response header that contains the id of the access used for the call. This is the case only when a valid authorization token has been provided during the request (even if the token is expired).
- Improve the update account API call, in particular when it applies a change of email address. It now correctly checks if the email address is not already in use before updating the account and throws consistent errors.
- Increase MongoDB driver reconnection window.
- Refactor mongo duplicates management into storage layer.
- Events, Streams, Accesses, Profiles and FollowedSlices are now stored in single collections on MongoDB. This results in smaller per-user RAM usage.
-
High Frequency events allow storing data at high frequency and high data density. Create them by using types that start with 'series:X', where X is a normal Pryv type. The API also supports inputting data into multiple series at once, this is called a 'seriesBatch' (POST /series/batch).
-
The api is internally using multiple processes to offload request handling and json serialisation. This should allow much higher request rates, but your mileage may vary. Storage IOPS matter.
-
Some invalid requests that used to return a HTTP status code of 401 (Unauthorized) now return a 403 (Forbidden). Only the requests that are missing some form of authentication will return a 401 code.
-
updates.ignoreProtectedFields
is now off by default. This means that updates that address protected fields will result in an error being returned. -
Accesses can now be set to expire via the
expireAfter
attribute. Expiry for accesses gives you an easy way of limiting the damage that can be done using a stolen access. -
We've rehauled the 'delete-user' command of the Pryv.IO cli admin tool. It now operates more explicitly and allows automation.
-
Improvements related to MongoDB:
- We now use j:true as write concern, which requests acknowledgement that write operations has been written to the journal. This measure improves our persistence story in the face of a crash.
- Implement user pool to anticipate users creation burst through two new API routes: POST 'system/pool/create-user' and GET 'system/pool/size'.
- Make nightly tasks manually triggereable by sysadmins.
-
Critical Security Fixes:
-
2018022101, 2018022102: Fixes to DNS server closing minor vulnerabilities: DNS could be - under certain circumstances - used to exploit other systems.
-
2018091401: Fixes to the password reset mechanism; a bug would allow an attacker to change passwords under certain circumstances.
-
2018102401: Details will be disclosed after Dec/18
-
-
Implement fetch deleted accesses using
includeDeletions
in accesses.get API method -
Add clientData field to Accesses and create/update methods
-
Fix a bug which prevented accesses with root ("streamId":"*") permission from managing sub-accesses correctly
-
Remove some chown -R commands in our boot scripts, since it had the effect of delaying the start of the core node processes, for example if the data folder contains a lot of files (attachments). From now on, the recommendation is to run these commands independently in a sanitization script when installing or updating of the platform.
-
Add
httpOnly
flag to server-side cookie sent in response to successful/auth/login
request. -
Refactor mongo duplicates management into storage layer and make the related checks consistent among all the api-server methods.
-
Fix login with Firefox (and other browsers using Referer but no Origin)
-
Security fix 2018020801: 'accesses.update' was missing an authorisation check.
-
Update of the API version in API responses
-
Blacklist usage errors from airbrake
-
Fix events.get JSON formatting bug when retrieving ArraySize+1 events
-
Improve tests stability: fix environment variable NODE_ENV
-
Add configuration options to disable resetPassword and welcome emails
-
Add configuration option to ignore updates of read-only fields
-
Updates to latest nodejs version as a reaction to advisory https://nodejs.org/en/blog/vulnerability/oct-2017-dos/
-
Security fixes to various parts of Pryv: Now doesn't log passwords or password hashes as part of normal operation.
-
Please see Migration Guide for implications on your infrastructure.
-
Tags have a maximum length of 500 characters. An error is returned from the API when this limit is exceeded.
-
When two users would log in at almost the same time, we had a insert/update data race. This should be fixed now.
-
Instead of blacklisting the fields that the user cannot update, we now whitelist those that he can.
Changes:
- Deletion methods now:
- Reply to permanent deletions with a
{item}Deletion
field confirming the deleted item's identifier - Always return code 200 on HTTP (that's a rollback of the v0.7.x change which was a bit too zealous to be practical)
- Reply to permanent deletions with a
New features:
- Event and stream deletions are now kept for sync purposes; they're accessible
via parameter
includeDeletions
(events.get
) orincludeDeletionsSince
(streams.get
). Deletions are cleaned up after some time (currently a year).
Major changes here towards more standardization and flexibility:
-
All JSON responses (both in HTTP and Socket.IO) are now structured as follows:
{ "{resource}": {...} }
if a single resource item is expected; for example:{ "event": {...} }
,{ "error": {...} }
{ "{resources}": [ {...}, ... ] }
if an indeterminate number of items is expected; for example:{ "events": [ {...}, ... ] }
-
All responses to resource creation and update calls now include the full object instead of respectively its id and nothing; for example:
{ "stream": {...} }
-
All JSON responses now include
meta.apiVersion
andmeta.serverTime
properties mirroring the originalAPI-Version
andServer-Time
HTTP headers; HTTP headerAPI-Version
remains -
Deleting a resource now returns code 204 if the item was permanently deleted; it still returns a 200 when trashed (now including the trashed item in the response)
-
Method ids for deletion/trashing are now
{resource}.delete
instead of{resource}.del
-
The
attachments
property of events is now an array (instead of an object), with each attachment now identified by a newid
property (instead offileName
) -
As a security measure, reading attached files now either requires auth via the
Authorization
HTTP header or a newreadToken
query string parameter (auth
isn't allowed anymore in this case); the token to use is specific to each file and access, and is defined in thereadToken
property of each event attachment -
Event batch creation method has been replaced with generic batch method (
callBatch
, HTTP:POST /
) -
Bookmarks have been renamed to "followed slices", corresponding method ids to
followedSlices.*
and HTTP routes to/followed-slices
-
Getting events: setting the
tags
parameter now returns events with any of the specified tags, instead of all of them -
Error ids:
unknown-*
errors replaced with eitherunknown-resource
orunknown-referenced-resource
item-*-already-exists
replaced withitem-already-exists
missing-parameter
replaced withinvalid-parameters-format
-
Other improvements and fixes (data validation performance, minor bugs on auth for trusted apps)
New features:
-
Getting events: filter for specific event types with the
types
parameter -
Accesses can now define tag permissions in
permissions
(in addition to the existing stream permissions)- If only tag permissions are set, all streams are considered readable, and vice-versa
- When stream and tag permissions conflict, the highest permission level is considered
-
Full support for managing account information, including password change and reset
Changes to HTTP paths and auth for trusted apps:
-
Get streams: removed
trashed
option forstate
as it was more trouble than anything useful -
Accesses now includes property
id
(exposed for referencing)- Create access response now includes both
id
andtoken
properties - For existing accesses,
id
andtoken
are equal
- Create access response now includes both
-
Events, streams and accesses now includes change tracking properties:
created
andmodified
(timestamp)createdBy
andmodifiedBy
(access id or"system"
)
-
Socket.IO method calls now directly use method ids (e.g.
events.create
and pass method params, instead of usingcommand
and passing an object with method id and params -
For trusted apps only: removed the distinction between "admin" methods and others; (breaking changes)
/admin/login
,/admin/logout
and/admin/who-am-i
moved to/auth/login
,/auth/logout
and/auth/who-am-i
respectivelysessionID
renamed totoken
in login response and SSO cookie data- Personal accesses are now automatically created on login; they can't be created explicitly anymore
/admin/user-info
moved to/user-info
/admin/accesses
merged into/accesses
/admin/bookmarks
moved to/bookmarks
/admin/profile
merged into/profile
-
Configuration: renamed
clients
section toauth
and added SSO and session settings -
Updated Node.js version to 0.10.23
-
Removed dependency on ZeroMQ (replaced by pure Node.js lib)
This is a major update that will break most libs and clients, which should be updated ASAP.
-
Simplified the API by removing channels and renamed folders into "streams"; adjusted the structure of accesses, streams and events accordingly; more details:
- As a consequence, every event now belongs to a stream
- Data migration: former channels will be converted into root-level streams, and former folders into sub-streams of those
-
Events structure:
event.type
is now a string of format{class}/{format}
(e.g.picture/attached
) instead of an object withclass
andformat
propertiesevent.value
has been renamed toevent.content
-
Get events:
- Renamed parameter
onlyFolders
to juststreams
- Added
running
boolean parameter, replacing "get running periods" method
- Renamed parameter
-
Removed "get running periods" (i.e.
GET /events/running
, see above) -
Removed
hidden
property of streams (ex-folders), which was mostly unused and out of place
-
New feature: Allow HTTP method overriding by POSTing _method, _json, and _auth parameters in an URL-encoded request
-
Improvement: Retrieving events for a specific timeframe now includes all events that overlap that timeframe, including period events that started earlier
- Added event type validation: the API will now check if an event being created or updated has a known type (as listed on our event types directory), and if yes perform data validation on its value (returning a 400 error if invalid)
- All error ids have been changed to use
slug-style
instead ofC_CONSTANT_STYLE
(so that e.g.INVALID_PARAMETERS_FORMAT
is nowinvalid-parameters-format
); this is consistent with the other ids we’re using in the system
Versions earlier than v0.4 are not covered here.