Portal Community

The Three-Layer Model

Layer 1 — Roles

Named collections of permissions. Users are assigned roles. Roles can be system-defined (Admin, Manager, User, Viewer) or tenant-custom. Role membership is resolved by IMembershipProvider.

Layer 2 — Permission Sets

Logical groupings of permission strings associated with a role. For example, the manager role includes the workflow permission set: workflow.design, workflow.initiate, workflow.view.

Layer 3 — Permissions

Atomic capability strings in dot-notation format (resource.action). Resolved by IPermissionProvider. These are the actual values checked at runtime by services and nodes.

IAM Provider Architecture

The IAM system is provider-agnostic. All identity providers implement the same six interfaces, allowing seamless operation whether Passport, Azure AD, Okta, or AWS Cognito backs the identity store.

// The 6 provider interfaces — all IAM providers implement these
namespace BizFirst.Ai.ProcessSecurity.Extended.Domain.Interfaces;

public interface IIdentityProvider      // JWT → IdentityClaims
public interface IMembershipProvider    // userId → group/role IDs
public interface IUserDirectoryProvider // search/get users
public interface IRoleDirectoryProvider // search/get roles
public interface IPermissionProvider    // userId → permission strings
public interface IAccessDecisionProvider// userId + nodeId → allow?
ProviderIdentity SourceRole SourcePermission Source
BizFirst PassportJWT "sub" claimSQL IAM_UserRolesJWT "permissions" claim or SQL
Azure AD / Entra IDJWT "oid" claimJWT "groups" or Graph APIApp roles in JWT
OktaJWT "sub" claimJWT "groups" claimOkta groups or JWT custom claims
AWS CognitoJWT "sub" claimJWT "cognito:groups"JWT custom attributes

Policy Evaluation Engine

Every permission check flows through IIAMPolicyEngine. The engine evaluates in this order:

1

Resolve Identity

IIdentityProvider.ResolveIdentityAsync(token) — extract UserId, TenantId, Email from the JWT without signature re-validation (upstream middleware already validated it).

2

Resolve Roles

IMembershipProvider.GetUserGroupsAsync() — returns the user's role IDs. For Passport: SQL query on IAM_UserRoles. For Azure AD: JWT "groups" claim or Microsoft Graph API call.

3

Resolve Permissions

IPermissionProvider.GetUserPermissionsAsync() — returns explicit permission strings. For most providers, these come from the JWT "permissions" claim.

4

Evaluate Policy

For each role: look up the permission set. Check if the requested permission string is in the set. Apply resource-level policy overrides. Deny by default — explicit allow required.

5

Access Decision

IAccessDecisionProvider.CanUserAccessAsync() — optional final gate. Returns null (no opinion), true (allow), or false (deny). A false overrides all previous allows.

Built-In Roles Summary

RoleLevelTypical Permissions
adminSystemAll permissions — full tenant management, IAM administration
managerSystemWorkflow design and execution, form management, team user management
userSystemWorkflow initiation, form submission, read-only access to assigned resources
viewerSystemRead-only access to workflows and forms — no execution or modification
IAM Is Provider-Independent

The BizFirstGO IAM model works identically whether you are using Passport's native identity, Azure AD, Okta, or a custom provider. The permission evaluation logic lives in IIAMPolicyEngine — not in the identity provider. External roles are mapped to BizFirstGO's permission model at the provider level.