Commit Graph

37 Commits

Author SHA1 Message Date
Daniel
fd6a0077f2 fix: Unnecessary log entries by extendSessionOnUse (#8562) 2023-05-25 14:00:56 +02:00
Daniel
6f885d36b9 feat: extendSessionOnUse to automatically renew Parse Sessions (#8505) 2023-05-17 19:49:25 +02:00
Daniel
f3bcc9365c feat: Access the internal scope of Parse Server using the new maintenanceKey; the internal scope contains unofficial and undocumented fields (prefixed with underscore _) which are used internally by Parse Server; you may want to manipulate these fields for out-of-band changes such as data migration or correction tasks; changes within the internal scope of Parse Server may happen at any time without notice or changelog entry, it is therefore recommended to look at the source code of Parse Server to understand the effects of manipulating internal fields before using the key; it is discouraged to use the maintenanceKey for routine operations in a production environment; see [access scopes](https://github.com/parse-community/parse-server#access-scopes) (#8212)
BREAKING CHANGE: Fields in the internal scope of Parse Server (prefixed with underscore `_`) are only returned using the new `maintenanceKey`; previously the `masterKey` allowed reading of internal fields; see [access scopes](https://github.com/parse-community/parse-server#access-scopes) for a comparison of the keys' access permissions (#8212)
2023-01-08 22:02:12 +01:00
Manuel
b48c27049a refactor: Improve incorrect deprecation log message for auth adapter (#8347) 2022-12-06 23:04:37 +01:00
dblythy
5bbf9cade9 feat: Improve authentication adapter interface to support multi-factor authentication (MFA), authentication challenges, and provide a more powerful interface for writing custom authentication adapters (#8156) 2022-11-10 17:35:39 +01:00
dblythy
199dfc1722 fix: live query role cache does not clear when a user is added to a role (#8026) 2022-06-11 10:21:55 +02:00
Manuel
c56d326b17 Add circular dependency detection to CI (#7316)
* add circular dependency detection to CI

* fixed Auth-RestWrite circular dependency

* updated package lock

* fixed Logger circular dependency

* fix lint
2021-04-07 20:47:57 -05:00
Diamond Lewis
e6ac3b6932 fix(prettier): Properly handle lint-stage files (#6970)
Now handles top level files and recursive files in folders.

Set max line length to be 100
2020-10-25 15:06:58 -05:00
Antoine Cormouls
de79b70cbc Ensure all roles are properly loaded #5131 (#5132)
* Fix Limitation Role #5131

Allow to manage Live Query with User that have more than 100 Parse.Roles

* Clean Up

* Add Custom Config Support and Test

* Fix Auth Test

* Switch to Async Function

* Fix restWhere

* Fix Test

* Clean Final Commit

* Lint Fix

* Need to Fix Test Callback

* Fixes broken test

* Restore find() method in spy

* adds restquery-each

* small nit

* adds changelog
2018-10-20 16:45:23 -04:00
Florent Vilmart
d83a0b6808 Use Prettier JS (#5017)
* Adds prettier

* Run lint before tests
2018-09-01 13:58:06 -04:00
Florent Vilmart
2ae603574c Auth module refactoring in order to be reusable (#4940)
* Auth module refactoring in order to be reusable

* Ensure cache controller is properly forwarded from helpers

* Nits
2018-08-09 13:02:06 -04:00
Florent Vilmart
3bcb5a0997 Ensure User ACL's are more flexible and secure #3588 (#4860)
* Fixes an issue that would let the beforeDelete be called when user has no access to the object

* Ensure we properly lock user

- Improves find method so we can attempt to read for a write poking the right ACL instead of using masterKey
- This ensure we do not run beforeDelete/beforeFind/beforeSave in the wrong scenarios

* nits

* Caps insufficient
2018-06-28 16:31:22 -04:00
Florent Vilmart
11c40dce97 Adds session creation code in Auth.js (#4574) 2018-02-19 11:15:54 -05:00
Florent Vilmart
1dd58b7527 Adds support for read-only masterKey (#4297)
* Adds support for read-only masterKey

* Adds tests to make sure all endpoints are properly protected

* Updates readme

* nits
2017-10-26 15:35:07 -04:00
Florent Vilmart
3079270b3e Optimizations (#4135)
* removes costly json serialization to InMemoryCacheAdapter

* Always cache a copy of the array

* Use own mapValues

* Makes sure we dont make unnecessary calls to the logger

* Do not bypass loggers with silent logging (only applies to stdout)

* warn is not warning

* use ===

* Wrap logRequest / logResponse in the loggerController for more granular control

Also give the ability to pass functions to the logger so we don't serialize too early in JSON (costly)

* reconfiguring winston would override the transports levels and make subsequent tests fail
2017-09-04 20:47:49 -04:00
Arthur Cinader
ca286b7108 Enable prefer-const lint rule (#3202) 2016-12-07 18:17:05 -05:00
Florent Vilmart
8c2c76dd26 Adds liniting into the workflow (#3082)
* initial linting of src

* fix indent to 2 spaces

* Removes unnecessary rules

* ignore spec folder for now

* Spec linting

* Fix spec indent

* nits

* nits

* no no-empty rule
2016-11-24 15:47:41 -05:00
Florent Vilmart
340eb46fe1 Adds endpoint for non-revocable session token upgrade (#2646) 2016-09-09 14:48:06 -04:00
Florent Vilmart
147b493e23 Results invalid session when providing an invalid session token (#2154)
* Results invalid session when providing an invalid session token

* Reverts unsafe loggers

* Fixes failing tests

- The tests were failin when run in sequence as we called done() before the JSSDK had a chance to register the session token, therefore having a proper logout call in afterEach
2016-06-26 23:20:02 -04:00
Blayne Chard
2eb861db66 Fixing typo in _loadRoles which prevents caching of roles. (#2063) 2016-06-15 22:22:23 -07:00
Yaroslav Syrytsia
afbc662dcd fix gettings user roles from cache (#2034) 2016-06-12 02:43:11 -07:00
Drew
392102eb97 Cache users by objectID, and clear cache when updated via master key (fixes #1836) (#1844)
* Cache users by objectID, and clear cache when updated via master key

* Go back to caching by session token. Clear out cache by querying _Session when user is modified with Master Key (ew, hopefully that can be improved later)

* Fix issue with user updates from different sessions causing stale reads

* Tests aren't transpiled...

* Still not transpiled
2016-05-22 09:59:36 -07:00
Blayne Chard
8c09c3dae1 Adding Caching Adapter, allows caching of _Role and _User queries (fixes #168) (#1664)
* Adding Caching Adapter, allows caching of _Role and _User queries.
2016-05-18 12:12:30 +12:00
Drew Gross
ee8a3c94d5 No need to transform post-transform keys in mongo adapter 2016-04-25 20:42:19 -07:00
Florent Vilmart
cbbd66964a Huge performance improvement on roles queries 2016-04-05 20:44:26 -04:00
0xA455
1bd804693c Fix exception with non-expiring session tokens.
Session tokens generated by Parse with with "Expire inactive session" set

to No leave the the expiresAt field undefined. This fixes the TypeError

"Cannot read property 'iso' of undefined'" exception thrown when trying

to use a session token with undefined expiresAt.
2016-04-05 16:12:15 -07:00
Blayne Chard
18906f17b4 Auth._loadRoles should not query the same role twice. 2016-04-04 21:32:41 -04:00
Jeremy May
f99b5588ab Added session length option for session tokens to server configuration 2016-04-02 11:36:47 -04:00
Florent Vilmart
17bc79b372 Improves tests, ensure unicity of roleIds 2016-03-04 22:52:27 -05:00
Florent Vilmart
c9f8453171 Fix reversed roles lookup 2016-03-04 22:52:26 -05:00
Nikita Lutsenko
c4fa3f0ee0 Propagate installationId in all Cloud Code triggers. 2016-03-02 21:02:50 -08:00
Fosco Marotto
46da50f2b3 Merge pull request #689 from ParsePlatform/flovilmart.rolesHierarchy
Recursive lookup for roles
2016-02-29 14:35:04 -08:00
Nikita Lutsenko
9bc636dc5c Cleanup, remove unusued methods and unify cache.js. 2016-02-26 22:48:53 -08:00
Florent Vilmart
753bead4ac Recursive lookup for roles 2016-02-26 13:35:56 -05:00
Florent Vilmart
c4abd1e267 cache as ES6 2016-02-25 08:10:08 -05:00
Francis Lessard
83c0f92553 no message 2016-02-13 08:18:43 -05:00
Nikita Lutsenko
b989bbcaae Move all source files into 'src' folder. 2016-02-08 19:41:07 -08:00