@atproto/pds 0.4.34 → 0.4.36
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +17 -0
- package/dist/account-manager/db/migrations/004-oauth.d.ts +4 -0
- package/dist/account-manager/db/migrations/004-oauth.d.ts.map +1 -0
- package/dist/account-manager/db/migrations/004-oauth.js +106 -0
- package/dist/account-manager/db/migrations/004-oauth.js.map +1 -0
- package/dist/account-manager/db/migrations/index.d.ts +2 -0
- package/dist/account-manager/db/migrations/index.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/index.js +2 -0
- package/dist/account-manager/db/migrations/index.js.map +1 -1
- package/dist/account-manager/db/schema/authorization-request.d.ts +19 -0
- package/dist/account-manager/db/schema/authorization-request.d.ts.map +1 -0
- package/dist/account-manager/db/schema/authorization-request.js +5 -0
- package/dist/account-manager/db/schema/authorization-request.js.map +1 -0
- package/dist/account-manager/db/schema/device-account.d.ts +14 -0
- package/dist/account-manager/db/schema/device-account.d.ts.map +1 -0
- package/dist/account-manager/db/schema/device-account.js +5 -0
- package/dist/account-manager/db/schema/device-account.js.map +1 -0
- package/dist/account-manager/db/schema/device.d.ts +16 -0
- package/dist/account-manager/db/schema/device.d.ts.map +1 -0
- package/dist/account-manager/db/schema/device.js +5 -0
- package/dist/account-manager/db/schema/device.js.map +1 -0
- package/dist/account-manager/db/schema/index.d.ts +11 -1
- package/dist/account-manager/db/schema/index.d.ts.map +1 -1
- package/dist/account-manager/db/schema/token.d.ts +24 -0
- package/dist/account-manager/db/schema/token.d.ts.map +1 -0
- package/dist/account-manager/db/schema/token.js +5 -0
- package/dist/account-manager/db/schema/token.js.map +1 -0
- package/dist/account-manager/db/schema/used-refresh-token.d.ts +12 -0
- package/dist/account-manager/db/schema/used-refresh-token.d.ts.map +1 -0
- package/dist/account-manager/db/schema/used-refresh-token.js +5 -0
- package/dist/account-manager/db/schema/used-refresh-token.js.map +1 -0
- package/dist/account-manager/helpers/account.d.ts +27 -5
- package/dist/account-manager/helpers/account.d.ts.map +1 -1
- package/dist/account-manager/helpers/account.js +15 -14
- package/dist/account-manager/helpers/account.js.map +1 -1
- package/dist/account-manager/helpers/authorization-request.d.ts +12 -0
- package/dist/account-manager/helpers/authorization-request.d.ts.map +1 -0
- package/dist/account-manager/helpers/authorization-request.js +59 -0
- package/dist/account-manager/helpers/authorization-request.js.map +1 -0
- package/dist/account-manager/helpers/device-account.d.ts +108 -0
- package/dist/account-manager/helpers/device-account.d.ts.map +1 -0
- package/dist/account-manager/helpers/device-account.js +82 -0
- package/dist/account-manager/helpers/device-account.js.map +1 -0
- package/dist/account-manager/helpers/device.d.ts +9 -0
- package/dist/account-manager/helpers/device.d.ts.map +1 -0
- package/dist/account-manager/helpers/device.js +32 -0
- package/dist/account-manager/helpers/device.js.map +1 -0
- package/dist/account-manager/helpers/token.d.ts +485 -0
- package/dist/account-manager/helpers/token.d.ts.map +1 -0
- package/dist/account-manager/helpers/token.js +123 -0
- package/dist/account-manager/helpers/token.js.map +1 -0
- package/dist/account-manager/helpers/used-refresh-token.d.ts +10 -0
- package/dist/account-manager/helpers/used-refresh-token.d.ts.map +1 -0
- package/dist/account-manager/helpers/used-refresh-token.js +25 -0
- package/dist/account-manager/helpers/used-refresh-token.js.map +1 -0
- package/dist/account-manager/index.d.ts +36 -6
- package/dist/account-manager/index.d.ts.map +1 -1
- package/dist/account-manager/index.js +223 -22
- package/dist/account-manager/index.js.map +1 -1
- package/dist/actor-store/preference/reader.js.map +1 -1
- package/dist/actor-store/record/reader.d.ts +1 -1
- package/dist/api/app/bsky/util/resolver.d.ts +1 -1
- package/dist/api/com/atproto/server/createSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createSession.js +7 -31
- package/dist/api/com/atproto/server/createSession.js.map +1 -1
- package/dist/api/com/atproto/server/deleteSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deleteSession.js +14 -13
- package/dist/api/com/atproto/server/deleteSession.js.map +1 -1
- package/dist/api/com/atproto/server/getSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getSession.js +4 -2
- package/dist/api/com/atproto/server/getSession.js.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.js +4 -2
- package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
- package/dist/api/com/atproto/sync/getRepoStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRepoStatus.js +2 -1
- package/dist/api/com/atproto/sync/getRepoStatus.js.map +1 -1
- package/dist/api/com/atproto/sync/listRepos.js +2 -2
- package/dist/api/com/atproto/sync/listRepos.js.map +1 -1
- package/dist/api/proxy.d.ts.map +1 -1
- package/dist/api/proxy.js +15 -2
- package/dist/api/proxy.js.map +1 -1
- package/dist/auth-routes.d.ts +4 -0
- package/dist/auth-routes.d.ts.map +1 -0
- package/dist/auth-routes.js +24 -0
- package/dist/auth-routes.js.map +1 -0
- package/dist/auth-verifier.d.ts +32 -11
- package/dist/auth-verifier.d.ts.map +1 -1
- package/dist/auth-verifier.js +238 -79
- package/dist/auth-verifier.js.map +1 -1
- package/dist/config/config.d.ts +12 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +45 -0
- package/dist/config/config.js.map +1 -1
- package/dist/config/env.d.ts +8 -0
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +10 -0
- package/dist/config/env.js.map +1 -1
- package/dist/config/secrets.d.ts +1 -0
- package/dist/config/secrets.d.ts.map +1 -1
- package/dist/config/secrets.js +1 -0
- package/dist/config/secrets.js.map +1 -1
- package/dist/context.d.ts +6 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +71 -13
- package/dist/context.js.map +1 -1
- package/dist/db/cast.d.ts +15 -0
- package/dist/db/cast.d.ts.map +1 -0
- package/dist/db/cast.js +66 -0
- package/dist/db/cast.js.map +1 -0
- package/dist/db/db.d.ts +2 -2
- package/dist/db/db.d.ts.map +1 -1
- package/dist/db/db.js +9 -7
- package/dist/db/db.js.map +1 -1
- package/dist/db/index.d.ts +1 -0
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +1 -0
- package/dist/db/index.js.map +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +5 -0
- package/dist/error.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +13 -11
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +80 -64
- package/dist/logger.js.map +1 -1
- package/dist/oauth/detailed-account-store.d.ts +27 -0
- package/dist/oauth/detailed-account-store.d.ts.map +1 -0
- package/dist/oauth/detailed-account-store.js +76 -0
- package/dist/oauth/detailed-account-store.js.map +1 -0
- package/dist/oauth/provider.d.ts +16 -0
- package/dist/oauth/provider.d.ts.map +1 -0
- package/dist/oauth/provider.js +45 -0
- package/dist/oauth/provider.js.map +1 -0
- package/dist/pipethrough.d.ts.map +1 -1
- package/dist/pipethrough.js.map +1 -1
- package/dist/sequencer/events.d.ts +2 -2
- package/example.env +21 -3
- package/package.json +9 -7
- package/src/account-manager/db/migrations/004-oauth.ts +122 -0
- package/src/account-manager/db/migrations/index.ts +2 -0
- package/src/account-manager/db/schema/authorization-request.ts +26 -0
- package/src/account-manager/db/schema/device-account.ts +15 -0
- package/src/account-manager/db/schema/device.ts +18 -0
- package/src/account-manager/db/schema/index.ts +15 -0
- package/src/account-manager/db/schema/token.ts +34 -0
- package/src/account-manager/db/schema/used-refresh-token.ts +13 -0
- package/src/account-manager/helpers/account.ts +16 -21
- package/src/account-manager/helpers/authorization-request.ts +82 -0
- package/src/account-manager/helpers/device-account.ts +135 -0
- package/src/account-manager/helpers/device.ts +45 -0
- package/src/account-manager/helpers/token.ts +185 -0
- package/src/account-manager/helpers/used-refresh-token.ts +30 -0
- package/src/account-manager/index.ts +325 -20
- package/src/actor-store/preference/reader.ts +1 -1
- package/src/api/com/atproto/server/createSession.ts +8 -44
- package/src/api/com/atproto/server/deleteSession.ts +14 -20
- package/src/api/com/atproto/server/getSession.ts +7 -2
- package/src/api/com/atproto/server/refreshSession.ts +6 -2
- package/src/api/com/atproto/sync/getRepoStatus.ts +3 -1
- package/src/api/com/atproto/sync/listRepos.ts +1 -1
- package/src/api/proxy.ts +18 -2
- package/src/auth-routes.ts +27 -0
- package/src/auth-verifier.ts +312 -92
- package/src/config/config.ts +66 -0
- package/src/config/env.ts +24 -0
- package/src/config/secrets.ts +2 -0
- package/src/context.ts +80 -14
- package/src/db/cast.ts +59 -0
- package/src/db/db.ts +15 -12
- package/src/db/index.ts +1 -0
- package/src/error.ts +7 -0
- package/src/index.ts +2 -0
- package/src/logger.ts +83 -38
- package/src/oauth/detailed-account-store.ts +96 -0
- package/src/oauth/provider.ts +77 -0
- package/src/pipethrough.ts +3 -2
package/dist/index.js
CHANGED
@@ -40,6 +40,7 @@ const cors_1 = __importDefault(require("cors"));
|
|
40
40
|
const events_1 = __importDefault(require("events"));
|
41
41
|
const common_1 = require("@atproto/common");
|
42
42
|
const api_1 = __importDefault(require("./api"));
|
43
|
+
const authRoutes = __importStar(require("./auth-routes"));
|
43
44
|
const basicRoutes = __importStar(require("./basic-routes"));
|
44
45
|
const wellKnown = __importStar(require("./well-known"));
|
45
46
|
const error = __importStar(require("./error"));
|
@@ -149,6 +150,7 @@ class PDS {
|
|
149
150
|
};
|
150
151
|
let server = (0, lexicon_1.createServer)(xrpcOpts);
|
151
152
|
server = (0, api_1.default)(server, ctx);
|
153
|
+
app.use(authRoutes.createRouter(ctx));
|
152
154
|
app.use(basicRoutes.createRouter(ctx));
|
153
155
|
app.use(wellKnown.createRouter(ctx));
|
154
156
|
app.use(server.xrpc.router);
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,sDAAsD;AACtD,mDAAmD;AACnD,+CAA+C;AAC/C,gCAA6B;AAE7B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BA+FC;AAED,kBAAe,GAAG,CAAA"}
|
package/dist/logger.d.ts
CHANGED
@@ -1,12 +1,14 @@
|
|
1
|
-
|
2
|
-
export declare const dbLogger: pino.Logger<
|
3
|
-
export declare const didCacheLogger: pino.Logger<
|
4
|
-
export declare const readStickyLogger: pino.Logger<
|
5
|
-
export declare const redisLogger: pino.Logger<
|
6
|
-
export declare const seqLogger: pino.Logger<
|
7
|
-
export declare const mailerLogger: pino.Logger<
|
8
|
-
export declare const labelerLogger: pino.Logger<
|
9
|
-
export declare const crawlerLogger: pino.Logger<
|
10
|
-
export declare const httpLogger: pino.Logger<
|
11
|
-
export declare const
|
1
|
+
/// <reference types="node/http" />
|
2
|
+
export declare const dbLogger: import("pino").default.Logger<never>;
|
3
|
+
export declare const didCacheLogger: import("pino").default.Logger<never>;
|
4
|
+
export declare const readStickyLogger: import("pino").default.Logger<never>;
|
5
|
+
export declare const redisLogger: import("pino").default.Logger<never>;
|
6
|
+
export declare const seqLogger: import("pino").default.Logger<never>;
|
7
|
+
export declare const mailerLogger: import("pino").default.Logger<never>;
|
8
|
+
export declare const labelerLogger: import("pino").default.Logger<never>;
|
9
|
+
export declare const crawlerLogger: import("pino").default.Logger<never>;
|
10
|
+
export declare const httpLogger: import("pino").default.Logger<never>;
|
11
|
+
export declare const fetchLogger: import("pino").default.Logger<never>;
|
12
|
+
export declare const oauthLogger: import("pino").default.Logger<never>;
|
13
|
+
export declare const loggerMiddleware: import("pino-http").HttpLogger<import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, never>;
|
12
14
|
//# sourceMappingURL=logger.d.ts.map
|
package/dist/logger.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";AAIA,eAAO,MAAM,QAAQ,sCAA4B,CAAA;AACjD,eAAO,MAAM,cAAc,sCAAmC,CAAA;AAC9D,eAAO,MAAM,gBAAgB,sCAAqC,CAAA;AAClE,eAAO,MAAM,WAAW,sCAA+B,CAAA;AACvD,eAAO,MAAM,SAAS,sCAAmC,CAAA;AACzD,eAAO,MAAM,YAAY,sCAAgC,CAAA;AACzD,eAAO,MAAM,aAAa,sCAAiC,CAAA;AAC3D,eAAO,MAAM,aAAa,sCAAiC,CAAA;AAC3D,eAAO,MAAM,UAAU,sCAAyB,CAAA;AAChD,eAAO,MAAM,WAAW,sCAA+B,CAAA;AACvD,eAAO,MAAM,WAAW,sCAA+B,CAAA;AAEvD,eAAO,MAAM,gBAAgB,sIAM3B,CAAA"}
|
package/dist/logger.js
CHANGED
@@ -1,37 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
4
|
};
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
-
exports.loggerMiddleware = exports.httpLogger = exports.crawlerLogger = exports.labelerLogger = exports.mailerLogger = exports.seqLogger = exports.redisLogger = exports.readStickyLogger = exports.didCacheLogger = exports.dbLogger = void 0;
|
30
|
-
const pino_1 =
|
6
|
+
exports.loggerMiddleware = exports.oauthLogger = exports.fetchLogger = exports.httpLogger = exports.crawlerLogger = exports.labelerLogger = exports.mailerLogger = exports.seqLogger = exports.redisLogger = exports.readStickyLogger = exports.didCacheLogger = exports.dbLogger = void 0;
|
7
|
+
const pino_1 = require("pino");
|
31
8
|
const pino_http_1 = __importDefault(require("pino-http"));
|
32
9
|
const common_1 = require("@atproto/common");
|
33
|
-
const jose = __importStar(require("jose"));
|
34
|
-
const auth_verifier_1 = require("./auth-verifier");
|
35
10
|
exports.dbLogger = (0, common_1.subsystemLogger)('pds:db');
|
36
11
|
exports.didCacheLogger = (0, common_1.subsystemLogger)('pds:did-cache');
|
37
12
|
exports.readStickyLogger = (0, common_1.subsystemLogger)('pds:read-sticky');
|
@@ -41,46 +16,87 @@ exports.mailerLogger = (0, common_1.subsystemLogger)('pds:mailer');
|
|
41
16
|
exports.labelerLogger = (0, common_1.subsystemLogger)('pds:labeler');
|
42
17
|
exports.crawlerLogger = (0, common_1.subsystemLogger)('pds:crawler');
|
43
18
|
exports.httpLogger = (0, common_1.subsystemLogger)('pds');
|
19
|
+
exports.fetchLogger = (0, common_1.subsystemLogger)('pds:fetch');
|
20
|
+
exports.oauthLogger = (0, common_1.subsystemLogger)('pds:oauth');
|
44
21
|
exports.loggerMiddleware = (0, pino_http_1.default)({
|
45
22
|
logger: exports.httpLogger,
|
46
23
|
serializers: {
|
47
|
-
err:
|
48
|
-
|
49
|
-
code: err?.code,
|
50
|
-
message: err?.message,
|
51
|
-
};
|
52
|
-
},
|
53
|
-
req: (req) => {
|
54
|
-
const serialized = pino_1.default.stdSerializers.req(req);
|
55
|
-
const authHeader = serialized.headers.authorization || '';
|
56
|
-
let auth = undefined;
|
57
|
-
if (authHeader.startsWith('Bearer ')) {
|
58
|
-
const token = authHeader.slice('Bearer '.length);
|
59
|
-
const { sub } = jose.decodeJwt(token);
|
60
|
-
if (sub) {
|
61
|
-
auth = 'Bearer ' + sub;
|
62
|
-
}
|
63
|
-
else {
|
64
|
-
auth = 'Bearer Invalid';
|
65
|
-
}
|
66
|
-
}
|
67
|
-
if (authHeader.startsWith('Basic ')) {
|
68
|
-
const parsed = (0, auth_verifier_1.parseBasicAuth)(authHeader);
|
69
|
-
if (!parsed) {
|
70
|
-
auth = 'Basic Invalid';
|
71
|
-
}
|
72
|
-
else {
|
73
|
-
auth = 'Basic ' + parsed.username;
|
74
|
-
}
|
75
|
-
}
|
76
|
-
return {
|
77
|
-
...serialized,
|
78
|
-
headers: {
|
79
|
-
...serialized.headers,
|
80
|
-
authorization: auth,
|
81
|
-
},
|
82
|
-
};
|
83
|
-
},
|
24
|
+
err: errSerializer,
|
25
|
+
req: reqSerializer,
|
84
26
|
},
|
85
27
|
});
|
28
|
+
function errSerializer(err) {
|
29
|
+
return {
|
30
|
+
code: err?.code,
|
31
|
+
message: err?.message,
|
32
|
+
};
|
33
|
+
}
|
34
|
+
function reqSerializer(req) {
|
35
|
+
const serialized = pino_1.stdSerializers.req(req);
|
36
|
+
serialized.headers = obfuscateHeaders(serialized.headers);
|
37
|
+
return serialized;
|
38
|
+
}
|
39
|
+
function obfuscateHeaders(headers) {
|
40
|
+
const obfuscatedHeaders = {};
|
41
|
+
for (const key in headers) {
|
42
|
+
if (key.toLowerCase() === 'authorization') {
|
43
|
+
obfuscatedHeaders[key] = obfuscateAuthHeader(headers[key]);
|
44
|
+
}
|
45
|
+
else if (key.toLowerCase() === 'dpop') {
|
46
|
+
obfuscatedHeaders[key] = obfuscateJws(headers[key]) || 'Invalid';
|
47
|
+
}
|
48
|
+
else {
|
49
|
+
obfuscatedHeaders[key] = headers[key];
|
50
|
+
}
|
51
|
+
}
|
52
|
+
return obfuscatedHeaders;
|
53
|
+
}
|
54
|
+
function obfuscateAuthHeader(authHeader) {
|
55
|
+
// This is a hot path (runs on every request). Avoid using split() or regex.
|
56
|
+
const spaceIdx = authHeader.indexOf(' ');
|
57
|
+
if (spaceIdx === -1)
|
58
|
+
return 'Invalid';
|
59
|
+
const type = authHeader.slice(0, spaceIdx);
|
60
|
+
switch (type.toLowerCase()) {
|
61
|
+
case 'bearer':
|
62
|
+
return `${type} ${obfuscateBearer(authHeader.slice(spaceIdx + 1))}`;
|
63
|
+
case 'dpop':
|
64
|
+
return `${type} ${obfuscateJws(authHeader.slice(spaceIdx + 1)) || 'Invalid'}`;
|
65
|
+
case 'basic':
|
66
|
+
return `${type} ${obfuscateBasic(authHeader.slice(spaceIdx + 1)) || 'Invalid'}`;
|
67
|
+
default:
|
68
|
+
return `Invalid`;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
function obfuscateBasic(token) {
|
72
|
+
if (!token)
|
73
|
+
return null;
|
74
|
+
const buffer = Buffer.from(token, 'base64');
|
75
|
+
if (!buffer.length)
|
76
|
+
return null; // Buffer.from will silently ignore invalid base64 chars
|
77
|
+
const authHeader = buffer.toString('utf8');
|
78
|
+
const colIdx = authHeader.indexOf(':');
|
79
|
+
if (colIdx === -1)
|
80
|
+
return null;
|
81
|
+
const username = authHeader.slice(0, colIdx);
|
82
|
+
return `${username}:***`;
|
83
|
+
}
|
84
|
+
function obfuscateBearer(token) {
|
85
|
+
return obfuscateJws(token) || obfuscateToken(token);
|
86
|
+
}
|
87
|
+
function obfuscateToken(token) {
|
88
|
+
return token ? '***' : '';
|
89
|
+
}
|
90
|
+
function obfuscateJws(token) {
|
91
|
+
const firstDot = token.indexOf('.');
|
92
|
+
if (firstDot === -1)
|
93
|
+
return null;
|
94
|
+
const secondDot = token.indexOf('.', firstDot + 1);
|
95
|
+
if (secondDot === -1)
|
96
|
+
return null;
|
97
|
+
if (token.indexOf('.', secondDot + 1) !== -1)
|
98
|
+
return null;
|
99
|
+
// Strip the signature
|
100
|
+
return token.slice(0, secondDot) + '.obfuscated';
|
101
|
+
}
|
86
102
|
//# sourceMappingURL=logger.js.map
|
package/dist/logger.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAqC;AACrC,0DAAgC;AAChC,4CAAiD;AAEpC,QAAA,QAAQ,GAAG,IAAA,wBAAe,EAAC,QAAQ,CAAC,CAAA;AACpC,QAAA,cAAc,GAAG,IAAA,wBAAe,EAAC,eAAe,CAAC,CAAA;AACjD,QAAA,gBAAgB,GAAG,IAAA,wBAAe,EAAC,iBAAiB,CAAC,CAAA;AACrD,QAAA,WAAW,GAAG,IAAA,wBAAe,EAAC,WAAW,CAAC,CAAA;AAC1C,QAAA,SAAS,GAAG,IAAA,wBAAe,EAAC,eAAe,CAAC,CAAA;AAC5C,QAAA,YAAY,GAAG,IAAA,wBAAe,EAAC,YAAY,CAAC,CAAA;AAC5C,QAAA,aAAa,GAAG,IAAA,wBAAe,EAAC,aAAa,CAAC,CAAA;AAC9C,QAAA,aAAa,GAAG,IAAA,wBAAe,EAAC,aAAa,CAAC,CAAA;AAC9C,QAAA,UAAU,GAAG,IAAA,wBAAe,EAAC,KAAK,CAAC,CAAA;AACnC,QAAA,WAAW,GAAG,IAAA,wBAAe,EAAC,WAAW,CAAC,CAAA;AAC1C,QAAA,WAAW,GAAG,IAAA,wBAAe,EAAC,WAAW,CAAC,CAAA;AAE1C,QAAA,gBAAgB,GAAG,IAAA,mBAAQ,EAAC;IACvC,MAAM,EAAE,kBAAU;IAClB,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,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,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;AAC3B,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACnC,IAAI,QAAQ,KAAK,CAAC,CAAC;QAAE,OAAO,IAAI,CAAA;IAEhC,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAA;IAClD,IAAI,SAAS,KAAK,CAAC,CAAC;QAAE,OAAO,IAAI,CAAA;IAEjC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;QAAE,OAAO,IAAI,CAAA;IAEzD,sBAAsB;IACtB,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,aAAa,CAAA;AAClD,CAAC"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { AccountInfo, AccountStore, DeviceId, LoginCredentials } from '@atproto/oauth-provider';
|
2
|
+
import { AccountManager } from '../account-manager/index';
|
3
|
+
import { ActorStore } from '../actor-store/index';
|
4
|
+
import { LocalViewerCreator } from '../read-after-write/index';
|
5
|
+
/**
|
6
|
+
* Although the {@link AccountManager} class implements the {@link AccountStore}
|
7
|
+
* interface, the accounts it returns do not contain any profile information
|
8
|
+
* (display name, avatar, etc). This is due to the fact that the account manager
|
9
|
+
* does not have access to the account's repos. The {@link DetailedAccountStore}
|
10
|
+
* is a wrapper around the {@link AccountManager} that enriches the accounts
|
11
|
+
* with profile information using the account's repos through the
|
12
|
+
* {@link ActorStore}.
|
13
|
+
*/
|
14
|
+
export declare class DetailedAccountStore implements AccountStore {
|
15
|
+
private accountManager;
|
16
|
+
private actorStore;
|
17
|
+
private localViewer;
|
18
|
+
constructor(accountManager: AccountManager, actorStore: ActorStore, localViewer: LocalViewerCreator);
|
19
|
+
private getProfile;
|
20
|
+
private enrichAccountInfo;
|
21
|
+
authenticateAccount(credentials: LoginCredentials, deviceId: DeviceId): Promise<AccountInfo | null>;
|
22
|
+
addAuthorizedClient(deviceId: DeviceId, sub: string, clientId: string): Promise<void>;
|
23
|
+
getDeviceAccount(deviceId: DeviceId, sub: string): Promise<AccountInfo | null>;
|
24
|
+
listDeviceAccounts(deviceId: DeviceId): Promise<AccountInfo[]>;
|
25
|
+
removeDeviceAccount(deviceId: DeviceId, sub: string): Promise<void>;
|
26
|
+
}
|
27
|
+
//# sourceMappingURL=detailed-account-store.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"detailed-account-store.d.ts","sourceRoot":"","sources":["../../src/oauth/detailed-account-store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,gBAAgB,EACjB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,YAAW,YAAY;IAErD,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,WAAW;gBAFX,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,kBAAkB;YAG3B,UAAU;YAQV,iBAAiB;IAezB,mBAAmB,CACvB,WAAW,EAAE,gBAAgB,EAC7B,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IASxB,mBAAmB,CACvB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;IAIV,gBAAgB,CACpB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IASxB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAS9D,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG1E"}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DetailedAccountStore = void 0;
|
4
|
+
/**
|
5
|
+
* Although the {@link AccountManager} class implements the {@link AccountStore}
|
6
|
+
* interface, the accounts it returns do not contain any profile information
|
7
|
+
* (display name, avatar, etc). This is due to the fact that the account manager
|
8
|
+
* does not have access to the account's repos. The {@link DetailedAccountStore}
|
9
|
+
* is a wrapper around the {@link AccountManager} that enriches the accounts
|
10
|
+
* with profile information using the account's repos through the
|
11
|
+
* {@link ActorStore}.
|
12
|
+
*/
|
13
|
+
class DetailedAccountStore {
|
14
|
+
constructor(accountManager, actorStore, localViewer) {
|
15
|
+
Object.defineProperty(this, "accountManager", {
|
16
|
+
enumerable: true,
|
17
|
+
configurable: true,
|
18
|
+
writable: true,
|
19
|
+
value: accountManager
|
20
|
+
});
|
21
|
+
Object.defineProperty(this, "actorStore", {
|
22
|
+
enumerable: true,
|
23
|
+
configurable: true,
|
24
|
+
writable: true,
|
25
|
+
value: actorStore
|
26
|
+
});
|
27
|
+
Object.defineProperty(this, "localViewer", {
|
28
|
+
enumerable: true,
|
29
|
+
configurable: true,
|
30
|
+
writable: true,
|
31
|
+
value: localViewer
|
32
|
+
});
|
33
|
+
}
|
34
|
+
async getProfile(did) {
|
35
|
+
// TODO: Should we cache this?
|
36
|
+
return this.actorStore.read(did, async (actorStoreReader) => {
|
37
|
+
const localViewer = this.localViewer(actorStoreReader);
|
38
|
+
return localViewer.getProfileBasic();
|
39
|
+
});
|
40
|
+
}
|
41
|
+
async enrichAccountInfo(accountInfo) {
|
42
|
+
const { account } = accountInfo;
|
43
|
+
if (!account.picture || !account.name) {
|
44
|
+
const profile = await this.getProfile(account.sub);
|
45
|
+
if (profile) {
|
46
|
+
account.picture || (account.picture = profile.avatar);
|
47
|
+
account.name || (account.name = profile.displayName);
|
48
|
+
}
|
49
|
+
}
|
50
|
+
return accountInfo;
|
51
|
+
}
|
52
|
+
async authenticateAccount(credentials, deviceId) {
|
53
|
+
const accountInfo = await this.accountManager.authenticateAccount(credentials, deviceId);
|
54
|
+
if (!accountInfo)
|
55
|
+
return null;
|
56
|
+
return this.enrichAccountInfo(accountInfo);
|
57
|
+
}
|
58
|
+
async addAuthorizedClient(deviceId, sub, clientId) {
|
59
|
+
return this.accountManager.addAuthorizedClient(deviceId, sub, clientId);
|
60
|
+
}
|
61
|
+
async getDeviceAccount(deviceId, sub) {
|
62
|
+
const accountInfo = await this.accountManager.getDeviceAccount(deviceId, sub);
|
63
|
+
if (!accountInfo)
|
64
|
+
return null;
|
65
|
+
return this.enrichAccountInfo(accountInfo);
|
66
|
+
}
|
67
|
+
async listDeviceAccounts(deviceId) {
|
68
|
+
const accountInfos = await this.accountManager.listDeviceAccounts(deviceId);
|
69
|
+
return Promise.all(accountInfos.map(async (accountInfo) => this.enrichAccountInfo(accountInfo)));
|
70
|
+
}
|
71
|
+
async removeDeviceAccount(deviceId, sub) {
|
72
|
+
return this.accountManager.removeDeviceAccount(deviceId, sub);
|
73
|
+
}
|
74
|
+
}
|
75
|
+
exports.DetailedAccountStore = DetailedAccountStore;
|
76
|
+
//# sourceMappingURL=detailed-account-store.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"detailed-account-store.js","sourceRoot":"","sources":["../../src/oauth/detailed-account-store.ts"],"names":[],"mappings":";;;AAYA;;;;;;;;GAQG;AACH,MAAa,oBAAoB;IAC/B,YACU,cAA8B,EAC9B,UAAsB,EACtB,WAA+B;QAFvC;;;;mBAAQ,cAAc;WAAg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,CAAC,mBAAmB,CAAC,QAAQ,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAA;IACzE,CAAC;IAED,KAAK,CAAC,gBAAgB,CACpB,QAAkB,EAClB,GAAW;QAEX,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAC5D,QAAQ,EACR,GAAG,CACJ,CAAA;QACD,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,CAAA;QAC7B,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAC5C,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,QAAkB;QACzC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAA;QAC3E,OAAO,OAAO,CAAC,GAAG,CAChB,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,CACrC,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CACpC,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,QAAkB,EAAE,GAAW;QACvD,OAAO,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;IAC/D,CAAC;CACF;AA1ED,oDA0EC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/// <reference types="node/http" />
|
2
|
+
/// <reference types="pino-http" />
|
3
|
+
import { OAuthProvider, OAuthProviderOptions } from '@atproto/oauth-provider';
|
4
|
+
import { AccountManager } from '../account-manager/index';
|
5
|
+
import { ActorStore } from '../actor-store/index';
|
6
|
+
import { LocalViewerCreator } from '../read-after-write/index';
|
7
|
+
export type AuthProviderOptions = {
|
8
|
+
accountManager: AccountManager;
|
9
|
+
actorStore: ActorStore;
|
10
|
+
localViewer: LocalViewerCreator;
|
11
|
+
} & Pick<OAuthProviderOptions, 'issuer' | 'redis' | 'keyset' | 'dpopSecret' | 'customization'> & Required<Pick<OAuthProviderOptions, 'safeFetch'>>;
|
12
|
+
export declare class PdsOAuthProvider extends OAuthProvider {
|
13
|
+
constructor({ accountManager, actorStore, localViewer, keyset, redis, dpopSecret, issuer, customization, safeFetch, }: AuthProviderOptions);
|
14
|
+
createRouter(): import("@atproto/oauth-provider").Handler<void, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>>;
|
15
|
+
}
|
16
|
+
//# sourceMappingURL=provider.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/oauth/provider.ts"],"names":[],"mappings":";;AAAA,OAAO,EAEL,aAAa,EACb,oBAAoB,EACrB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAG9D,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,EAAE,cAAc,CAAA;IAC9B,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,kBAAkB,CAAA;CAChC,GAAG,IAAI,CACN,oBAAoB,EACpB,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,GAAG,eAAe,CAC/D,GACC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC,CAAA;AAEnD,qBAAa,gBAAiB,SAAQ,aAAa;gBACrC,EACV,cAAc,EACd,UAAU,EACV,WAAW,EACX,MAAM,EACN,KAAK,EACL,UAAU,EACV,MAAM,EACN,aAAa,EACb,SAAS,GACV,EAAE,mBAAmB;IAsCtB,YAAY;CAKb"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.PdsOAuthProvider = void 0;
|
4
|
+
const oauth_provider_1 = require("@atproto/oauth-provider");
|
5
|
+
const logger_1 = require("../logger");
|
6
|
+
const detailed_account_store_1 = require("./detailed-account-store");
|
7
|
+
class PdsOAuthProvider extends oauth_provider_1.OAuthProvider {
|
8
|
+
constructor({ accountManager, actorStore, localViewer, keyset, redis, dpopSecret, issuer, customization, safeFetch, }) {
|
9
|
+
super({
|
10
|
+
issuer,
|
11
|
+
keyset,
|
12
|
+
dpopSecret,
|
13
|
+
redis,
|
14
|
+
safeFetch,
|
15
|
+
customization,
|
16
|
+
metadata: {
|
17
|
+
// PdsOAuthProvider is used when the PDS is both an authorization server
|
18
|
+
// & resource server, in which case the issuer origin is also the
|
19
|
+
// resource server uri.
|
20
|
+
protected_resources: [new URL(issuer).origin],
|
21
|
+
},
|
22
|
+
accountStore: new detailed_account_store_1.DetailedAccountStore(accountManager, actorStore, localViewer),
|
23
|
+
requestStore: accountManager,
|
24
|
+
deviceStore: accountManager,
|
25
|
+
tokenStore: accountManager,
|
26
|
+
// If the PDS is both an authorization server & resource server (no
|
27
|
+
// entryway), there is no need to use JWTs as access tokens. Instead,
|
28
|
+
// the PDS can use tokenId as access tokens. This allows the PDS to
|
29
|
+
// always use up-to-date token data from the token store.
|
30
|
+
accessTokenType: oauth_provider_1.AccessTokenType.id,
|
31
|
+
onClientInfo: (clientId) => ({
|
32
|
+
isFirstParty: clientId === 'https://bsky.app/',
|
33
|
+
// @TODO make client client list configurable:
|
34
|
+
isTrusted: undefined,
|
35
|
+
}),
|
36
|
+
});
|
37
|
+
}
|
38
|
+
createRouter() {
|
39
|
+
return this.httpHandler({
|
40
|
+
onError: (req, res, err, message) => logger_1.oauthLogger.error({ err }, message),
|
41
|
+
});
|
42
|
+
}
|
43
|
+
}
|
44
|
+
exports.PdsOAuthProvider = PdsOAuthProvider;
|
45
|
+
//# sourceMappingURL=provider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/oauth/provider.ts"],"names":[],"mappings":";;;AAAA,4DAIgC;AAIhC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ACC,WAAW,KACnB,QAAQ,QAAQ,CAoBlB,CAAA;AAYD,eAAO,MAAM,YAAY,gBACV,QAAQ,UACb,gBAAgB,kBAwBzB,CAAA;AAED,eAAO,MAAM,aAAa,QAAe,QAAQ;;;;EAWhD,CAAA;AA8BD,eAAO,MAAM,QAAQ,YAAa,MAAM,OAAO,kBAAkB,KAAG,CAKnE,CAAA"}
|
package/dist/pipethrough.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipethrough.js","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAAkC;AAClC,wDAA0B;AAC1B,8DAAgC;AAEhC,8CAAoE;AACpE,sDAI6B;AAC7B,wCAAuD;AACvD,iDAAkD;AAClD,qCAAqC;AACrC,4CAAqE;AAG9D,MAAM,YAAY,GAAG,CAAC,GAAe,EAAmB,EAAE;IAC/D,MAAM,cAAc,GAAG,GAAG,CAAC,YAAY,CAAC,cAAc,EAAE,CAAA;IACxD,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC9B,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,MAAM,IAAA,uBAAe,EAAC,GAAG,EAAE,GAAG,CAAC,CAAA;YACpD,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;YAC1C,MAAM,OAAO,GAAG,MAAM,IAAA,qBAAa,EAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;YACxE,MAAM,IAAI,
|
1
|
+
{"version":3,"file":"pipethrough.js","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAAkC;AAClC,wDAA0B;AAC1B,8DAAgC;AAEhC,8CAAoE;AACpE,sDAI6B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EAAE,EAAE;IAC7B,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC3C,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,KAAK,WAAW;QAAE,OAAO,KAAK,CAAA;IAC/D,IAAI,kBAAG,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IAC9C,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAW,EAAsB,EAAE;IACrD,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAA;AAClD,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CAAC,IAAY,EAAW,EAAE;IAC9C,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CAAC,OAAgB,EAA0B,EAAE;IACjE,MAAM,MAAM,GAAG,EAAE,CAAA;IACjB,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC;QACjC,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAA;IACnB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
@@ -47,9 +47,9 @@ export declare const commitEvt: z.ZodObject<{
|
|
47
47
|
}>, "many">;
|
48
48
|
blobs: z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodAny, any, any>, CID, any>, "many">;
|
49
49
|
}, "strip", z.ZodTypeAny, {
|
50
|
-
rev: string;
|
51
50
|
repo: string;
|
52
51
|
blobs: CID[];
|
52
|
+
rev: string;
|
53
53
|
rebase: boolean;
|
54
54
|
tooBig: boolean;
|
55
55
|
commit: CID;
|
@@ -62,9 +62,9 @@ export declare const commitEvt: z.ZodObject<{
|
|
62
62
|
}[];
|
63
63
|
prev: CID | null;
|
64
64
|
}, {
|
65
|
-
rev: string;
|
66
65
|
repo: string;
|
67
66
|
blobs: any[];
|
67
|
+
rev: string;
|
68
68
|
rebase: boolean;
|
69
69
|
tooBig: boolean;
|
70
70
|
since: string | null;
|
package/example.env
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# See more env options in src/config/env.ts
|
2
2
|
# Hostname - the public domain that you intend to deploy your service at
|
3
3
|
PDS_HOSTNAME="example.com"
|
4
|
+
PDS_PORT="2583"
|
4
5
|
|
5
6
|
# Database config - use one or the other
|
6
|
-
|
7
|
-
# PDS_DB_POSTGRES_URL="postgresql://pg:password@localhost:5433/postgres"
|
7
|
+
PDS_DATA_DIRECTORY="data"
|
8
8
|
|
9
9
|
# Blobstore - filesystem location to store uploaded blobs
|
10
10
|
PDS_BLOBSTORE_DISK_LOCATION="blobs"
|
@@ -14,6 +14,7 @@ PDS_REPO_SIGNING_KEY_K256_PRIVATE_KEY_HEX="3ee68..."
|
|
14
14
|
PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX="e049f..."
|
15
15
|
|
16
16
|
# Secrets - update to secure high-entropy strings
|
17
|
+
PDS_DPOP_SECRET="32-random-bytes-hex-encoded"
|
17
18
|
PDS_JWT_SECRET="jwt-secret"
|
18
19
|
PDS_ADMIN_PASSWORD="admin-pass"
|
19
20
|
|
@@ -21,4 +22,21 @@ PDS_ADMIN_PASSWORD="admin-pass"
|
|
21
22
|
PDS_DID_PLC_URL="https://plc.bsky-sandbox.dev"
|
22
23
|
PDS_BSKY_APP_VIEW_ENDPOINT="https://api.bsky-sandbox.dev"
|
23
24
|
PDS_BSKY_APP_VIEW_DID="did:web:api.bsky-sandbox.dev"
|
24
|
-
PDS_CRAWLERS="https://bgs.bsky-sandbox.dev"
|
25
|
+
PDS_CRAWLERS="https://bgs.bsky-sandbox.dev"
|
26
|
+
|
27
|
+
# OAuth Provider
|
28
|
+
PDS_OAUTH_PROVIDER_NAME="John's self hosted PDS"
|
29
|
+
PDS_OAUTH_PROVIDER_LOGO=
|
30
|
+
PDS_OAUTH_PROVIDER_PRIMARY_COLOR="#7507e3"
|
31
|
+
PDS_OAUTH_PROVIDER_ERROR_COLOR=
|
32
|
+
PDS_OAUTH_PROVIDER_HOME_LINK=
|
33
|
+
PDS_OAUTH_PROVIDER_TOS_LINK=
|
34
|
+
PDS_OAUTH_PROVIDER_POLICY_LINK=
|
35
|
+
PDS_OAUTH_PROVIDER_SUPPORT_LINK=
|
36
|
+
|
37
|
+
# Debugging
|
38
|
+
NODE_TLS_REJECT_UNAUTHORIZED=1
|
39
|
+
LOG_ENABLED=0
|
40
|
+
LOG_LEVEL=info
|
41
|
+
PDS_INVITE_REQUIRED=1
|
42
|
+
PDS_DISABLE_SSRF_PROTECTION=0
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/pds",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.36",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Reference implementation of atproto Personal Data Server (PDS)",
|
6
6
|
"keywords": [
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"bin": "dist/bin.js",
|
19
19
|
"dependencies": {
|
20
20
|
"@did-plc/lib": "^0.0.4",
|
21
|
-
"better-sqlite3": "^
|
21
|
+
"better-sqlite3": "^10.0.0",
|
22
22
|
"bytes": "^3.1.2",
|
23
23
|
"compression": "^1.7.4",
|
24
24
|
"cors": "^2.8.5",
|
@@ -37,18 +37,20 @@
|
|
37
37
|
"nodemailer": "^6.8.0",
|
38
38
|
"nodemailer-html-to-text": "^3.2.0",
|
39
39
|
"p-queue": "^6.6.2",
|
40
|
-
"pino": "^8.
|
40
|
+
"pino": "^8.21.0",
|
41
41
|
"pino-http": "^8.2.1",
|
42
42
|
"sharp": "^0.32.6",
|
43
43
|
"typed-emitter": "^2.1.0",
|
44
44
|
"uint8arrays": "3.0.0",
|
45
|
-
"zod": "^3.
|
46
|
-
"@atproto/
|
45
|
+
"zod": "^3.23.8",
|
46
|
+
"@atproto-labs/fetch-node": "0.1.0",
|
47
|
+
"@atproto/api": "^0.12.20",
|
47
48
|
"@atproto/aws": "^0.2.0",
|
48
49
|
"@atproto/common": "^0.4.0",
|
49
50
|
"@atproto/crypto": "^0.4.0",
|
50
51
|
"@atproto/identity": "^0.4.0",
|
51
52
|
"@atproto/lexicon": "^0.4.0",
|
53
|
+
"@atproto/oauth-provider": "^0.1.0",
|
52
54
|
"@atproto/repo": "^0.4.0",
|
53
55
|
"@atproto/syntax": "^0.3.0",
|
54
56
|
"@atproto/xrpc": "^0.5.0",
|
@@ -70,8 +72,8 @@
|
|
70
72
|
"jest": "^28.1.2",
|
71
73
|
"ts-node": "^10.8.2",
|
72
74
|
"ws": "^8.12.0",
|
73
|
-
"@atproto/api": "^0.12.
|
74
|
-
"@atproto/bsky": "^0.0.
|
75
|
+
"@atproto/api": "^0.12.20",
|
76
|
+
"@atproto/bsky": "^0.0.63",
|
75
77
|
"@atproto/lex-cli": "^0.4.0"
|
76
78
|
},
|
77
79
|
"scripts": {
|