@stigmer/protos 0.0.86 → 0.0.88

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.
@@ -1,4 +1,5 @@
1
1
  import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
2
+ import type { IamRole } from "../../v1/enum_pb";
2
3
  import type { Message } from "@bufbuild/protobuf";
3
4
  /**
4
5
  * Describes the file ai/stigmer/iam/identityprovider/v1/spec.proto.
@@ -13,9 +14,21 @@ export declare const file_ai_stigmer_iam_identityprovider_v1_spec: GenFile;
13
14
  * Stigmer validates the token signature against the configured JWKS and resolves the
14
15
  * user's federated identity account by the JWT's sub claim and this provider's reference.
15
16
  *
16
- * For platform-managed IdPs, the platform is responsible for explicitly creating
17
- * federated identity accounts before users can authenticate. For SSO providers
18
- * (is_sso_provider = true), Stigmer auto-provisions accounts on first login.
17
+ * Three provisioning modes control how federated accounts are created:
18
+ *
19
+ * 1. Manual (default): The platform explicitly creates federated accounts
20
+ * via CreateFederatedAccount and manages IAM policies. No accounts are
21
+ * created automatically.
22
+ *
23
+ * 2. JIT (Just-In-Time): When auto_provision_accounts is true, Stigmer
24
+ * creates an IdentityAccount from JWT claims on first authentication.
25
+ * Authorization is controlled independently via auto_grant_on_org and
26
+ * auto_grant_role. For multi-tenant platforms, tenant_org_claim maps
27
+ * a JWT claim to a platform-managed organization for automatic role grants.
28
+ *
29
+ * 3. SSO: When is_sso_provider is true, Stigmer auto-provisions accounts
30
+ * and grants viewer on the organization. This mode also enables the OIDC
31
+ * browser login flow via oidc_client_id.
19
32
  *
20
33
  * The spec contains only public validation configuration — no secrets are stored.
21
34
  * For OIDC-based integrators (e.g., Auth0), the jwks_uri and userinfo_endpoint
@@ -35,6 +48,40 @@ export declare const file_ai_stigmer_iam_identityprovider_v1_spec: GenFile;
35
48
  * expected_audience: "https://api.planton.ai/"
36
49
  * userinfo_endpoint: "https://planton-prod.us.auth0.com/userinfo"
37
50
  *
51
+ * Example YAML (JIT provisioning, single-org):
52
+ * apiVersion: iam.stigmer.ai/v1
53
+ * kind: IdentityProvider
54
+ * metadata:
55
+ * name: Acme Platform
56
+ * slug: acme-platform
57
+ * org: acme
58
+ * spec:
59
+ * display_name: "Acme Platform"
60
+ * jwks_uri: "https://auth.acme.com/.well-known/jwks.json"
61
+ * allowed_issuers: ["https://auth.acme.com/"]
62
+ * expected_audience: "stigmer-api"
63
+ * userinfo_endpoint: "https://auth.acme.com/userinfo"
64
+ * auto_provision_accounts: true
65
+ * auto_grant_on_org: true
66
+ *
67
+ * Example YAML (JIT provisioning, multi-tenant):
68
+ * apiVersion: iam.stigmer.ai/v1
69
+ * kind: IdentityProvider
70
+ * metadata:
71
+ * name: SaaS Platform
72
+ * slug: saas-platform
73
+ * org: saas-co
74
+ * spec:
75
+ * display_name: "SaaS Platform"
76
+ * jwks_uri: "https://auth.saas.co/.well-known/jwks.json"
77
+ * allowed_issuers: ["https://auth.saas.co/"]
78
+ * expected_audience: "stigmer-api"
79
+ * userinfo_endpoint: "https://auth.saas.co/userinfo"
80
+ * auto_provision_accounts: true
81
+ * auto_grant_on_org: true
82
+ * auto_grant_role: member
83
+ * tenant_org_claim: "org_id"
84
+ *
38
85
  * Example YAML (self-managed SSO):
39
86
  * apiVersion: iam.stigmer.ai/v1
40
87
  * kind: IdentityProvider
@@ -151,6 +198,107 @@ export type IdentityProviderSpec = Message<"ai.stigmer.iam.identityprovider.v1.I
151
198
  * @generated from field: string oidc_client_id = 8;
152
199
  */
153
200
  oidcClientId: string;
