@authup/server-core 1.0.0-beta.35 → 1.0.0-beta.36
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/dist/adapters/http/controllers/entities/client-role/module.d.ts +1 -5
- package/dist/adapters/http/controllers/entities/client-role/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/entities/identity-provide-role/index.d.ts +0 -1
- package/dist/adapters/http/controllers/entities/identity-provide-role/index.d.ts.map +1 -1
- package/dist/adapters/http/controllers/entities/identity-provide-role/module.d.ts +11 -14
- package/dist/adapters/http/controllers/entities/identity-provide-role/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/entities/robot-role/module.d.ts +1 -5
- package/dist/adapters/http/controllers/entities/robot-role/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/entities/user-role/module.d.ts +1 -5
- package/dist/adapters/http/controllers/entities/user-role/module.d.ts.map +1 -1
- package/dist/app/modules/http/modules/controller.d.ts +2 -2
- package/dist/app/modules/http/modules/controller.d.ts.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/{commands-C1vz08cL.mjs → commands-D5p6u-xJ.mjs} +338 -260
- package/dist/commands-D5p6u-xJ.mjs.map +1 -0
- package/dist/core/entities/client-permission/service.d.ts +2 -0
- package/dist/core/entities/client-permission/service.d.ts.map +1 -1
- package/dist/core/entities/client-role/service.d.ts +5 -0
- package/dist/core/entities/client-role/service.d.ts.map +1 -1
- package/dist/core/entities/client-scope/service.d.ts +2 -0
- package/dist/core/entities/client-scope/service.d.ts.map +1 -1
- package/dist/core/entities/identity-provider-role-mapping/index.d.ts +1 -0
- package/dist/core/entities/identity-provider-role-mapping/index.d.ts.map +1 -1
- package/dist/core/entities/identity-provider-role-mapping/service.d.ts +23 -0
- package/dist/core/entities/identity-provider-role-mapping/service.d.ts.map +1 -0
- package/dist/core/entities/identity-provider-role-mapping/types.d.ts +9 -1
- package/dist/core/entities/identity-provider-role-mapping/types.d.ts.map +1 -1
- package/dist/core/entities/permission/service.d.ts.map +1 -1
- package/dist/core/entities/permission-policy/service.d.ts +2 -0
- package/dist/core/entities/permission-policy/service.d.ts.map +1 -1
- package/dist/core/entities/robot-permission/service.d.ts +2 -0
- package/dist/core/entities/robot-permission/service.d.ts.map +1 -1
- package/dist/core/entities/robot-role/service.d.ts +5 -0
- package/dist/core/entities/robot-role/service.d.ts.map +1 -1
- package/dist/core/entities/role-permission/service.d.ts +2 -0
- package/dist/core/entities/role-permission/service.d.ts.map +1 -1
- package/dist/core/entities/user-permission/service.d.ts +2 -0
- package/dist/core/entities/user-permission/service.d.ts.map +1 -1
- package/dist/core/entities/user-role/service.d.ts +5 -0
- package/dist/core/entities/user-role/service.d.ts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/swagger.json +9 -308
- package/package.json +11 -11
- package/dist/adapters/http/controllers/entities/identity-provide-role/utils/index.d.ts +0 -2
- package/dist/adapters/http/controllers/entities/identity-provide-role/utils/index.d.ts.map +0 -1
- package/dist/adapters/http/controllers/entities/identity-provide-role/utils/validator.d.ts +0 -6
- package/dist/adapters/http/controllers/entities/identity-provide-role/utils/validator.d.ts.map +0 -1
- package/dist/commands-C1vz08cL.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Application, Application as Application$1 } from "orkos";
|
|
2
2
|
import { TypedToken } from "eldin";
|
|
3
3
|
import { BeforeInsert, BeforeUpdate, Column, CreateDateColumn, DataSource, Entity, EntityNotFoundError, EventSubscriber, FindOptionsUtils, In, Index, InstanceChecker, IsNull, JoinColumn, LessThan, ManyToOne, PrimaryGeneratedColumn, Repository, Tree, TreeChildren, TreeParent, TreeRepository, TreeRepositoryUtils, Unique, UpdateDateColumn } from "typeorm";
|
|
4
|
-
import { ClientError, ClientValidator, EntityDefaultEventName, EntityType, IdentityProviderAttributesValidator, IdentityProviderMappingSyncMode, IdentityProviderPreset, IdentityProviderProtocol, IdentityProviderValidator, IdentityType, PermissionName, PermissionValidator, PolicyValidator, REALM_MASTER_NAME, ROLE_ADMIN_NAME, ROLE_REALM_ADMIN_NAME, RealmValidator, RobotError, RobotValidator, RoleValidator, ScopeName, ScopeValidator, UserError, UserValidator, ValidatorGroup, buildEntityChannelName, buildEntityNamespaceName, buildIdentityProviderAuthorizeCallbackPath, buildUserFakeEmail, isLdapIdentityProvider, isOAuth2IdentityProvider, isOpenIDIdentityProvider, isPolicy, isPolicyNameValid, isUserFakeEmail } from "@authup/core-kit";
|
|
4
|
+
import { ClientError, ClientPermissionValidator, ClientRoleValidator, ClientScopeValidator, ClientValidator, EntityDefaultEventName, EntityType, IdentityProviderAttributesValidator, IdentityProviderMappingSyncMode, IdentityProviderPreset, IdentityProviderProtocol, IdentityProviderRoleMappingValidator, IdentityProviderValidator, IdentityType, PermissionName, PermissionPolicyValidator, PermissionValidator, PolicyValidator, REALM_MASTER_NAME, ROLE_ADMIN_NAME, ROLE_REALM_ADMIN_NAME, RealmValidator, RobotError, RobotPermissionValidator, RobotRoleValidator, RobotValidator, RolePermissionValidator, RoleValidator, ScopeName, ScopeValidator, UserError, UserPermissionValidator, UserRoleValidator, UserValidator, ValidatorGroup, buildEntityChannelName, buildEntityNamespaceName, buildIdentityProviderAuthorizeCallbackPath, buildUserFakeEmail, isLdapIdentityProvider, isOAuth2IdentityProvider, isOpenIDIdentityProvider, isPolicy, isPolicyNameValid, isUserFakeEmail } from "@authup/core-kit";
|
|
5
5
|
import { AsymmetricKey, CryptoAsymmetricAlgorithm, DomainEventPublisher, DomainEventRedisPublisher, DomainEventSocketPublisher, MemoryCache, RedisCache, buildCacheKey, buildRedisKeyPath, compare, createAsymmetricKeyPair, createLogger, createNoopLogger, createRedisClient, escapeRedisKey, extractTokenHeader, extractTokenPayload, hash, setLoggerFactory, signToken, useLogger, verifyToken } from "@authup/server-kit";
|
|
6
6
|
import { singa } from "singa";
|
|
7
7
|
import { AttributeNamesPolicyValidator, AttributesPolicyEvaluator, AttributesPolicyValidator, BuiltInPolicyType, DatePolicyValidator, DecisionStrategy, IdentityPolicyEvaluator, PermissionBindingPolicyValidator, PermissionEvaluator, PolicyData, PolicyDefaultEvaluators, PolicyEngine, PolicyIssueCode, SystemPolicyName, TimePolicyValidator, buildPermissionKey, definePolicyEvaluationContext, definePolicyIssueItem, isPermissionPolicyBindingEqual, maybeInvertPolicyOutcome, mergePermissionPolicyBindings } from "@authup/access";
|
|
@@ -4437,10 +4437,12 @@ var ClientService = class extends AbstractEntityService {
|
|
|
4437
4437
|
var ClientPermissionService = class extends AbstractEntityService {
|
|
4438
4438
|
repository;
|
|
4439
4439
|
identityPermissionProvider;
|
|
4440
|
+
validator;
|
|
4440
4441
|
constructor(ctx) {
|
|
4441
4442
|
super();
|
|
4442
4443
|
this.repository = ctx.repository;
|
|
4443
4444
|
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
4445
|
+
this.validator = new ClientPermissionValidator();
|
|
4444
4446
|
}
|
|
4445
4447
|
async getMany(query, actor) {
|
|
4446
4448
|
await actor.permissionEvaluator.preEvaluateOneOf({ name: [PermissionName.CLIENT_PERMISSION_CREATE, PermissionName.CLIENT_PERMISSION_DELETE] });
|
|
@@ -4454,32 +4456,37 @@ var ClientPermissionService = class extends AbstractEntityService {
|
|
|
4454
4456
|
}
|
|
4455
4457
|
async create(data, actor) {
|
|
4456
4458
|
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.CLIENT_PERMISSION_CREATE });
|
|
4457
|
-
await this.
|
|
4458
|
-
|
|
4459
|
-
|
|
4459
|
+
const validated = await this.validator.run(data, { group: ValidatorGroup.CREATE });
|
|
4460
|
+
await this.repository.validateJoinColumns(validated);
|
|
4461
|
+
if (await this.repository.findOneBy({
|
|
4462
|
+
client_id: validated.client_id,
|
|
4463
|
+
permission_id: validated.permission_id
|
|
4464
|
+
})) throw new ConflictError("The client-permission assignment already exists.");
|
|
4465
|
+
if (validated.permission) {
|
|
4466
|
+
validated.permission_realm_id = validated.permission.realm_id;
|
|
4460
4467
|
await actor.permissionEvaluator.preEvaluate({
|
|
4461
|
-
name:
|
|
4462
|
-
realmId:
|
|
4463
|
-
clientId:
|
|
4468
|
+
name: validated.permission.name,
|
|
4469
|
+
realmId: validated.permission.realm_id,
|
|
4470
|
+
clientId: validated.permission.client_id
|
|
4464
4471
|
});
|
|
4465
4472
|
}
|
|
4466
|
-
if (
|
|
4467
|
-
if (
|
|
4473
|
+
if (validated.client) validated.client_realm_id = validated.client.realm_id;
|
|
4474
|
+
if (validated.permission && actor.identity && typeof validated.policy_id === "undefined") {
|
|
4468
4475
|
const junctionPolicy = await this.identityPermissionProvider.resolveJunctionPolicy({
|
|
4469
4476
|
type: actor.identity.type,
|
|
4470
4477
|
id: actor.identity.data.id
|
|
4471
4478
|
}, {
|
|
4472
|
-
name:
|
|
4473
|
-
realmId:
|
|
4474
|
-
clientId:
|
|
4479
|
+
name: validated.permission.name,
|
|
4480
|
+
realmId: validated.permission.realm_id,
|
|
4481
|
+
clientId: validated.permission.client_id
|
|
4475
4482
|
});
|
|
4476
|
-
if (junctionPolicy)
|
|
4483
|
+
if (junctionPolicy) validated.policy_id = junctionPolicy.id;
|
|
4477
4484
|
}
|
|
4478
4485
|
await actor.permissionEvaluator.evaluate({
|
|
4479
4486
|
name: PermissionName.CLIENT_PERMISSION_CREATE,
|
|
4480
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]:
|
|
4487
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: validated })
|
|
4481
4488
|
});
|
|
4482
|
-
let entity = this.repository.create(
|
|
4489
|
+
let entity = this.repository.create(validated);
|
|
4483
4490
|
entity = await this.repository.save(entity);
|
|
4484
4491
|
return entity;
|
|
4485
4492
|
}
|
|
@@ -4515,9 +4522,13 @@ var ClientPermissionService = class extends AbstractEntityService {
|
|
|
4515
4522
|
//#region src/core/entities/client-role/service.ts
|
|
4516
4523
|
var ClientRoleService = class extends AbstractEntityService {
|
|
4517
4524
|
repository;
|
|
4525
|
+
identityPermissionProvider;
|
|
4526
|
+
validator;
|
|
4518
4527
|
constructor(ctx) {
|
|
4519
4528
|
super();
|
|
4520
4529
|
this.repository = ctx.repository;
|
|
4530
|
+
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
4531
|
+
this.validator = new ClientRoleValidator();
|
|
4521
4532
|
}
|
|
4522
4533
|
async getMany(query, actor) {
|
|
4523
4534
|
await actor.permissionEvaluator.preEvaluateOneOf({ name: [
|
|
@@ -4539,14 +4550,29 @@ var ClientRoleService = class extends AbstractEntityService {
|
|
|
4539
4550
|
}
|
|
4540
4551
|
async create(data, actor) {
|
|
4541
4552
|
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.CLIENT_ROLE_CREATE });
|
|
4542
|
-
await this.
|
|
4543
|
-
|
|
4544
|
-
if (
|
|
4553
|
+
const validated = await this.validator.run(data, { group: ValidatorGroup.CREATE });
|
|
4554
|
+
await this.repository.validateJoinColumns(validated);
|
|
4555
|
+
if (await this.repository.findOneBy({
|
|
4556
|
+
role_id: validated.role_id,
|
|
4557
|
+
client_id: validated.client_id
|
|
4558
|
+
})) throw new ConflictError("The client-role assignment already exists.");
|
|
4559
|
+
if (validated.role) validated.role_realm_id = validated.role.realm_id;
|
|
4560
|
+
if (validated.client) validated.client_realm_id = validated.client.realm_id;
|
|
4561
|
+
if (validated.role && actor.identity) {
|
|
4562
|
+
if (!await this.identityPermissionProvider.isSuperset({
|
|
4563
|
+
type: actor.identity.type,
|
|
4564
|
+
id: actor.identity.data.id
|
|
4565
|
+
}, {
|
|
4566
|
+
type: "role",
|
|
4567
|
+
id: validated.role_id,
|
|
4568
|
+
clientId: validated.role.client_id
|
|
4569
|
+
})) throw new ForbiddenError("You don't own the required permissions.");
|
|
4570
|
+
}
|
|
4545
4571
|
await actor.permissionEvaluator.evaluate({
|
|
4546
4572
|
name: PermissionName.CLIENT_ROLE_CREATE,
|
|
4547
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]:
|
|
4573
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: validated })
|
|
4548
4574
|
});
|
|
4549
|
-
let entity = this.repository.create(
|
|
4575
|
+
let entity = this.repository.create(validated);
|
|
4550
4576
|
entity = await this.repository.save(entity);
|
|
4551
4577
|
return entity;
|
|
4552
4578
|
}
|
|
@@ -4568,9 +4594,11 @@ var ClientRoleService = class extends AbstractEntityService {
|
|
|
4568
4594
|
//#region src/core/entities/client-scope/service.ts
|
|
4569
4595
|
var ClientScopeService = class extends AbstractEntityService {
|
|
4570
4596
|
repository;
|
|
4597
|
+
validator;
|
|
4571
4598
|
constructor(ctx) {
|
|
4572
4599
|
super();
|
|
4573
4600
|
this.repository = ctx.repository;
|
|
4601
|
+
this.validator = new ClientScopeValidator();
|
|
4574
4602
|
}
|
|
4575
4603
|
async getMany(query, actor) {
|
|
4576
4604
|
await actor.permissionEvaluator.preEvaluateOneOf({ name: [
|
|
@@ -4592,14 +4620,19 @@ var ClientScopeService = class extends AbstractEntityService {
|
|
|
4592
4620
|
}
|
|
4593
4621
|
async create(data, actor) {
|
|
4594
4622
|
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.CLIENT_SCOPE_CREATE });
|
|
4595
|
-
await this.
|
|
4596
|
-
|
|
4597
|
-
if (
|
|
4623
|
+
const validated = await this.validator.run(data, { group: ValidatorGroup.CREATE });
|
|
4624
|
+
await this.repository.validateJoinColumns(validated);
|
|
4625
|
+
if (await this.repository.findOneBy({
|
|
4626
|
+
client_id: validated.client_id,
|
|
4627
|
+
scope_id: validated.scope_id
|
|
4628
|
+
})) throw new ConflictError("The client-scope assignment already exists.");
|
|
4629
|
+
if (validated.client) validated.client_realm_id = validated.client.realm_id;
|
|
4630
|
+
if (validated.scope) validated.scope_realm_id = validated.scope.realm_id;
|
|
4598
4631
|
await actor.permissionEvaluator.evaluate({
|
|
4599
4632
|
name: PermissionName.CLIENT_SCOPE_CREATE,
|
|
4600
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]:
|
|
4633
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: validated })
|
|
4601
4634
|
});
|
|
4602
|
-
let entity = this.repository.create(
|
|
4635
|
+
let entity = this.repository.create(validated);
|
|
4603
4636
|
entity = await this.repository.save(entity);
|
|
4604
4637
|
return entity;
|
|
4605
4638
|
}
|
|
@@ -4775,6 +4808,10 @@ var PermissionService = class extends AbstractEntityService {
|
|
|
4775
4808
|
*/ async assignDefaultPolicy(permission) {
|
|
4776
4809
|
const defaultPolicy = await this.policyRepository.findOneByName(SystemPolicyName.DEFAULT);
|
|
4777
4810
|
if (!defaultPolicy) throw new AuthupError(`The ${SystemPolicyName.DEFAULT} policy is not provisioned. Cannot create permissions without the default security policy.`);
|
|
4811
|
+
if (await this.permissionPolicyRepository.findOneBy({
|
|
4812
|
+
permission_id: permission.id,
|
|
4813
|
+
policy_id: defaultPolicy.id
|
|
4814
|
+
})) return;
|
|
4778
4815
|
const entry = this.permissionPolicyRepository.create({
|
|
4779
4816
|
permission_id: permission.id,
|
|
4780
4817
|
permission_realm_id: permission.realm_id,
|
|
@@ -4789,6 +4826,10 @@ var PermissionService = class extends AbstractEntityService {
|
|
|
4789
4826
|
*/ async assignToAdminRole(permission) {
|
|
4790
4827
|
const adminRole = await this.roleRepository.findOneByName(ROLE_ADMIN_NAME);
|
|
4791
4828
|
if (!adminRole) return;
|
|
4829
|
+
if (await this.rolePermissionRepository.findOneBy({
|
|
4830
|
+
role_id: adminRole.id,
|
|
4831
|
+
permission_id: permission.id
|
|
4832
|
+
})) return;
|
|
4792
4833
|
const entry = this.rolePermissionRepository.create({
|
|
4793
4834
|
role_id: adminRole.id,
|
|
4794
4835
|
role_realm_id: adminRole.realm_id,
|
|
@@ -4823,6 +4864,10 @@ var PermissionService = class extends AbstractEntityService {
|
|
|
4823
4864
|
const realmAdminRoles = await this.roleRepository.findManyBy({ name: ROLE_REALM_ADMIN_NAME });
|
|
4824
4865
|
for (const role of realmAdminRoles) {
|
|
4825
4866
|
if (permission.realm_id && permission.realm_id !== role.realm_id) continue;
|
|
4867
|
+
if (await this.rolePermissionRepository.findOneBy({
|
|
4868
|
+
role_id: role.id,
|
|
4869
|
+
permission_id: permission.id
|
|
4870
|
+
})) continue;
|
|
4826
4871
|
const entry = this.rolePermissionRepository.create({
|
|
4827
4872
|
role_id: role.id,
|
|
4828
4873
|
role_realm_id: role.realm_id,
|
|
@@ -4838,9 +4883,11 @@ var PermissionService = class extends AbstractEntityService {
|
|
|
4838
4883
|
//#region src/core/entities/permission-policy/service.ts
|
|
4839
4884
|
var PermissionPolicyService = class extends AbstractEntityService {
|
|
4840
4885
|
repository;
|
|
4886
|
+
validator;
|
|
4841
4887
|
constructor(ctx) {
|
|
4842
4888
|
super();
|
|
4843
4889
|
this.repository = ctx.repository;
|
|
4890
|
+
this.validator = new PermissionPolicyValidator();
|
|
4844
4891
|
}
|
|
4845
4892
|
async getMany(query, actor) {
|
|
4846
4893
|
await actor.permissionEvaluator.preEvaluateOneOf({ name: [PermissionName.PERMISSION_READ, PermissionName.PERMISSION_UPDATE] });
|
|
@@ -4854,14 +4901,19 @@ var PermissionPolicyService = class extends AbstractEntityService {
|
|
|
4854
4901
|
}
|
|
4855
4902
|
async create(data, actor) {
|
|
4856
4903
|
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.PERMISSION_UPDATE });
|
|
4857
|
-
await this.
|
|
4858
|
-
|
|
4859
|
-
if (
|
|
4904
|
+
const validated = await this.validator.run(data, { group: ValidatorGroup.CREATE });
|
|
4905
|
+
await this.repository.validateJoinColumns(validated);
|
|
4906
|
+
if (await this.repository.findOneBy({
|
|
4907
|
+
permission_id: validated.permission_id,
|
|
4908
|
+
policy_id: validated.policy_id
|
|
4909
|
+
})) throw new ConflictError("The permission-policy assignment already exists.");
|
|
4910
|
+
if (validated.permission) validated.permission_realm_id = validated.permission.realm_id;
|
|
4911
|
+
if (validated.policy) validated.policy_realm_id = validated.policy.realm_id;
|
|
4860
4912
|
await actor.permissionEvaluator.evaluate({
|
|
4861
4913
|
name: PermissionName.PERMISSION_UPDATE,
|
|
4862
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]:
|
|
4914
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: validated })
|
|
4863
4915
|
});
|
|
4864
|
-
let entity = this.repository.create(
|
|
4916
|
+
let entity = this.repository.create(validated);
|
|
4865
4917
|
entity = await this.repository.save(entity);
|
|
4866
4918
|
return entity;
|
|
4867
4919
|
}
|
|
@@ -5272,10 +5324,12 @@ var RobotService = class extends AbstractEntityService {
|
|
|
5272
5324
|
var RobotPermissionService = class extends AbstractEntityService {
|
|
5273
5325
|
repository;
|
|
5274
5326
|
identityPermissionProvider;
|
|
5327
|
+
validator;
|
|
5275
5328
|
constructor(ctx) {
|
|
5276
5329
|
super();
|
|
5277
5330
|
this.repository = ctx.repository;
|
|
5278
5331
|
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
5332
|
+
this.validator = new RobotPermissionValidator();
|
|
5279
5333
|
}
|
|
5280
5334
|
async getMany(query, actor) {
|
|
5281
5335
|
await actor.permissionEvaluator.preEvaluateOneOf({ name: [PermissionName.ROBOT_PERMISSION_CREATE, PermissionName.ROBOT_PERMISSION_DELETE] });
|
|
@@ -5289,32 +5343,37 @@ var RobotPermissionService = class extends AbstractEntityService {
|
|
|
5289
5343
|
}
|
|
5290
5344
|
async create(data, actor) {
|
|
5291
5345
|
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.ROBOT_PERMISSION_CREATE });
|
|
5292
|
-
await this.
|
|
5293
|
-
|
|
5294
|
-
|
|
5346
|
+
const validated = await this.validator.run(data, { group: ValidatorGroup.CREATE });
|
|
5347
|
+
await this.repository.validateJoinColumns(validated);
|
|
5348
|
+
if (await this.repository.findOneBy({
|
|
5349
|
+
permission_id: validated.permission_id,
|
|
5350
|
+
robot_id: validated.robot_id
|
|
5351
|
+
})) throw new ConflictError("The robot-permission assignment already exists.");
|
|
5352
|
+
if (validated.permission) {
|
|
5353
|
+
validated.permission_realm_id = validated.permission.realm_id;
|
|
5295
5354
|
await actor.permissionEvaluator.preEvaluate({
|
|
5296
|
-
name:
|
|
5297
|
-
realmId:
|
|
5298
|
-
clientId:
|
|
5355
|
+
name: validated.permission.name,
|
|
5356
|
+
realmId: validated.permission.realm_id,
|
|
5357
|
+
clientId: validated.permission.client_id
|
|
5299
5358
|
});
|
|
5300
5359
|
}
|
|
5301
|
-
if (
|
|
5302
|
-
if (
|
|
5360
|
+
if (validated.robot) validated.robot_realm_id = validated.robot.realm_id;
|
|
5361
|
+
if (validated.permission && actor.identity && typeof validated.policy_id === "undefined") {
|
|
5303
5362
|
const junctionPolicy = await this.identityPermissionProvider.resolveJunctionPolicy({
|
|
5304
5363
|
type: actor.identity.type,
|
|
5305
5364
|
id: actor.identity.data.id
|
|
5306
5365
|
}, {
|
|
5307
|
-
name:
|
|
5308
|
-
realmId:
|
|
5309
|
-
clientId:
|
|
5366
|
+
name: validated.permission.name,
|
|
5367
|
+
realmId: validated.permission.realm_id,
|
|
5368
|
+
clientId: validated.permission.client_id
|
|
5310
5369
|
});
|
|
5311
|
-
if (junctionPolicy)
|
|
5370
|
+
if (junctionPolicy) validated.policy_id = junctionPolicy.id;
|
|
5312
5371
|
}
|
|
5313
5372
|
await actor.permissionEvaluator.evaluate({
|
|
5314
5373
|
name: PermissionName.ROBOT_PERMISSION_CREATE,
|
|
5315
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]:
|
|
5374
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: validated })
|
|
5316
5375
|
});
|
|
5317
|
-
let entity = this.repository.create(
|
|
5376
|
+
let entity = this.repository.create(validated);
|
|
5318
5377
|
entity = await this.repository.save(entity);
|
|
5319
5378
|
return entity;
|
|
5320
5379
|
}
|
|
@@ -5350,9 +5409,13 @@ var RobotPermissionService = class extends AbstractEntityService {
|
|
|
5350
5409
|
//#region src/core/entities/robot-role/service.ts
|
|
5351
5410
|
var RobotRoleService = class extends AbstractEntityService {
|
|
5352
5411
|
repository;
|
|
5412
|
+
identityPermissionProvider;
|
|
5413
|
+
validator;
|
|
5353
5414
|
constructor(ctx) {
|
|
5354
5415
|
super();
|
|
5355
5416
|
this.repository = ctx.repository;
|
|
5417
|
+
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
5418
|
+
this.validator = new RobotRoleValidator();
|
|
5356
5419
|
}
|
|
5357
5420
|
async getMany(query, actor) {
|
|
5358
5421
|
await actor.permissionEvaluator.preEvaluateOneOf({ name: [
|
|
@@ -5374,14 +5437,29 @@ var RobotRoleService = class extends AbstractEntityService {
|
|
|
5374
5437
|
}
|
|
5375
5438
|
async create(data, actor) {
|
|
5376
5439
|
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.ROBOT_ROLE_CREATE });
|
|
5377
|
-
await this.
|
|
5378
|
-
|
|
5379
|
-
if (
|
|
5440
|
+
const validated = await this.validator.run(data, { group: ValidatorGroup.CREATE });
|
|
5441
|
+
await this.repository.validateJoinColumns(validated);
|
|
5442
|
+
if (await this.repository.findOneBy({
|
|
5443
|
+
role_id: validated.role_id,
|
|
5444
|
+
robot_id: validated.robot_id
|
|
5445
|
+
})) throw new ConflictError("The robot-role assignment already exists.");
|
|
5446
|
+
if (validated.role) validated.role_realm_id = validated.role.realm_id;
|
|
5447
|
+
if (validated.robot) validated.robot_realm_id = validated.robot.realm_id;
|
|
5448
|
+
if (validated.role && actor.identity) {
|
|
5449
|
+
if (!await this.identityPermissionProvider.isSuperset({
|
|
5450
|
+
type: actor.identity.type,
|
|
5451
|
+
id: actor.identity.data.id
|
|
5452
|
+
}, {
|
|
5453
|
+
type: "role",
|
|
5454
|
+
id: validated.role_id,
|
|
5455
|
+
clientId: validated.role.client_id
|
|
5456
|
+
})) throw new ForbiddenError("You don't own the required permissions.");
|
|
5457
|
+
}
|
|
5380
5458
|
await actor.permissionEvaluator.evaluate({
|
|
5381
5459
|
name: PermissionName.ROBOT_ROLE_CREATE,
|
|
5382
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]:
|
|
5460
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: validated })
|
|
5383
5461
|
});
|
|
5384
|
-
let entity = this.repository.create(
|
|
5462
|
+
let entity = this.repository.create(validated);
|
|
5385
5463
|
entity = await this.repository.save(entity);
|
|
5386
5464
|
return entity;
|
|
5387
5465
|
}
|
|
@@ -5602,10 +5680,12 @@ var RoleAttributeService = class extends AbstractEntityService {
|
|
|
5602
5680
|
var RolePermissionService = class extends AbstractEntityService {
|
|
5603
5681
|
repository;
|
|
5604
5682
|
identityPermissionProvider;
|
|
5683
|
+
validator;
|
|
5605
5684
|
constructor(ctx) {
|
|
5606
5685
|
super();
|
|
5607
5686
|
this.repository = ctx.repository;
|
|
5608
5687
|
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
5688
|
+
this.validator = new RolePermissionValidator();
|
|
5609
5689
|
}
|
|
5610
5690
|
async getMany(query, actor) {
|
|
5611
5691
|
await actor.permissionEvaluator.preEvaluateOneOf({ name: [PermissionName.ROLE_PERMISSION_DELETE, PermissionName.ROLE_PERMISSION_READ] });
|
|
@@ -5619,32 +5699,37 @@ var RolePermissionService = class extends AbstractEntityService {
|
|
|
5619
5699
|
}
|
|
5620
5700
|
async create(data, actor) {
|
|
5621
5701
|
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.ROLE_PERMISSION_CREATE });
|
|
5622
|
-
await this.
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5702
|
+
const validated = await this.validator.run(data, { group: ValidatorGroup.CREATE });
|
|
5703
|
+
await this.repository.validateJoinColumns(validated);
|
|
5704
|
+
if (await this.repository.findOneBy({
|
|
5705
|
+
role_id: validated.role_id,
|
|
5706
|
+
permission_id: validated.permission_id
|
|
5707
|
+
})) throw new ConflictError("The role-permission assignment already exists.");
|
|
5708
|
+
if (validated.permission) {
|
|
5709
|
+
validated.permission_realm_id = validated.permission.realm_id;
|
|
5710
|
+
if (!validated.role || validated.role.name !== ROLE_ADMIN_NAME) await actor.permissionEvaluator.preEvaluate({
|
|
5711
|
+
name: validated.permission.name,
|
|
5712
|
+
realmId: validated.permission.realm_id,
|
|
5713
|
+
clientId: validated.permission.client_id
|
|
5629
5714
|
});
|
|
5630
5715
|
}
|
|
5631
|
-
if (
|
|
5632
|
-
if (
|
|
5716
|
+
if (validated.role) validated.role_realm_id = validated.role.realm_id;
|
|
5717
|
+
if (validated.permission && actor.identity && typeof validated.policy_id === "undefined") {
|
|
5633
5718
|
const junctionPolicy = await this.identityPermissionProvider.resolveJunctionPolicy({
|
|
5634
5719
|
type: actor.identity.type,
|
|
5635
5720
|
id: actor.identity.data.id
|
|
5636
5721
|
}, {
|
|
5637
|
-
name:
|
|
5638
|
-
realmId:
|
|
5639
|
-
clientId:
|
|
5722
|
+
name: validated.permission.name,
|
|
5723
|
+
realmId: validated.permission.realm_id,
|
|
5724
|
+
clientId: validated.permission.client_id
|
|
5640
5725
|
});
|
|
5641
|
-
if (junctionPolicy)
|
|
5726
|
+
if (junctionPolicy) validated.policy_id = junctionPolicy.id;
|
|
5642
5727
|
}
|
|
5643
5728
|
await actor.permissionEvaluator.evaluate({
|
|
5644
5729
|
name: PermissionName.ROLE_PERMISSION_CREATE,
|
|
5645
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]:
|
|
5730
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: validated })
|
|
5646
5731
|
});
|
|
5647
|
-
let entity = this.repository.create(
|
|
5732
|
+
let entity = this.repository.create(validated);
|
|
5648
5733
|
entity = await this.repository.save(entity);
|
|
5649
5734
|
return entity;
|
|
5650
5735
|
}
|
|
@@ -6034,10 +6119,12 @@ var UserAttributeService = class extends AbstractEntityService {
|
|
|
6034
6119
|
var UserPermissionService = class extends AbstractEntityService {
|
|
6035
6120
|
repository;
|
|
6036
6121
|
identityPermissionProvider;
|
|
6122
|
+
validator;
|
|
6037
6123
|
constructor(ctx) {
|
|
6038
6124
|
super();
|
|
6039
6125
|
this.repository = ctx.repository;
|
|
6040
6126
|
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
6127
|
+
this.validator = new UserPermissionValidator();
|
|
6041
6128
|
}
|
|
6042
6129
|
async getMany(query, actor) {
|
|
6043
6130
|
await actor.permissionEvaluator.preEvaluateOneOf({ name: [
|
|
@@ -6059,32 +6146,37 @@ var UserPermissionService = class extends AbstractEntityService {
|
|
|
6059
6146
|
}
|
|
6060
6147
|
async create(data, actor) {
|
|
6061
6148
|
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.USER_PERMISSION_CREATE });
|
|
6062
|
-
await this.
|
|
6063
|
-
|
|
6064
|
-
|
|
6149
|
+
const validated = await this.validator.run(data, { group: ValidatorGroup.CREATE });
|
|
6150
|
+
await this.repository.validateJoinColumns(validated);
|
|
6151
|
+
if (await this.repository.findOneBy({
|
|
6152
|
+
permission_id: validated.permission_id,
|
|
6153
|
+
user_id: validated.user_id
|
|
6154
|
+
})) throw new ConflictError("The user-permission assignment already exists.");
|
|
6155
|
+
if (validated.permission) {
|
|
6156
|
+
validated.permission_realm_id = validated.permission.realm_id;
|
|
6065
6157
|
await actor.permissionEvaluator.preEvaluate({
|
|
6066
|
-
name:
|
|
6067
|
-
realmId:
|
|
6068
|
-
clientId:
|
|
6158
|
+
name: validated.permission.name,
|
|
6159
|
+
realmId: validated.permission.realm_id,
|
|
6160
|
+
clientId: validated.permission.client_id
|
|
6069
6161
|
});
|
|
6070
6162
|
}
|
|
6071
|
-
if (
|
|
6072
|
-
if (
|
|
6163
|
+
if (validated.user) validated.user_realm_id = validated.user.realm_id;
|
|
6164
|
+
if (validated.permission && actor.identity && typeof validated.policy_id === "undefined") {
|
|
6073
6165
|
const junctionPolicy = await this.identityPermissionProvider.resolveJunctionPolicy({
|
|
6074
6166
|
type: actor.identity.type,
|
|
6075
6167
|
id: actor.identity.data.id
|
|
6076
6168
|
}, {
|
|
6077
|
-
name:
|
|
6078
|
-
realmId:
|
|
6079
|
-
clientId:
|
|
6169
|
+
name: validated.permission.name,
|
|
6170
|
+
realmId: validated.permission.realm_id,
|
|
6171
|
+
clientId: validated.permission.client_id
|
|
6080
6172
|
});
|
|
6081
|
-
if (junctionPolicy)
|
|
6173
|
+
if (junctionPolicy) validated.policy_id = junctionPolicy.id;
|
|
6082
6174
|
}
|
|
6083
6175
|
await actor.permissionEvaluator.evaluate({
|
|
6084
6176
|
name: PermissionName.USER_PERMISSION_CREATE,
|
|
6085
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]:
|
|
6177
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: validated })
|
|
6086
6178
|
});
|
|
6087
|
-
let entity = this.repository.create(
|
|
6179
|
+
let entity = this.repository.create(validated);
|
|
6088
6180
|
entity = await this.repository.save(entity);
|
|
6089
6181
|
return entity;
|
|
6090
6182
|
}
|
|
@@ -6120,9 +6212,13 @@ var UserPermissionService = class extends AbstractEntityService {
|
|
|
6120
6212
|
//#region src/core/entities/user-role/service.ts
|
|
6121
6213
|
var UserRoleService = class extends AbstractEntityService {
|
|
6122
6214
|
repository;
|
|
6215
|
+
identityPermissionProvider;
|
|
6216
|
+
validator;
|
|
6123
6217
|
constructor(ctx) {
|
|
6124
6218
|
super();
|
|
6125
6219
|
this.repository = ctx.repository;
|
|
6220
|
+
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
6221
|
+
this.validator = new UserRoleValidator();
|
|
6126
6222
|
}
|
|
6127
6223
|
async getMany(query, actor) {
|
|
6128
6224
|
await actor.permissionEvaluator.preEvaluateOneOf({ name: [
|
|
@@ -6144,14 +6240,29 @@ var UserRoleService = class extends AbstractEntityService {
|
|
|
6144
6240
|
}
|
|
6145
6241
|
async create(data, actor) {
|
|
6146
6242
|
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.USER_ROLE_CREATE });
|
|
6147
|
-
await this.
|
|
6148
|
-
|
|
6149
|
-
if (
|
|
6243
|
+
const validated = await this.validator.run(data, { group: ValidatorGroup.CREATE });
|
|
6244
|
+
await this.repository.validateJoinColumns(validated);
|
|
6245
|
+
if (await this.repository.findOneBy({
|
|
6246
|
+
role_id: validated.role_id,
|
|
6247
|
+
user_id: validated.user_id
|
|
6248
|
+
})) throw new ConflictError("The user-role assignment already exists.");
|
|
6249
|
+
if (validated.role) validated.role_realm_id = validated.role.realm_id;
|
|
6250
|
+
if (validated.user) validated.user_realm_id = validated.user.realm_id;
|
|
6251
|
+
if (validated.role && actor.identity) {
|
|
6252
|
+
if (!await this.identityPermissionProvider.isSuperset({
|
|
6253
|
+
type: actor.identity.type,
|
|
6254
|
+
id: actor.identity.data.id
|
|
6255
|
+
}, {
|
|
6256
|
+
type: "role",
|
|
6257
|
+
id: validated.role_id,
|
|
6258
|
+
clientId: validated.role.client_id
|
|
6259
|
+
})) throw new ForbiddenError("You don't own the required permissions.");
|
|
6260
|
+
}
|
|
6150
6261
|
await actor.permissionEvaluator.evaluate({
|
|
6151
6262
|
name: PermissionName.USER_ROLE_CREATE,
|
|
6152
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]:
|
|
6263
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: validated })
|
|
6153
6264
|
});
|
|
6154
|
-
let entity = this.repository.create(
|
|
6265
|
+
let entity = this.repository.create(validated);
|
|
6155
6266
|
entity = await this.repository.save(entity);
|
|
6156
6267
|
return entity;
|
|
6157
6268
|
}
|
|
@@ -6170,6 +6281,92 @@ var UserRoleService = class extends AbstractEntityService {
|
|
|
6170
6281
|
}
|
|
6171
6282
|
};
|
|
6172
6283
|
//#endregion
|
|
6284
|
+
//#region src/core/entities/identity-provider-role-mapping/service.ts
|
|
6285
|
+
var IdentityProviderRoleMappingService = class extends AbstractEntityService {
|
|
6286
|
+
repository;
|
|
6287
|
+
identityPermissionProvider;
|
|
6288
|
+
validator;
|
|
6289
|
+
constructor(ctx) {
|
|
6290
|
+
super();
|
|
6291
|
+
this.repository = ctx.repository;
|
|
6292
|
+
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
6293
|
+
this.validator = new IdentityProviderRoleMappingValidator();
|
|
6294
|
+
}
|
|
6295
|
+
async getMany(query, actor) {
|
|
6296
|
+
await actor.permissionEvaluator.preEvaluateOneOf({ name: [
|
|
6297
|
+
PermissionName.IDENTITY_PROVIDER_READ,
|
|
6298
|
+
PermissionName.IDENTITY_PROVIDER_UPDATE,
|
|
6299
|
+
PermissionName.IDENTITY_PROVIDER_DELETE
|
|
6300
|
+
] });
|
|
6301
|
+
return this.repository.findMany(query);
|
|
6302
|
+
}
|
|
6303
|
+
async getOne(id, actor) {
|
|
6304
|
+
await actor.permissionEvaluator.preEvaluateOneOf({ name: [
|
|
6305
|
+
PermissionName.IDENTITY_PROVIDER_READ,
|
|
6306
|
+
PermissionName.IDENTITY_PROVIDER_UPDATE,
|
|
6307
|
+
PermissionName.IDENTITY_PROVIDER_DELETE
|
|
6308
|
+
] });
|
|
6309
|
+
const entity = await this.repository.findOneBy({ id });
|
|
6310
|
+
if (!entity) throw new NotFoundError();
|
|
6311
|
+
return entity;
|
|
6312
|
+
}
|
|
6313
|
+
async create(data, actor) {
|
|
6314
|
+
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.IDENTITY_PROVIDER_ROLE_CREATE });
|
|
6315
|
+
const validated = await this.validator.run(data, { group: ValidatorGroup.CREATE });
|
|
6316
|
+
await this.repository.validateJoinColumns(validated);
|
|
6317
|
+
if (await this.repository.findOneBy({
|
|
6318
|
+
provider_id: validated.provider_id,
|
|
6319
|
+
role_id: validated.role_id
|
|
6320
|
+
})) throw new ConflictError("The identity-provider-role-mapping already exists.");
|
|
6321
|
+
if (validated.provider) validated.provider_realm_id = validated.provider.realm_id;
|
|
6322
|
+
if (validated.role) validated.role_realm_id = validated.role.realm_id;
|
|
6323
|
+
if (validated.role_realm_id && validated.provider_realm_id && validated.role_realm_id !== validated.provider_realm_id) throw new BadRequestError("It is not possible to map an identity provider to a role of another realm.");
|
|
6324
|
+
if (validated.role && actor.identity) {
|
|
6325
|
+
if (!await this.identityPermissionProvider.isSuperset({
|
|
6326
|
+
type: actor.identity.type,
|
|
6327
|
+
id: actor.identity.data.id
|
|
6328
|
+
}, {
|
|
6329
|
+
type: "role",
|
|
6330
|
+
id: validated.role_id,
|
|
6331
|
+
clientId: validated.role.client_id
|
|
6332
|
+
})) throw new ForbiddenError("You don't own the required permissions.");
|
|
6333
|
+
}
|
|
6334
|
+
await actor.permissionEvaluator.evaluate({
|
|
6335
|
+
name: PermissionName.IDENTITY_PROVIDER_ROLE_CREATE,
|
|
6336
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: validated })
|
|
6337
|
+
});
|
|
6338
|
+
let entity = this.repository.create(validated);
|
|
6339
|
+
entity = await this.repository.save(entity);
|
|
6340
|
+
return entity;
|
|
6341
|
+
}
|
|
6342
|
+
async update(id, data, actor) {
|
|
6343
|
+
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.IDENTITY_PROVIDER_ROLE_UPDATE });
|
|
6344
|
+
const entity = await this.repository.findOneBy({ id });
|
|
6345
|
+
if (!entity) throw new NotFoundError();
|
|
6346
|
+
const validated = await this.validator.run(data, { group: ValidatorGroup.UPDATE });
|
|
6347
|
+
await this.repository.validateJoinColumns(validated);
|
|
6348
|
+
const merged = this.repository.merge(entity, validated);
|
|
6349
|
+
await actor.permissionEvaluator.evaluate({
|
|
6350
|
+
name: PermissionName.IDENTITY_PROVIDER_ROLE_UPDATE,
|
|
6351
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: merged })
|
|
6352
|
+
});
|
|
6353
|
+
return this.repository.save(merged);
|
|
6354
|
+
}
|
|
6355
|
+
async delete(id, actor) {
|
|
6356
|
+
await actor.permissionEvaluator.preEvaluate({ name: PermissionName.IDENTITY_PROVIDER_ROLE_DELETE });
|
|
6357
|
+
const entity = await this.repository.findOneBy({ id });
|
|
6358
|
+
if (!entity) throw new NotFoundError();
|
|
6359
|
+
await actor.permissionEvaluator.evaluate({
|
|
6360
|
+
name: PermissionName.IDENTITY_PROVIDER_ROLE_DELETE,
|
|
6361
|
+
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: entity })
|
|
6362
|
+
});
|
|
6363
|
+
const { id: entityId } = entity;
|
|
6364
|
+
await this.repository.remove(entity);
|
|
6365
|
+
entity.id = entityId;
|
|
6366
|
+
return entity;
|
|
6367
|
+
}
|
|
6368
|
+
};
|
|
6369
|
+
//#endregion
|
|
6173
6370
|
//#region src/core/oauth2/authorization/code/issuer/module.ts
|
|
6174
6371
|
var OAuth2AuthorizationCodeIssuer = class {
|
|
6175
6372
|
repository;
|
|
@@ -11762,7 +11959,8 @@ var HTTPOAuth2Authorizer = class extends OAuth2Authorization {
|
|
|
11762
11959
|
constructor(ctx) {
|
|
11763
11960
|
super(ctx);
|
|
11764
11961
|
this.codeRequestVerifier = ctx.codeRequestVerifier;
|
|
11765
|
-
|
|
11962
|
+
const validator = new OAuth2AuthorizationCodeRequestValidator();
|
|
11963
|
+
this.requestValidator = new RoutupContainerAdapter(validator);
|
|
11766
11964
|
}
|
|
11767
11965
|
async authorizeWithRequest(req) {
|
|
11768
11966
|
const codeRequestValidated = await this.validateWithRequest(req);
|
|
@@ -12585,12 +12783,8 @@ function _ts_param$25(paramIndex, decorator) {
|
|
|
12585
12783
|
}
|
|
12586
12784
|
var ClientRoleController = class {
|
|
12587
12785
|
service;
|
|
12588
|
-
repository;
|
|
12589
|
-
identityPermissionProvider;
|
|
12590
12786
|
constructor(ctx) {
|
|
12591
12787
|
this.service = ctx.service;
|
|
12592
|
-
this.repository = ctx.repository;
|
|
12593
|
-
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
12594
12788
|
}
|
|
12595
12789
|
async getMany(req, res) {
|
|
12596
12790
|
const actor = buildActorContext(req);
|
|
@@ -12602,15 +12796,6 @@ var ClientRoleController = class {
|
|
|
12602
12796
|
}
|
|
12603
12797
|
async add(data, req, res) {
|
|
12604
12798
|
const actor = buildActorContext(req);
|
|
12605
|
-
await this.repository.validateJoinColumns(data);
|
|
12606
|
-
if (data.role) {
|
|
12607
|
-
const identity = useRequestIdentityOrFail(req);
|
|
12608
|
-
if (!await this.identityPermissionProvider.isSuperset(identity, {
|
|
12609
|
-
type: "role",
|
|
12610
|
-
id: data.role.id,
|
|
12611
|
-
clientId: data.role.client_id
|
|
12612
|
-
})) throw new ForbiddenError("You don't own the required permissions.");
|
|
12613
|
-
}
|
|
12614
12799
|
return sendCreated(res, await this.service.create(data, actor));
|
|
12615
12800
|
}
|
|
12616
12801
|
async getOne(id, req, res) {
|
|
@@ -13119,28 +13304,6 @@ IdentityProviderController = _ts_decorate$25([
|
|
|
13119
13304
|
_ts_metadata$25("design:paramtypes", [typeof IdentityProviderControllerContext === "undefined" ? Object : IdentityProviderControllerContext])
|
|
13120
13305
|
], IdentityProviderController);
|
|
13121
13306
|
//#endregion
|
|
13122
|
-
//#region src/adapters/http/controllers/entities/identity-provide-role/utils/validator.ts
|
|
13123
|
-
var IdentityProviderRoleMappingRequestValidator = class extends Container {
|
|
13124
|
-
initialize() {
|
|
13125
|
-
super.initialize();
|
|
13126
|
-
this.mount("provider_id", { group: RequestHandlerOperation.CREATE }, createValidator$1(() => {
|
|
13127
|
-
return createValidationChain().exists().isUUID();
|
|
13128
|
-
}));
|
|
13129
|
-
this.mount("role_id", { group: RequestHandlerOperation.CREATE }, createValidator$1(() => {
|
|
13130
|
-
return createValidationChain().exists().isUUID();
|
|
13131
|
-
}));
|
|
13132
|
-
this.mount("name", { optional: true }, createValidator$1(() => {
|
|
13133
|
-
return createValidationChain().isString().optional({ values: "null" });
|
|
13134
|
-
}));
|
|
13135
|
-
this.mount("value", { optional: true }, createValidator$1(() => {
|
|
13136
|
-
return createValidationChain().isString().optional({ values: "null" });
|
|
13137
|
-
}));
|
|
13138
|
-
this.mount("value_is_regex", { optional: true }, createValidator$1(() => {
|
|
13139
|
-
return createValidationChain().isBoolean();
|
|
13140
|
-
}));
|
|
13141
|
-
}
|
|
13142
|
-
};
|
|
13143
|
-
//#endregion
|
|
13144
13307
|
//#region src/adapters/http/controllers/entities/identity-provide-role/module.ts
|
|
13145
13308
|
function _ts_decorate$24(decorators, target, key, desc) {
|
|
13146
13309
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -13156,100 +13319,46 @@ function _ts_param$22(paramIndex, decorator) {
|
|
|
13156
13319
|
decorator(target, key, paramIndex);
|
|
13157
13320
|
};
|
|
13158
13321
|
}
|
|
13159
|
-
var
|
|
13160
|
-
|
|
13161
|
-
identityPermissionProvider;
|
|
13322
|
+
var IdentityProviderRoleMappingController = class {
|
|
13323
|
+
service;
|
|
13162
13324
|
constructor(ctx) {
|
|
13163
|
-
this.
|
|
13164
|
-
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
13325
|
+
this.service = ctx.service;
|
|
13165
13326
|
}
|
|
13166
|
-
async
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
PermissionName.IDENTITY_PROVIDER_UPDATE,
|
|
13170
|
-
PermissionName.IDENTITY_PROVIDER_DELETE
|
|
13171
|
-
] });
|
|
13172
|
-
const { data, meta } = await this.repository.findMany(useRequestQuery(req));
|
|
13327
|
+
async getMany(req, res) {
|
|
13328
|
+
const actor = buildActorContext(req);
|
|
13329
|
+
const { data, meta } = await this.service.getMany(useRequestQuery(req), actor);
|
|
13173
13330
|
return send(res, {
|
|
13174
13331
|
data,
|
|
13175
13332
|
meta
|
|
13176
13333
|
});
|
|
13177
13334
|
}
|
|
13178
|
-
async
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
PermissionName.IDENTITY_PROVIDER_UPDATE,
|
|
13182
|
-
PermissionName.IDENTITY_PROVIDER_DELETE
|
|
13183
|
-
] });
|
|
13184
|
-
const paramId = useRequestParamID(req);
|
|
13185
|
-
const entity = await this.repository.findOneBy({ id: paramId });
|
|
13186
|
-
if (!entity) throw new NotFoundError();
|
|
13187
|
-
return send(res, entity);
|
|
13335
|
+
async getOne(id, req, res) {
|
|
13336
|
+
const actor = buildActorContext(req);
|
|
13337
|
+
return send(res, await this.service.getOne(id, actor));
|
|
13188
13338
|
}
|
|
13189
|
-
async
|
|
13190
|
-
const
|
|
13191
|
-
|
|
13192
|
-
await permissionEvaluator.preEvaluate({ name: PermissionName.IDENTITY_PROVIDER_ROLE_UPDATE });
|
|
13193
|
-
const data = await new RoutupContainerAdapter(new IdentityProviderRoleMappingRequestValidator()).run(req, { group: RequestHandlerOperation.UPDATE });
|
|
13194
|
-
await this.repository.validateJoinColumns(data);
|
|
13195
|
-
let entity = await this.repository.findOneBy({ id: paramId });
|
|
13196
|
-
if (!entity) throw new NotFoundError();
|
|
13197
|
-
entity = this.repository.merge(entity, data);
|
|
13198
|
-
await permissionEvaluator.evaluate({
|
|
13199
|
-
name: PermissionName.IDENTITY_PROVIDER_ROLE_UPDATE,
|
|
13200
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: entity })
|
|
13201
|
-
});
|
|
13202
|
-
await this.repository.save(entity);
|
|
13203
|
-
return sendAccepted(res, entity);
|
|
13339
|
+
async add(data, req, res) {
|
|
13340
|
+
const actor = buildActorContext(req);
|
|
13341
|
+
return sendCreated(res, await this.service.create(data, actor));
|
|
13204
13342
|
}
|
|
13205
|
-
async
|
|
13206
|
-
const
|
|
13207
|
-
|
|
13208
|
-
await permissionEvaluator.preEvaluate({ name: PermissionName.IDENTITY_PROVIDER_ROLE_DELETE });
|
|
13209
|
-
const entity = await this.repository.findOneBy({ id: paramId });
|
|
13210
|
-
if (!entity) throw new NotFoundError();
|
|
13211
|
-
await permissionEvaluator.evaluate({
|
|
13212
|
-
name: PermissionName.IDENTITY_PROVIDER_ROLE_DELETE,
|
|
13213
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: entity })
|
|
13214
|
-
});
|
|
13215
|
-
const { id: entityId } = entity;
|
|
13216
|
-
await this.repository.remove(entity);
|
|
13217
|
-
entity.id = entityId;
|
|
13218
|
-
return sendAccepted(res);
|
|
13343
|
+
async edit(id, data, req, res) {
|
|
13344
|
+
const actor = buildActorContext(req);
|
|
13345
|
+
return sendAccepted(res, await this.service.update(id, data, actor));
|
|
13219
13346
|
}
|
|
13220
|
-
async
|
|
13221
|
-
const
|
|
13222
|
-
|
|
13223
|
-
const data = await new RoutupContainerAdapter(new IdentityProviderRoleMappingRequestValidator()).run(req, { group: RequestHandlerOperation.CREATE });
|
|
13224
|
-
await this.repository.validateJoinColumns(data);
|
|
13225
|
-
if (data.provider) data.provider_realm_id = data.provider.realm_id;
|
|
13226
|
-
if (data.role) data.role_realm_id = data.role.realm_id;
|
|
13227
|
-
if (data.role_realm_id && data.provider_realm_id && data.role_realm_id !== data.provider_realm_id) throw new BadRequestError("It is not possible to map an identity provider to a role of another realm.");
|
|
13228
|
-
await permissionEvaluator.evaluate({
|
|
13229
|
-
name: PermissionName.IDENTITY_PROVIDER_ROLE_CREATE,
|
|
13230
|
-
input: new PolicyData({ [BuiltInPolicyType.ATTRIBUTES]: data })
|
|
13231
|
-
});
|
|
13232
|
-
const identity = useRequestIdentityOrFail(req);
|
|
13233
|
-
if (!await this.identityPermissionProvider.isSuperset(identity, {
|
|
13234
|
-
type: "role",
|
|
13235
|
-
id: data.role_id,
|
|
13236
|
-
clientId: data.role.client_id
|
|
13237
|
-
})) throw new ForbiddenError("You don't own the required permissions.");
|
|
13238
|
-
const entity = this.repository.create(data);
|
|
13239
|
-
await this.repository.save(entity);
|
|
13240
|
-
return sendCreated(res, entity);
|
|
13347
|
+
async drop(id, req, res) {
|
|
13348
|
+
const actor = buildActorContext(req);
|
|
13349
|
+
return sendAccepted(res, await this.service.delete(id, actor));
|
|
13241
13350
|
}
|
|
13242
13351
|
};
|
|
13243
13352
|
_ts_decorate$24([
|
|
13244
|
-
DGet("", []),
|
|
13353
|
+
DGet("", [ForceLoggedInMiddleware]),
|
|
13245
13354
|
_ts_param$22(0, DRequest()),
|
|
13246
13355
|
_ts_param$22(1, DResponse()),
|
|
13247
13356
|
_ts_metadata$24("design:type", Function),
|
|
13248
13357
|
_ts_metadata$24("design:paramtypes", [typeof Request === "undefined" ? Object : Request, typeof Response === "undefined" ? Object : Response]),
|
|
13249
13358
|
_ts_metadata$24("design:returntype", Promise)
|
|
13250
|
-
],
|
|
13359
|
+
], IdentityProviderRoleMappingController.prototype, "getMany", null);
|
|
13251
13360
|
_ts_decorate$24([
|
|
13252
|
-
DGet("/:id", []),
|
|
13361
|
+
DGet("/:id", [ForceLoggedInMiddleware]),
|
|
13253
13362
|
_ts_param$22(0, DPath("id")),
|
|
13254
13363
|
_ts_param$22(1, DRequest()),
|
|
13255
13364
|
_ts_param$22(2, DResponse()),
|
|
@@ -13260,54 +13369,54 @@ _ts_decorate$24([
|
|
|
13260
13369
|
typeof Response === "undefined" ? Object : Response
|
|
13261
13370
|
]),
|
|
13262
13371
|
_ts_metadata$24("design:returntype", Promise)
|
|
13263
|
-
],
|
|
13372
|
+
], IdentityProviderRoleMappingController.prototype, "getOne", null);
|
|
13264
13373
|
_ts_decorate$24([
|
|
13265
|
-
DPost("
|
|
13266
|
-
_ts_param$22(0,
|
|
13267
|
-
_ts_param$22(1,
|
|
13268
|
-
_ts_param$22(2,
|
|
13269
|
-
_ts_param$22(3, DResponse()),
|
|
13374
|
+
DPost("", [ForceLoggedInMiddleware]),
|
|
13375
|
+
_ts_param$22(0, DBody()),
|
|
13376
|
+
_ts_param$22(1, DRequest()),
|
|
13377
|
+
_ts_param$22(2, DResponse()),
|
|
13270
13378
|
_ts_metadata$24("design:type", Function),
|
|
13271
13379
|
_ts_metadata$24("design:paramtypes", [
|
|
13272
|
-
|
|
13273
|
-
typeof NonNullable === "undefined" ? Object : NonNullable,
|
|
13380
|
+
Object,
|
|
13274
13381
|
typeof Request === "undefined" ? Object : Request,
|
|
13275
13382
|
typeof Response === "undefined" ? Object : Response
|
|
13276
13383
|
]),
|
|
13277
13384
|
_ts_metadata$24("design:returntype", Promise)
|
|
13278
|
-
],
|
|
13385
|
+
], IdentityProviderRoleMappingController.prototype, "add", null);
|
|
13279
13386
|
_ts_decorate$24([
|
|
13280
|
-
|
|
13387
|
+
DPost("/:id", [ForceLoggedInMiddleware]),
|
|
13281
13388
|
_ts_param$22(0, DPath("id")),
|
|
13282
|
-
_ts_param$22(1,
|
|
13283
|
-
_ts_param$22(2,
|
|
13389
|
+
_ts_param$22(1, DBody()),
|
|
13390
|
+
_ts_param$22(2, DRequest()),
|
|
13391
|
+
_ts_param$22(3, DResponse()),
|
|
13284
13392
|
_ts_metadata$24("design:type", Function),
|
|
13285
13393
|
_ts_metadata$24("design:paramtypes", [
|
|
13286
13394
|
String,
|
|
13395
|
+
Object,
|
|
13287
13396
|
typeof Request === "undefined" ? Object : Request,
|
|
13288
13397
|
typeof Response === "undefined" ? Object : Response
|
|
13289
13398
|
]),
|
|
13290
13399
|
_ts_metadata$24("design:returntype", Promise)
|
|
13291
|
-
],
|
|
13400
|
+
], IdentityProviderRoleMappingController.prototype, "edit", null);
|
|
13292
13401
|
_ts_decorate$24([
|
|
13293
|
-
|
|
13294
|
-
_ts_param$22(0,
|
|
13402
|
+
DDelete("/:id", [ForceLoggedInMiddleware]),
|
|
13403
|
+
_ts_param$22(0, DPath("id")),
|
|
13295
13404
|
_ts_param$22(1, DRequest()),
|
|
13296
13405
|
_ts_param$22(2, DResponse()),
|
|
13297
13406
|
_ts_metadata$24("design:type", Function),
|
|
13298
13407
|
_ts_metadata$24("design:paramtypes", [
|
|
13299
|
-
|
|
13408
|
+
String,
|
|
13300
13409
|
typeof Request === "undefined" ? Object : Request,
|
|
13301
13410
|
typeof Response === "undefined" ? Object : Response
|
|
13302
13411
|
]),
|
|
13303
13412
|
_ts_metadata$24("design:returntype", Promise)
|
|
13304
|
-
],
|
|
13305
|
-
|
|
13413
|
+
], IdentityProviderRoleMappingController.prototype, "drop", null);
|
|
13414
|
+
IdentityProviderRoleMappingController = _ts_decorate$24([
|
|
13306
13415
|
DTags("identity-provider"),
|
|
13307
13416
|
DController("/identity-provider-role-mappings"),
|
|
13308
13417
|
_ts_metadata$24("design:type", Function),
|
|
13309
|
-
_ts_metadata$24("design:paramtypes", [typeof
|
|
13310
|
-
],
|
|
13418
|
+
_ts_metadata$24("design:paramtypes", [typeof IdentityProviderRoleMappingControllerContext === "undefined" ? Object : IdentityProviderRoleMappingControllerContext])
|
|
13419
|
+
], IdentityProviderRoleMappingController);
|
|
13311
13420
|
//#endregion
|
|
13312
13421
|
//#region src/adapters/http/controllers/entities/permission/module.ts
|
|
13313
13422
|
function _ts_decorate$23(decorators, target, key, desc) {
|
|
@@ -13676,7 +13785,8 @@ var AuthorizeController = class {
|
|
|
13676
13785
|
constructor(ctx) {
|
|
13677
13786
|
this.options = ctx.options;
|
|
13678
13787
|
this.codeRequestVerifier = ctx.codeRequestVerifier;
|
|
13679
|
-
|
|
13788
|
+
const validator = new OAuth2AuthorizationCodeRequestValidator();
|
|
13789
|
+
this.codeRequestValidator = new RoutupContainerAdapter(validator);
|
|
13680
13790
|
this.authorizer = new HTTPOAuth2Authorizer({
|
|
13681
13791
|
codeRequestVerifier: this.codeRequestVerifier,
|
|
13682
13792
|
accessTokenIssuer: ctx.accessTokenIssuer,
|
|
@@ -14832,12 +14942,8 @@ function _ts_param$9(paramIndex, decorator) {
|
|
|
14832
14942
|
}
|
|
14833
14943
|
var RobotRoleController = class {
|
|
14834
14944
|
service;
|
|
14835
|
-
repository;
|
|
14836
|
-
identityPermissionProvider;
|
|
14837
14945
|
constructor(ctx) {
|
|
14838
14946
|
this.service = ctx.service;
|
|
14839
|
-
this.repository = ctx.repository;
|
|
14840
|
-
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
14841
14947
|
}
|
|
14842
14948
|
async getMany(req, res) {
|
|
14843
14949
|
const actor = buildActorContext(req);
|
|
@@ -14849,15 +14955,6 @@ var RobotRoleController = class {
|
|
|
14849
14955
|
}
|
|
14850
14956
|
async add(data, req, res) {
|
|
14851
14957
|
const actor = buildActorContext(req);
|
|
14852
|
-
await this.repository.validateJoinColumns(data);
|
|
14853
|
-
if (data.role) {
|
|
14854
|
-
const identity = useRequestIdentityOrFail(req);
|
|
14855
|
-
if (!await this.identityPermissionProvider.isSuperset(identity, {
|
|
14856
|
-
type: "role",
|
|
14857
|
-
id: data.role_id,
|
|
14858
|
-
clientId: data.role.client_id
|
|
14859
|
-
})) throw new ForbiddenError("You don't own the required permissions.");
|
|
14860
|
-
}
|
|
14861
14958
|
return sendCreated(res, await this.service.create(data, actor));
|
|
14862
14959
|
}
|
|
14863
14960
|
async getOne(id, req, res) {
|
|
@@ -16181,12 +16278,8 @@ function _ts_param(paramIndex, decorator) {
|
|
|
16181
16278
|
}
|
|
16182
16279
|
var UserRoleController = class {
|
|
16183
16280
|
service;
|
|
16184
|
-
repository;
|
|
16185
|
-
identityPermissionProvider;
|
|
16186
16281
|
constructor(ctx) {
|
|
16187
16282
|
this.service = ctx.service;
|
|
16188
|
-
this.repository = ctx.repository;
|
|
16189
|
-
this.identityPermissionProvider = ctx.identityPermissionProvider;
|
|
16190
16283
|
}
|
|
16191
16284
|
async getMany(req, res) {
|
|
16192
16285
|
const actor = buildActorContext(req);
|
|
@@ -16198,15 +16291,6 @@ var UserRoleController = class {
|
|
|
16198
16291
|
}
|
|
16199
16292
|
async add(data, req, res) {
|
|
16200
16293
|
const actor = buildActorContext(req);
|
|
16201
|
-
await this.repository.validateJoinColumns(data);
|
|
16202
|
-
if (data.role) {
|
|
16203
|
-
const identity = useRequestIdentityOrFail(req);
|
|
16204
|
-
if (!await this.identityPermissionProvider.isSuperset(identity, {
|
|
16205
|
-
type: "role",
|
|
16206
|
-
id: data.role_id,
|
|
16207
|
-
clientId: data.role.client_id
|
|
16208
|
-
})) throw new ForbiddenError("You don't own the required permissions.");
|
|
16209
|
-
}
|
|
16210
16294
|
return sendCreated(res, await this.service.create(data, actor));
|
|
16211
16295
|
}
|
|
16212
16296
|
async getOne(id, req, res) {
|
|
@@ -17481,12 +17565,10 @@ var HTTPControllerModule = class {
|
|
|
17481
17565
|
}) });
|
|
17482
17566
|
}
|
|
17483
17567
|
createClientRoleController(container) {
|
|
17484
|
-
|
|
17485
|
-
|
|
17486
|
-
service: new ClientRoleService({ repository }),
|
|
17487
|
-
repository,
|
|
17568
|
+
return new ClientRoleController({ service: new ClientRoleService({
|
|
17569
|
+
repository: new ClientRoleRepositoryAdapter(container.resolve(ClientRoleEntity)),
|
|
17488
17570
|
identityPermissionProvider: this.createIdentityPermissionProvider(container)
|
|
17489
|
-
});
|
|
17571
|
+
}) });
|
|
17490
17572
|
}
|
|
17491
17573
|
createClientScopeController(container) {
|
|
17492
17574
|
return new ClientScopeController({ service: new ClientScopeService({ repository: new ClientScopeRepositoryAdapter(container.resolve(ClientScopeEntity)) }) });
|
|
@@ -17498,12 +17580,10 @@ var HTTPControllerModule = class {
|
|
|
17498
17580
|
}) });
|
|
17499
17581
|
}
|
|
17500
17582
|
createRobotRoleController(container) {
|
|
17501
|
-
|
|
17502
|
-
|
|
17503
|
-
service: new RobotRoleService({ repository }),
|
|
17504
|
-
repository,
|
|
17583
|
+
return new RobotRoleController({ service: new RobotRoleService({
|
|
17584
|
+
repository: new RobotRoleRepositoryAdapter(container.resolve(RobotRoleEntity)),
|
|
17505
17585
|
identityPermissionProvider: this.createIdentityPermissionProvider(container)
|
|
17506
|
-
});
|
|
17586
|
+
}) });
|
|
17507
17587
|
}
|
|
17508
17588
|
createRoleAttributeController(container) {
|
|
17509
17589
|
return new RoleAttributeController({ service: new RoleAttributeService({ repository: new RoleAttributeRepositoryAdapter(container.resolve(RoleAttributeEntity)) }) });
|
|
@@ -17548,12 +17628,10 @@ var HTTPControllerModule = class {
|
|
|
17548
17628
|
}) });
|
|
17549
17629
|
}
|
|
17550
17630
|
createUserRoleController(container) {
|
|
17551
|
-
|
|
17552
|
-
|
|
17553
|
-
service: new UserRoleService({ repository }),
|
|
17554
|
-
repository,
|
|
17631
|
+
return new UserRoleController({ service: new UserRoleService({
|
|
17632
|
+
repository: new UserRoleRepositoryAdapter(container.resolve(UserRoleEntity)),
|
|
17555
17633
|
identityPermissionProvider: this.createIdentityPermissionProvider(container)
|
|
17556
|
-
});
|
|
17634
|
+
}) });
|
|
17557
17635
|
}
|
|
17558
17636
|
createPolicyController(container) {
|
|
17559
17637
|
const dataSource = container.resolve(DatabaseInjectionKey.DataSource);
|
|
@@ -17574,10 +17652,10 @@ var HTTPControllerModule = class {
|
|
|
17574
17652
|
});
|
|
17575
17653
|
}
|
|
17576
17654
|
createIdentityProviderRoleController(container) {
|
|
17577
|
-
return new
|
|
17655
|
+
return new IdentityProviderRoleMappingController({ service: new IdentityProviderRoleMappingService({
|
|
17578
17656
|
repository: new IdentityProviderRoleMappingRepositoryAdapter(container.resolve(IdentityProviderRoleMappingEntity)),
|
|
17579
17657
|
identityPermissionProvider: this.createIdentityPermissionProvider(container)
|
|
17580
|
-
});
|
|
17658
|
+
}) });
|
|
17581
17659
|
}
|
|
17582
17660
|
createJwkController(container) {
|
|
17583
17661
|
return new JwkController({ repository: container.resolve(DatabaseInjectionKey.DataSource).getRepository(KeyEntity) });
|
|
@@ -18463,6 +18541,6 @@ function defineCLIStartCommand() {
|
|
|
18463
18541
|
});
|
|
18464
18542
|
}
|
|
18465
18543
|
//#endregion
|
|
18466
|
-
export { RobotController as $,
|
|
18544
|
+
export { RobotController as $, CacheInjectionKey as $n, ClientEntity as $r, buildActorContext as $t, OAuth2InjectionToken as A, ClientRepositoryAdapter as An, ClientScopeSubscriber as Ar, registerAssetsMiddleware as At, ScopeController as B, useDataSourceSync as Bn, RolePermissionSubscriber as Br, HTTPOAuth2AuthorizeGrant as Bt, RobotIdentityRepository as C, PermissionDatabaseProvider as Cn, UserAttributeEntity as Cr, createSwaggerMiddleware as Ct, IdentityProviderAttributeMappingRepository as D, ClientScopeRepositoryAdapter as Dn, IdentityProviderAttributeSubscriber as Dr, registerErrorMiddleware as Dt, IdentityProviderPermissionMappingRepository as E, IdentityProviderRepositoryAdapter as En, IdentityProviderRepository as Er, createLoggerMiddleware as Et, UserPermissionRequestValidator as F, isDatabaseTypeSupported as Fn, ClientRepository as Fr, HTTPRobotCredentialsGrant as Ft, RolePermissionController as G, SessionRepository as Gn, ClientPermissionEntity as Gr, useRequestToken as Gt, PolicyAttributesValidator as H, DatabaseQueryResultCache as Hn, RoleAttributeEntity as Hr, HTTPOAuth2Authorizer as Ht, UserPermissionController as I, isDatabaseTypeSupportedForEnvironment as In, ClientRoleSubscriber as Ir, HTTPOAuth2RefreshTokenGrant as It, RoleController as J, readConfigRaw as Jn, PolicyAttributeSubscriber as Jr, getRequestParamID as Jt, RoleAttributeRequestValidator as K, CacheModule as Kn, PolicySubscriber as Kr, setRequestScopes as Kt, UserAttributeRequestValidator as L, DatabaseConflictError as Ln, ClientRoleEntity as Lr, HTTPPasswordGrant as Lt, createHttpServer as M, DatabaseModule as Mn, ScopeSubscriber as Mr, ForceLoggedInMiddleware as Mt, UserRoleRequestValidator as N, LoggerModule as Nn, ScopeEntity as Nr, createAuthorizationMiddleware as Nt, IdentityProviderAccountRepository as O, ClientRoleRepositoryAdapter as On, IdentityProviderAttributeEntity as Or, registerCorsMiddleware as Ot, UserRoleController as P, LoggerInjectionKey as Pn, ClientSubscriber as Pr, AuthorizationMiddleware as Pt, RobotPermissionController as Q, ModuleName as Qn, PermissionEntity as Qr, getRequestBodyRealmID as Qt, UserAttributeController as R, setDataSourceSync as Rn, RoleSubscriber as Rr, HTTPOAuth2IdentityGrantType as Rt, UserIdentityRepository as S, PolicyRepositoryAdapter as Sn, UserAttributeSubscriber as Sr, ClientController as St, IdentityProviderRoleMappingRepository as T, PermissionRepositoryAdapter as Tn, IdentityProviderSubscriber as Tr, registerPrometheusMiddleware as Tt, PolicyController as U, DatabaseInjectionKey as Un, RoleEntity as Ur, RequestPermissionEvaluator as Ut, PolicyValidator$1 as V, DataSourceOptionsBuilder as Vn, RolePermissionEntity as Vr, guessOauth2GrantTypeByRequest as Vt, RolePermissionRequestValidator as W, AuthenticationModule as Wn, ClientPermissionSubscriber as Wr, setRequestToken as Wt, RobotRoleController as X, ConfigEnvironmentVariableName as Xn, PolicyEntity as Xr, getRequestStringParamOrFail as Xt, RobotRoleRequestValidator as Y, normalizeConfig as Yn, PolicyAttributeEntity as Yr, getRequestStringParam as Yt, RobotPermissionRequestValidator as Z, ConfigInjectionKey as Zn, PermissionSubscriber as Zr, useRequestParamID as Zt, MailInjectionKey as _, RoleAttributeRepositoryAdapter as _n, UserRepository as _r, ClientScopeController as _t, defineCLISwaggerCommand as a, AuthenticationInjectionKey as ai, setRequestPermissionEvaluator as an, RobotPermissionSubscriber as ar, PasswordForgotController as at, LdapModule as b, RobotPermissionRepositoryAdapter as bn, UserPermissionSubscriber as br, ClientPermissionRequestValidator as bt, ApplicationBuilder as c, HTTPInjectionKey as cn, RobotRoleEntity as cr, getJwkRouteHandler as ct, ProvisionerModule as d, UserRoleRepositoryAdapter as dn, IdentityProviderRoleMappingEntity as dr, ActivateController as dt, KeyEntity as ei, RequestIdentity as en, RoleAttributeSubscriber as er, RealmController as et, FileProvisioningSource as f, UserPermissionRepositoryAdapter as fn, IdentityProviderPermissionMappingEntity as fr, PermissionPolicyController as ft, MailModule as g, RolePermissionRepositoryAdapter as gn, UserSubscriber as gr, ClientScopeRequestValidator as gt, HTTPModule as h, ScopeRepositoryAdapter as hn, IdentityProviderAccountEntity as hr, IdentityProviderController as ht, defineCLIHealthCheckCommand as i, RealmEntity as ii, useRequestIdentityOrFail as in, RobotRepository as ir, PasswordResetController as it, Swagger as j, RealmRepositoryAdapter as jn, ClientScopeEntity as jr, ForceUserLoggedInMiddleware as jt, IdentityInjectionKey as k, ClientPermissionRepositoryAdapter as kn, IdentityProviderEntity as kr, registerBasicMiddleware as kt, SwaggerModule as l, ComponentsModule as ln, RobotEntity as lr, getJwksRouteHandler as lt, DefaultProvisioningSource as m, UserRepositoryAdapter as mn, IdentityProviderAccountSubscriber as mr, IdentityProviderRoleMappingController as mt, defineCLIResetCommand as n, CachePrefix as ni, setRequestIdentity as nn, SessionEntity as nr, StatusController as nt, Application$1 as o, useRequestPermissionEvaluator as on, RobotPermissionEntity as or, OpenIDController as ot, CompositeProvisioningSource as p, UserAttributeRepositoryAdapter as pn, IdentityProviderAttributeMappingEntity as pr, PermissionController as pt, RoleAttributeController as q, ConfigModule as qn, PolicyRepository as qr, useRequestScopes as qt, defineCLIMigrationCommand as r, RealmRepository as ri, useRequestIdentity as rn, RobotSubscriber as rr, RegisterController as rt, createApplication as s, RequestHandlerOperation as sn, RobotRoleSubscriber as sr, JwkController as st, defineCLIStartCommand as t, RealmSubscriber as ti, isRequestIdentityMasterRealmMember as tn, PermissionPolicyEntity as tr, TokenController as tt, RuntimeModule as u, IdentityProviderRoleMappingRepositoryAdapter as un, IdentityProviderRoleSubscriber as ur, AuthorizeController as ut, OAuth2Module as v, RoleRepositoryAdapter as vn, UserRoleSubscriber as vr, ClientRoleController as vt, ClientIdentityRepository as w, PermissionPolicyRepositoryAdapter as wn, UserEntity as wr, registerRateLimitMiddleware as wt, LDAPInjectionKey as x, RobotRepositoryAdapter as xn, UserPermissionEntity as xr, ClientPermissionController as xt, IdentityModule as y, RobotRoleRepositoryAdapter as yn, UserRoleEntity as yr, ClientRoleRequestValidator as yt, UserController as z, unsetDataSourceSync as zn, RoleRepository as zr, HTTPClientCredentialsGrant as zt };
|
|
18467
18545
|
|
|
18468
|
-
//# sourceMappingURL=commands-
|
|
18546
|
+
//# sourceMappingURL=commands-D5p6u-xJ.mjs.map
|