@samebase/identity-broker 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +4 -0
- package/README.md +104 -2
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +39 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/client/connectors/email.d.ts +6 -0
- package/dist/client/connectors/email.js +5 -0
- package/dist/client/connectors/email.js.map +1 -0
- package/dist/client/connectors/github.d.ts +7 -0
- package/dist/client/connectors/github.js +57 -0
- package/dist/client/connectors/github.js.map +1 -0
- package/dist/client/connectors/google.d.ts +7 -0
- package/dist/client/connectors/google.js +13 -0
- package/dist/client/connectors/google.js.map +1 -0
- package/dist/client/connectors/types.d.ts +47 -0
- package/dist/client/connectors/types.js +2 -0
- package/dist/client/connectors/types.js.map +1 -0
- package/dist/client/connectors/upstream.d.ts +25 -0
- package/dist/client/connectors/upstream.js +86 -0
- package/dist/client/connectors/upstream.js.map +1 -0
- package/dist/client/html.d.ts +34 -0
- package/dist/client/html.js +91 -0
- package/dist/client/html.js.map +1 -0
- package/dist/client/index.d.ts +93 -0
- package/dist/client/index.js +819 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/jwt.d.ts +31 -0
- package/dist/client/jwt.js +55 -0
- package/dist/client/jwt.js.map +1 -0
- package/dist/client/keys.d.ts +49 -0
- package/dist/client/keys.js +138 -0
- package/dist/client/keys.js.map +1 -0
- package/dist/client/protocol.d.ts +79 -0
- package/dist/client/protocol.js +279 -0
- package/dist/client/protocol.js.map +1 -0
- package/dist/client/responses.d.ts +24 -0
- package/dist/client/responses.js +57 -0
- package/dist/client/responses.js.map +1 -0
- package/dist/client/subject.d.ts +15 -0
- package/dist/client/subject.js +32 -0
- package/dist/client/subject.js.map +1 -0
- package/dist/component/_generated/api.d.ts +45 -0
- package/dist/component/_generated/api.js +31 -0
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/component.d.ts +398 -0
- package/dist/component/_generated/component.js +11 -0
- package/dist/component/_generated/component.js.map +1 -0
- package/dist/component/_generated/dataModel.d.ts +45 -0
- package/dist/component/_generated/dataModel.js +11 -0
- package/dist/component/_generated/dataModel.js.map +1 -0
- package/dist/component/_generated/server.d.ts +132 -0
- package/dist/component/_generated/server.js +80 -0
- package/dist/component/_generated/server.js.map +1 -0
- package/dist/component/apps.d.ts +36 -0
- package/dist/component/apps.js +124 -0
- package/dist/component/apps.js.map +1 -0
- package/dist/component/authRequests.d.ts +274 -0
- package/dist/component/authRequests.js +461 -0
- package/dist/component/authRequests.js.map +1 -0
- package/dist/component/clients.d.ts +43 -0
- package/dist/component/clients.js +95 -0
- package/dist/component/clients.js.map +1 -0
- package/dist/component/convex.config.d.ts +2 -0
- package/dist/component/convex.config.js +3 -0
- package/dist/component/convex.config.js.map +1 -0
- package/dist/component/crypto.d.ts +2 -0
- package/dist/component/crypto.js +9 -0
- package/dist/component/crypto.js.map +1 -0
- package/dist/component/lifecycle.d.ts +18 -0
- package/dist/component/lifecycle.js +79 -0
- package/dist/component/lifecycle.js.map +1 -0
- package/dist/component/registration.d.ts +29 -0
- package/dist/component/registration.js +90 -0
- package/dist/component/registration.js.map +1 -0
- package/dist/component/schema.d.ts +749 -0
- package/dist/component/schema.js +140 -0
- package/dist/component/schema.js.map +1 -0
- package/dist/component/signIns.d.ts +8 -0
- package/dist/component/signIns.js +26 -0
- package/dist/component/signIns.js.map +1 -0
- package/package.json +51 -3
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { defineSchema, defineTable } from "convex/server";
|
|
2
|
+
import { v } from "convex/values";
|
|
3
|
+
const { array, boolean, literal, number, object, optional, string, union } = v;
|
|
4
|
+
/** How a client authenticates at the token endpoint. Public clients are not supported yet. */
|
|
5
|
+
export const vTokenEndpointAuthMethod = union(literal("client_secret_post"), literal("client_secret_basic"));
|
|
6
|
+
/** The deployment a client stands for. Preview clients are pruned; the others are deleted by hand. */
|
|
7
|
+
export const vDeploymentType = union(literal("production"), literal("development"), literal("preview"));
|
|
8
|
+
/**
|
|
9
|
+
* What a connector attested about the user. `upstreamId` is the connector's own stable id for the
|
|
10
|
+
* account (the GitHub user id, the OIDC `sub`, the canonical email address). The pairwise subject
|
|
11
|
+
* is derived from it on the host, where the salt lives.
|
|
12
|
+
*/
|
|
13
|
+
export const vUpstreamIdentity = object({
|
|
14
|
+
connector: string(),
|
|
15
|
+
upstreamId: string(),
|
|
16
|
+
email: optional(string()),
|
|
17
|
+
emailVerified: optional(boolean()),
|
|
18
|
+
name: optional(string()),
|
|
19
|
+
picture: optional(string()),
|
|
20
|
+
});
|
|
21
|
+
/** The fields every authorization request carries from `/authorize` until it is deleted. */
|
|
22
|
+
const authRequestFields = {
|
|
23
|
+
requestId: string(),
|
|
24
|
+
appId: string(),
|
|
25
|
+
clientId: string(),
|
|
26
|
+
redirectUri: string(),
|
|
27
|
+
scope: string(),
|
|
28
|
+
state: optional(string()),
|
|
29
|
+
nonce: optional(string()),
|
|
30
|
+
codeChallenge: string(),
|
|
31
|
+
/** `prompt=login` or `max_age` was sent: the connector must reauthenticate or refuse. */
|
|
32
|
+
freshLogin: boolean(),
|
|
33
|
+
/**
|
|
34
|
+
* SHA-256 hex of the `broker_txn` cookie set with the chooser page: `/continue` needs the cookie,
|
|
35
|
+
* so only the browser that saw the chooser can continue. Absent when /authorize skipped the chooser.
|
|
36
|
+
*/
|
|
37
|
+
txnCookieHash: optional(string()),
|
|
38
|
+
createdAt: number(),
|
|
39
|
+
expiresAt: number(),
|
|
40
|
+
};
|
|
41
|
+
export const vAuthRequest = union(
|
|
42
|
+
// Stored by /authorize; the user has not chosen a connector yet.
|
|
43
|
+
object({ status: literal("pending"), ...authRequestFields }),
|
|
44
|
+
// Redirected to an OAuth or OIDC connector; its callback claims the request by the state hash.
|
|
45
|
+
object({
|
|
46
|
+
status: literal("upstream"),
|
|
47
|
+
...authRequestFields,
|
|
48
|
+
connector: string(),
|
|
49
|
+
upstreamStateHash: string(),
|
|
50
|
+
upstreamCodeVerifier: string(),
|
|
51
|
+
upstreamNonce: optional(string()),
|
|
52
|
+
}),
|
|
53
|
+
// The connector callback arrived and the code exchange is running; a replay finds this and stops.
|
|
54
|
+
object({ status: literal("claimed"), ...authRequestFields, connector: string() }),
|
|
55
|
+
// An email code was sent; the user types it. A resend replaces the code and keeps the counts.
|
|
56
|
+
object({
|
|
57
|
+
status: literal("emailSent"),
|
|
58
|
+
...authRequestFields,
|
|
59
|
+
connector: string(),
|
|
60
|
+
email: string(),
|
|
61
|
+
emailCodeHash: string(),
|
|
62
|
+
emailCodeExpiresAt: number(),
|
|
63
|
+
/** Wrong codes typed, across every code sent for this request. */
|
|
64
|
+
emailAttempts: number(),
|
|
65
|
+
/** Codes sent for this request. */
|
|
66
|
+
emailSends: number(),
|
|
67
|
+
emailLastSentAt: number(),
|
|
68
|
+
}),
|
|
69
|
+
// The connector attested the identity; the authorization code points here until it is exchanged.
|
|
70
|
+
object({
|
|
71
|
+
status: literal("completed"),
|
|
72
|
+
...authRequestFields,
|
|
73
|
+
identity: vUpstreamIdentity,
|
|
74
|
+
authTime: number(),
|
|
75
|
+
}));
|
|
76
|
+
export default defineSchema({
|
|
77
|
+
apps: defineTable({
|
|
78
|
+
appId: string(),
|
|
79
|
+
name: string(),
|
|
80
|
+
firstParty: boolean(),
|
|
81
|
+
/** Exact hosts or `*.suffix` patterns a client callback may use, e.g. `*.convex.site`. */
|
|
82
|
+
allowedCallbackHosts: array(string()),
|
|
83
|
+
createdAt: number(),
|
|
84
|
+
}).index("by_app_id", ["appId"]),
|
|
85
|
+
registrationTokens: defineTable({
|
|
86
|
+
tokenHash: string(),
|
|
87
|
+
appId: string(),
|
|
88
|
+
expiresAt: number(),
|
|
89
|
+
createdAt: number(),
|
|
90
|
+
})
|
|
91
|
+
.index("by_token_hash", ["tokenHash"])
|
|
92
|
+
.index("by_app_id", ["appId"])
|
|
93
|
+
.index("by_expires_at", ["expiresAt"]),
|
|
94
|
+
clients: defineTable({
|
|
95
|
+
clientId: string(),
|
|
96
|
+
appId: string(),
|
|
97
|
+
secretHash: string(),
|
|
98
|
+
tokenEndpointAuthMethod: vTokenEndpointAuthMethod,
|
|
99
|
+
redirectUri: string(),
|
|
100
|
+
deploymentType: vDeploymentType,
|
|
101
|
+
clientName: string(),
|
|
102
|
+
softwareVersion: string(),
|
|
103
|
+
createdAt: number(),
|
|
104
|
+
lastSignInAt: optional(number()),
|
|
105
|
+
})
|
|
106
|
+
.index("by_client_id", ["clientId"])
|
|
107
|
+
.index("by_app_id", ["appId"])
|
|
108
|
+
.index("by_deployment_type", ["deploymentType"]),
|
|
109
|
+
authRequests: defineTable(vAuthRequest)
|
|
110
|
+
.index("by_request_id", ["requestId"])
|
|
111
|
+
.index("by_upstream_state_hash", ["upstreamStateHash"])
|
|
112
|
+
.index("by_expires_at", ["expiresAt"]),
|
|
113
|
+
authorizationCodes: defineTable({
|
|
114
|
+
codeHash: string(),
|
|
115
|
+
authRequestId: v.id("authRequests"),
|
|
116
|
+
clientId: string(),
|
|
117
|
+
expiresAt: number(),
|
|
118
|
+
usedAt: optional(number()),
|
|
119
|
+
})
|
|
120
|
+
.index("by_code_hash", ["codeHash"])
|
|
121
|
+
.index("by_expires_at", ["expiresAt"]),
|
|
122
|
+
/** One row per email code sent, kept for the rolling send window; no address, only its hash. */
|
|
123
|
+
emailSends: defineTable({
|
|
124
|
+
/** SHA-256 hex of the canonical address. */
|
|
125
|
+
emailHash: string(),
|
|
126
|
+
at: number(),
|
|
127
|
+
})
|
|
128
|
+
.index("by_email_hash_and_at", ["emailHash", "at"])
|
|
129
|
+
.index("by_at", ["at"]),
|
|
130
|
+
signIns: defineTable({
|
|
131
|
+
appId: string(),
|
|
132
|
+
clientId: string(),
|
|
133
|
+
connector: string(),
|
|
134
|
+
sub: string(),
|
|
135
|
+
at: number(),
|
|
136
|
+
})
|
|
137
|
+
.index("by_app_id_and_at", ["appId", "at"])
|
|
138
|
+
.index("by_at", ["at"]),
|
|
139
|
+
});
|
|
140
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;AAE/E,8FAA8F;AAC9F,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAC3C,OAAO,CAAC,oBAAoB,CAAC,EAC7B,OAAO,CAAC,qBAAqB,CAAC,CAC/B,CAAC;AAEF,sGAAsG;AACtG,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAClC,OAAO,CAAC,YAAY,CAAC,EACrB,OAAO,CAAC,aAAa,CAAC,EACtB,OAAO,CAAC,SAAS,CAAC,CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;IACtC,SAAS,EAAE,MAAM,EAAE;IACnB,UAAU,EAAE,MAAM,EAAE;IACpB,KAAK,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;IAClC,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;CAC5B,CAAC,CAAC;AAEH,4FAA4F;AAC5F,MAAM,iBAAiB,GAAG;IACxB,SAAS,EAAE,MAAM,EAAE;IACnB,KAAK,EAAE,MAAM,EAAE;IACf,QAAQ,EAAE,MAAM,EAAE;IAClB,WAAW,EAAE,MAAM,EAAE;IACrB,KAAK,EAAE,M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|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** One audit row per issued id_token: no email, no name, no token. Also marks the client as used. */
|
|
2
|
+
export declare const record: import("convex/server").RegisteredMutation<"public", {
|
|
3
|
+
appId: string;
|
|
4
|
+
at: number;
|
|
5
|
+
clientId: string;
|
|
6
|
+
connector: string;
|
|
7
|
+
sub: string;
|
|
8
|
+
}, Promise<null>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { v } from "convex/values";
|
|
2
|
+
import { mutation } from "./_generated/server";
|
|
3
|
+
const { number, string } = v;
|
|
4
|
+
/** One audit row per issued id_token: no email, no name, no token. Also marks the client as used. */
|
|
5
|
+
export const record = mutation({
|
|
6
|
+
args: { appId: string(), clientId: string(), connector: string(), sub: string(), at: number() },
|
|
7
|
+
returns: v.null(),
|
|
8
|
+
handler: async (ctx, args) => {
|
|
9
|
+
await ctx.db.insert("signIns", {
|
|
10
|
+
appId: args.appId,
|
|
11
|
+
clientId: args.clientId,
|
|
12
|
+
connector: args.connector,
|
|
13
|
+
sub: args.sub,
|
|
14
|
+
at: args.at,
|
|
15
|
+
});
|
|
16
|
+
const client = await ctx.db
|
|
17
|
+
.query("clients")
|
|
18
|
+
.withIndex("by_client_id", (q) => q.eq("clientId", args.clientId))
|
|
19
|
+
.unique();
|
|
20
|
+
if (client !== null) {
|
|
21
|
+
await ctx.db.patch("clients", client._id, { lastSignInAt: args.at });
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=signIns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signIns.js","sourceRoot":"","sources":["../../src/component/signIns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;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": "0.2.0",
|
|
4
|
+
"description": "An OpenID Provider for Convex that holds a team's upstream sign-in connections once and keeps no user accounts.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/samebase/identity-broker.git",
|
|
9
|
+
"directory": "packages/identity-broker"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"identity-broker": "./dist/cli/index.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"NOTICE",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"type": "module",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/client/index.d.ts",
|
|
24
|
+
"default": "./dist/client/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./convex.config": {
|
|
27
|
+
"types": "./dist/component/convex.config.d.ts",
|
|
28
|
+
"default": "./dist/component/convex.config.js"
|
|
29
|
+
},
|
|
30
|
+
"./_generated/component.js": {
|
|
31
|
+
"types": "./dist/component/_generated/component.d.ts"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"jose": "6.2.13",
|
|
36
|
+
"oauth4webapi": "3.8.8"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "24.19.2",
|
|
40
|
+
"convex": "1.47.0",
|
|
41
|
+
"convex-test": "0.0.61",
|
|
42
|
+
"openid-client": "6.8.8",
|
|
43
|
+
"typescript": "7.0.2",
|
|
44
|
+
"vite-plus": "1.3.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"convex": "^1.47.0"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsc --build ./tsconfig.build.json --force",
|
|
51
|
+
"codegen": "convex codegen --component-dir ./src/component",
|
|
52
|
+
"typecheck": "tsc --noEmit"
|
|
53
|
+
}
|
|
6
54
|
}
|