Skip to content

Commit 7c1faef

Browse files
authored
build: Release (#3039)
2 parents 5eda26c + efba777 commit 7c1faef

File tree

15 files changed

+1450
-311
lines changed

15 files changed

+1450
-311
lines changed

Parse-Dashboard/Authentication.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ function initialize(app, options) {
5555

5656
const cookieSessionSecret = options.cookieSessionSecret || require('crypto').randomBytes(64).toString('hex');
5757
const cookieSessionMaxAge = options.cookieSessionMaxAge;
58+
const cookieSessionStore = options.cookieSessionStore;
5859

5960
app.use(require('body-parser').urlencoded({ extended: true }));
60-
app.use(require('express-session')({
61+
const sessionConfig = {
6162
name: 'parse_dash',
6263
secret: cookieSessionSecret,
6364
resave: false,
@@ -67,7 +68,14 @@ function initialize(app, options) {
6768
httpOnly: true,
6869
sameSite: 'lax',
6970
}
70-
}));
71+
};
72+
73+
// Add custom session store if provided
74+
if (cookieSessionStore) {
75+
sessionConfig.store = cookieSessionStore;
76+
}
77+
78+
app.use(require('express-session')(sessionConfig));
7179
app.use(require('connect-flash')());
7280
app.use(passport.initialize());
7381
app.use(passport.session());

Parse-Dashboard/app.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ module.exports = function(config, options) {
8282
const users = config.users;
8383
const useEncryptedPasswords = config.useEncryptedPasswords ? true : false;
8484
const authInstance = new Authentication(users, useEncryptedPasswords, mountPath);
85-
authInstance.initialize(app, { cookieSessionSecret: options.cookieSessionSecret, cookieSessionMaxAge: options.cookieSessionMaxAge });
85+
authInstance.initialize(app, {
86+
cookieSessionSecret: options.cookieSessionSecret,
87+
cookieSessionMaxAge: options.cookieSessionMaxAge,
88+
cookieSessionStore: options.cookieSessionStore
89+
});
8690

8791
// CSRF error handler
8892
app.use(function (err, req, res, next) {

Parse-Dashboard/server.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,13 @@ module.exports = (options) => {
162162
if (allowInsecureHTTP || trustProxy || dev) {app.enable('trust proxy');}
163163

164164
config.data.trustProxy = trustProxy;
165-
const dashboardOptions = { allowInsecureHTTP, cookieSessionSecret, dev, cookieSessionMaxAge };
165+
const dashboardOptions = {
166+
allowInsecureHTTP,
167+
cookieSessionSecret,
168+
dev,
169+
cookieSessionMaxAge,
170+
cookieSessionStore: config.data.cookieSessionStore
171+
};
166172
app.use(mountPath, parseDashboard(config.data, dashboardOptions));
167173
let server;
168174
if(!configSSLKey || !configSSLCert){

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,55 @@ If you create a new user by running `parse-dashboard --createUser`, you will be
803803

804804
Parse Dashboard follows the industry standard and supports the common OTP algorithm `SHA-1` by default, to be compatible with most authenticator apps. If you have specific security requirements regarding TOTP characteristics (algorithm, digit length, time period) you can customize them by using the guided configuration mentioned above.
805805

806+
### Running Multiple Dashboard Replicas
807+
808+
When deploying Parse Dashboard with multiple replicas behind a load balancer, you need to use a shared session store to ensure that CSRF tokens and user sessions work correctly across all replicas. Without a shared session store, login attempts may fail with "CSRF token validation failed" errors when requests are distributed across different replicas.
809+
810+
#### Using a Custom Session Store
811+
812+
Parse Dashboard supports using any session store compatible with [express-session](https://github.com/expressjs/session). The `sessionStore` option must be configured programmatically when initializing the dashboard.
813+
814+
**Suggested Session Stores:**
815+
816+
- [connect-redis](https://www.npmjs.com/package/connect-redis) - Redis session store
817+
- [connect-mongo](https://www.npmjs.com/package/connect-mongo) - MongoDB session store
818+
- [connect-pg-simple](https://www.npmjs.com/package/connect-pg-simple) - PostgreSQL session store
819+
- [memorystore](https://www.npmjs.com/package/memorystore) - Memory session store with TTL support
820+
821+
**Example using connect-redis:**
822+
823+
```js
824+
const express = require('express');
825+
const ParseDashboard = require('parse-dashboard');
826+
const { createClient } = require('redis');
827+
const RedisStore = require('connect-redis').default;
828+
829+
// Instantiate Redis client
830+
const redisClient = createClient({ url: 'redis://localhost:6379' });
831+
redisClient.connect();
832+
833+
// Instantiate Redis session store
834+
const cookieSessionStore = new RedisStore({ client: redisClient });
835+
836+
// Configure dashboard with session store
837+
const dashboard = new ParseDashboard({
838+
apps: [...],
839+
users: [...],
840+
}, {
841+
cookieSessionStore,
842+
cookieSessionSecret: 'your-secret-key',
843+
});
844+
845+
**Important Notes:**
846+
847+
- The `cookieSessionSecret` option must be set to the same value across all replicas to ensure session cookies work correctly.
848+
- If `cookieSessionStore` is not provided, Parse Dashboard will use the default in-memory session store, which only works for single-instance deployments.
849+
- For production deployments with multiple replicas, always configure a shared session store.
850+
851+
#### Alternative: Using Sticky Sessions
852+
853+
If you cannot use a shared session store, you can configure your load balancer to use sticky sessions (session affinity), which ensures that requests from the same user are always routed to the same replica. However, using a shared session store is the recommended approach as it provides better reliability and scalability.
854+
806855
### Separating App Access Based on User Identity
807856
If you have configured your dashboard to manage multiple applications, you can restrict the management of apps based on user identity.
808857

@@ -1329,7 +1378,7 @@ To reduce the time for info panel data to appear, data can be prefetched.
13291378
13301379
| Parameter | Type | Optional | Default | Example | Description |
13311380
|--------------------------------|---------|----------|---------|---------|-----------------------------------------------------------------------------------------------------------------------------------|
1332-
| `infoPanel[*].prefetchObjects` | Number | yes | `0` | `2` | Number of next rows to prefetch when browsing sequential rows. For example, `2` means the next 2 rows will be fetched in advance. |
1381+
| `infoPanel[*].prefetchObjects` | Number | yes | `0` | `2` | Number of navigation steps to prefetch ahead when browsing sequential rows. For example, `2` means data for the next 2 navigation steps will be fetched in advance. When using multi-panel mode with batch navigation enabled, each navigation step corresponds to a full batch of panels, so the total number of prefetched objects will be `prefetchObjects × panelCount`. |
13331382
| `infoPanel[*].prefetchStale` | Number | yes | `0` | `10` | Duration in seconds after which prefetched data is discarded as stale. |
13341383
| `infoPanel[*].prefetchImage` | Boolean | yes | `true` | `false` | Whether to prefetch image content when prefetching objects. Only applies when `prefetchObjects` is enabled. |
13351384
| `infoPanel[*].prefetchVideo` | Boolean | yes | `true` | `false` | Whether to prefetch video content when prefetching objects. Only applies when `prefetchObjects` is enabled. |

changelogs/CHANGELOG_alpha.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,94 @@
1+
# [8.1.0-alpha.13](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.12...8.1.0-alpha.13) (2025-12-01)
2+
3+
4+
### Features
5+
6+
* Upgrade to parse 7.1.2 ([#3038](https://github.com/parse-community/parse-dashboard/issues/3038)) ([c6c1787](https://github.com/parse-community/parse-dashboard/commit/c6c1787fbacd50dcb9d1b613d73968260268993d))
7+
8+
# [8.1.0-alpha.12](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.11...8.1.0-alpha.12) (2025-12-01)
9+
10+
11+
### Bug Fixes
12+
13+
* Data browser export triggers confirmation dialog for navigating with selected rows ([#3037](https://github.com/parse-community/parse-dashboard/issues/3037)) ([c6334cd](https://github.com/parse-community/parse-dashboard/commit/c6334cde97e7c2c4b0bc776448a4301d8bd2fbeb))
14+
15+
# [8.1.0-alpha.11](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.10...8.1.0-alpha.11) (2025-12-01)
16+
17+
18+
### Bug Fixes
19+
20+
* Info panel may show stale data of previous objects when refreshing the data table or navigating between classes ([#3036](https://github.com/parse-community/parse-dashboard/issues/3036)) ([2565f0e](https://github.com/parse-community/parse-dashboard/commit/2565f0e30e0bb4dbc5c67995d141935b81a40396))
21+
22+
# [8.1.0-alpha.10](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.9...8.1.0-alpha.10) (2025-11-30)
23+
24+
25+
### Features
26+
27+
* Remember info panel width and count across browser sessions ([#3031](https://github.com/parse-community/parse-dashboard/issues/3031)) ([d188030](https://github.com/parse-community/parse-dashboard/commit/d188030ef723b1aab80eece34b6b1590336b5d36))
28+
29+
# [8.1.0-alpha.9](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.8...8.1.0-alpha.9) (2025-11-28)
30+
31+
32+
### Bug Fixes
33+
34+
* Selected saved filter is not expanded in sidebar when reloading browser page ([#3029](https://github.com/parse-community/parse-dashboard/issues/3029)) ([2e7850e](https://github.com/parse-community/parse-dashboard/commit/2e7850e7139e12e0cbaff05dccaade9c51e9f058))
35+
36+
# [8.1.0-alpha.8](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.7...8.1.0-alpha.8) (2025-11-28)
37+
38+
39+
### Features
40+
41+
* Remember selected column when navigating between saved filters of a class with auto-load first row enabled ([#3028](https://github.com/parse-community/parse-dashboard/issues/3028)) ([964584c](https://github.com/parse-community/parse-dashboard/commit/964584cb2e1a6d318c1fac3087118e1ebe5bf157))
42+
43+
# [8.1.0-alpha.7](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.6...8.1.0-alpha.7) (2025-11-28)
44+
45+
46+
### Bug Fixes
47+
48+
* Info panel data not reloading when clicking refresh button in data browser ([#3027](https://github.com/parse-community/parse-dashboard/issues/3027)) ([8f91d15](https://github.com/parse-community/parse-dashboard/commit/8f91d15e2553f906ff8c078df58ee523a3d845a9))
49+
50+
# [8.1.0-alpha.6](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.5...8.1.0-alpha.6) (2025-11-27)
51+
52+
53+
### Bug Fixes
54+
55+
* No individual data loading indicators when displaying multiple info panels ([#3026](https://github.com/parse-community/parse-dashboard/issues/3026)) ([5ca8218](https://github.com/parse-community/parse-dashboard/commit/5ca82188428b017f4a3d4d34af2eaa2b5e53075f))
56+
57+
# [8.1.0-alpha.5](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.4...8.1.0-alpha.5) (2025-11-27)
58+
59+
60+
### Features
61+
62+
* Automatically resize info panel sidebar width when adding or removing panels ([#3025](https://github.com/parse-community/parse-dashboard/issues/3025)) ([1032301](https://github.com/parse-community/parse-dashboard/commit/1032301246f1763f77e328f650b16101194f7f8f))
63+
64+
# [8.1.0-alpha.4](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.3...8.1.0-alpha.4) (2025-11-26)
65+
66+
67+
### Bug Fixes
68+
69+
* Sync-scrolling multiple panels stops at bottom of shortest panel when scrolling down ([#3024](https://github.com/parse-community/parse-dashboard/issues/3024)) ([bf46938](https://github.com/parse-community/parse-dashboard/commit/bf46938feaaf9793f8525a726510ea6d5b931dcf))
70+
71+
# [8.1.0-alpha.3](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.2...8.1.0-alpha.3) (2025-11-26)
72+
73+
74+
### Bug Fixes
75+
76+
* Sync-scrolling multiple panels jumps to bottom of shortest panel when scrolling up ([#3023](https://github.com/parse-community/parse-dashboard/issues/3023)) ([3f85f89](https://github.com/parse-community/parse-dashboard/commit/3f85f8944a8b5100956e2c4390f2d8a6bb0ed9cf))
77+
78+
# [8.1.0-alpha.2](https://github.com/parse-community/parse-dashboard/compare/8.1.0-alpha.1...8.1.0-alpha.2) (2025-11-26)
79+
80+
81+
### Features
82+
83+
* Add displaying multiple info panels and batch navigation ([#3020](https://github.com/parse-community/parse-dashboard/issues/3020)) ([7ac3186](https://github.com/parse-community/parse-dashboard/commit/7ac31863bc125acaa4be167703a85b06e7e0019f))
84+
85+
# [8.1.0-alpha.1](https://github.com/parse-community/parse-dashboard/compare/8.0.0...8.1.0-alpha.1) (2025-11-23)
86+
87+
88+
### Features
89+
90+
* Add `cookieSessionStore` option to support multi-replica deployments ([#3016](https://github.com/parse-community/parse-dashboard/issues/3016)) ([3eb4b05](https://github.com/parse-community/parse-dashboard/commit/3eb4b05c5f3272e1b04f3e2e097f2e4775fdd63d))
91+
192
# [8.0.0-alpha.6](https://github.com/parse-community/parse-dashboard/compare/8.0.0-alpha.5...8.0.0-alpha.6) (2025-10-29)
293

394

0 commit comments

Comments
 (0)