201
+ /**
202
+ * Whether to automatically create a federated identity account when a valid
203
+ * JWT arrives but no account exists for the token's sub claim.
204
+ *
205
+ * This controls identity provisioning — establishing that Stigmer recognizes
206
+ * this user — and is independent of what access the user receives. An
207
+ * auto-provisioned account has no organization access by default; authorization
208
+ * is controlled separately by auto_grant_on_org.
209
+ *
210
+ * When false (default), the platform must explicitly create federated accounts
211
+ * via the CreateFederatedAccount API before users can authenticate. This gives
212
+ * platforms full control over which of their users can access Stigmer resources.
213
+ *
214
+ * When true, Stigmer creates the IdentityAccount automatically on first
215
+ * authentication, using profile data from the JWT claims and the
216
+ * userinfo_endpoint (if configured). Subsequent authentications refresh
217
+ * the profile data.
218
+ *
219
+ * This field is independent of is_sso_provider. SSO providers always
220
+ * auto-provision accounts regardless of this setting. For non-SSO identity
221
+ * providers (platform delegation), this field enables JIT provisioning
222
+ * without requiring the OIDC browser flow.
223
+ *
224
+ * @generated from field: bool auto_provision_accounts = 9;
225
+ */
226
+ autoProvisionAccounts: boolean;
227
+ /**
228
+ * Whether to automatically grant a role on an organization when an account
229
+ * is auto-provisioned.
230
+ *
231
+ * This controls authorization — determining what access an auto-provisioned
232
+ * user receives — and is separate from the identity provisioning decision
233
+ * controlled by auto_provision_accounts.
234
+ *
235
+ * When false (default), auto-provisioned accounts receive no organization
236
+ * access. The platform must create IAM policies to grant access to specific
237
+ * organizations. This is the appropriate setting for multi-tenant platforms
238
+ * where users should only access their tenant organization, not the
239
+ * platform's root organization.
240
+ *
241
+ * When true, Stigmer grants auto_grant_role (default: viewer) on the IdP's
242
+ * owning organization immediately after account creation. This is the
243
+ * appropriate setting for single-organization platforms where all
244
+ * authenticated users should have access to the same organization.
245
+ *
246
+ * When tenant_org_claim is also set, the role grant targets the resolved
247
+ * tenant organization instead of the IdP's owning organization.
248
+ *
249
+ * Requires auto_provision_accounts to be true.
250
+ *
251
+ * @generated from field: bool auto_grant_on_org = 10;
252
+ */
253
+ autoGrantOnOrg: boolean;
254
+ /**
255
+ * The role to grant when auto_grant_on_org is true.
256
+ *
257
+ * Defaults to viewer when unspecified (iam_role_unspecified). The owner role
258
+ * is not permitted — organization ownership must be assigned explicitly.
259
+ *
260
+ * This field is only meaningful when auto_grant_on_org is true. When
261
+ * auto_grant_on_org is false, this field is ignored regardless of its value.
262
+ *
263
+ * Common configurations:
264
+ * - viewer (default): Users can browse resources but cannot modify them.
265
+ * Org admins upgrade to member or admin when ready.
266
+ * - member: Users can immediately create and modify resources.
267
+ * Appropriate when all authenticated users are trusted collaborators.
268
+ *
269
+ * @generated from field: ai.stigmer.iam.v1.IamRole auto_grant_role = 11;
270
+ */
271
+ autoGrantRole: IamRole;
272
+ /**
273
+ * Name of the JWT claim that identifies the tenant organization for
274
+ * multi-tenant provisioning.
275
+ *
276
+ * When set, Stigmer extracts this claim from the JWT payload and resolves
277
+ * it to a platform-managed organization. The resolution algorithm:
278
+ *
279
+ * 1. Read the claim value from the JWT (e.g., claim "org_id" yields
280
+ * value "tenant-123").
281
+ * 2. Look up the platform-managed organization where
282
+ * identity_provider_ref matches this IdP and external_org_id matches
283
+ * the claim value.
284
+ * 3. If auto_grant_on_org is true, grant auto_grant_role on the resolved
285
+ * organization instead of the IdP's owning organization.
286
+ *
287
+ * This enables fully automated multi-tenant provisioning: a platform JWT
288
+ * with a tenant claim works end-to-end without any backend provisioning
289
+ * steps. The platform only needs to pre-create the tenant organizations
290
+ * with their external_org_id mappings.
291
+ *
292
+ * Requires auto_provision_accounts to be true. The claim name is
293
+ * case-sensitive and must match the JWT payload key exactly.
294
+ *
295
+ * If the JWT does not contain this claim, or the claim value does not
296
+ * resolve to a known platform-managed organization, the authentication
297
+ * request is rejected with a descriptive error.
298
+ *
299
+ * @generated from field: string tenant_org_claim = 12;
300
+ */
301
+ tenantOrgClaim: string;
154
302
  };
155
303
  /**
156
304
  * Describes the message ai.stigmer.iam.identityprovider.v1.IdentityProviderSpec.
@@ -2,11 +2,12 @@
2
2
  // @generated from file ai/stigmer/iam/identityprovider/v1/spec.proto (package ai.stigmer.iam.identityprovider.v1, syntax proto3)
3
3
  /* eslint-disable */
4
4
  import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
5
+ import { file_ai_stigmer_iam_v1_enum } from "../../v1/enum_pb";
5
6
  import { file_buf_validate_validate } from "../../../../../buf/validate/validate_pb";
6
7
  /**
7
8
  * Describes the file ai/stigmer/iam/identityprovider/v1/spec.proto.
8
9
  */
9
- export const file_ai_stigmer_iam_identityprovider_v1_spec = /*@__PURE__*/ fileDesc("Ci1haS9zdGlnbWVyL2lhbS9pZGVudGl0eXByb3ZpZGVyL3YxL3NwZWMucHJvdG8SImFpLnN0aWdtZXIuaWFtLmlkZW50aXR5cHJvdmlkZXIudjEiiwIKFElkZW50aXR5UHJvdmlkZXJTcGVjEh4KDGRpc3BsYXlfbmFtZRgBIAEoCUIIukgFcgMYyAESGgoIandrc191cmkYAiABKAlCCLpIBXIDGIAQEhcKD2FsbG93ZWRfaXNzdWVycxgDIAMoCRIjChFleHBlY3RlZF9hdWRpZW5jZRgEIAEoCUIIukgFcgMYyAESGQoRcmF0ZV9saW1pdF9idWRnZXQYBSABKAUSIwoRdXNlcmluZm9fZW5kcG9pbnQYBiABKAlCCLpIBXIDGIAQEhcKD2lzX3Nzb19wcm92aWRlchgHIAEoCBIgCg5vaWRjX2NsaWVudF9pZBgIIAEoCUIIukgFcgMYgAJiBnByb3RvMw", [file_buf_validate_validate]);
10
+ export const file_ai_stigmer_iam_identityprovider_v1_spec = /*@__PURE__*/ fileDesc("Ci1haS9zdGlnbWVyL2lhbS9pZGVudGl0eXByb3ZpZGVyL3YxL3NwZWMucHJvdG8SImFpLnN0aWdtZXIuaWFtLmlkZW50aXR5cHJvdmlkZXIudjEioAMKFElkZW50aXR5UHJvdmlkZXJTcGVjEh4KDGRpc3BsYXlfbmFtZRgBIAEoCUIIukgFcgMYyAESGgoIandrc191cmkYAiABKAlCCLpIBXIDGIAQEhcKD2FsbG93ZWRfaXNzdWVycxgDIAMoCRIjChFleHBlY3RlZF9hdWRpZW5jZRgEIAEoCUIIukgFcgMYyAESGQoRcmF0ZV9saW1pdF9idWRnZXQYBSABKAUSIwoRdXNlcmluZm9fZW5kcG9pbnQYBiABKAlCCLpIBXIDGIAQEhcKD2lzX3Nzb19wcm92aWRlchgHIAEoCBIgCg5vaWRjX2NsaWVudF9pZBgIIAEoCUIIukgFcgMYgAISHwoXYXV0b19wcm92aXNpb25fYWNjb3VudHMYCSABKAgSGQoRYXV0b19ncmFudF9vbl9vcmcYCiABKAgSMwoPYXV0b19ncmFudF9yb2xlGAsgASgOMhouYWkuc3RpZ21lci5pYW0udjEuSWFtUm9sZRIiChB0ZW5hbnRfb3JnX2NsYWltGAwgASgJQgi6SAVyAxiAAmIGcHJvdG8z", [file_ai_stigmer_iam_v1_enum, file_buf_validate_validate]);
10
11
  /**
11
12
  * Describes the message ai.stigmer.iam.identityprovider.v1.IdentityProviderSpec.
12
13
  * Use `create(IdentityProviderSpecSchema)` to create a new message.
@@ -1 +1 @@
1
- {"version":3,"file":"spec_pb.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/iam/identityprovider/v1/spec_pb.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,iIAAiI;AACjI,oBAAoB;AAGpB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAGrF;;GAEG;AACH,MAAM,CAAC,MAAM,4CAA4C,GAAY,aAAa,CAChF,QAAQ,CAAC,oeAAoe,EAAE,CAAC,0BAA0B,CAAC,CAAC,CAAC;AA8J/gB;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAqC,aAAa,CACvF,WAAW,CAAC,4CAA4C,EAAE,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"spec_pb.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/iam/identityprovider/v1/spec_pb.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,iIAAiI;AACjI,oBAAoB;AAGpB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAGrF;;GAEG;AACH,MAAM,CAAC,MAAM,4CAA4C,GAAY,aAAa,CAChF,QAAQ,CAAC,0qBAA0qB,EAAE,CAAC,2BAA2B,EAAE,0BAA0B,CAAC,CAAC,CAAC;AAqTlvB;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAqC,aAAa,CACvF,WAAW,CAAC,4CAA4C,EAAE,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigmer/protos",
3
- "version": "0.0.86",
3
+ "version": "0.0.88",
4
4
  "description": "Generated TypeScript protobuf stubs for Stigmer APIs",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",