[Design Discussion] Improve and Resolve User/Agent Type Handling #5526
ThaminduDilshan
started this conversation in
Design
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Related Feature Issue
#5436
Problem Summary
Main Problem
Currently user and agent types are first class, so everything that references an attribute has to be type aware. Even so, a deployment that doesn't need several user or agent types stil sees the same complexity.
Also some places don't qualify the type today.
Related Concerns
PermitsSubject).High-Level Approach
Entity types:
Flow:
Allowed type validation:
allowedUserTypesproperty at the node level. It will not have any meaning when the allowed type is moved to the flow level.Application and agent:
Console:
Migration Impact
flow.ref, change from a flow id to a flow handle.UserTypeResolver's node levelallowedUserTypesis removed. Its value narrows the migrated flow's list.Architecture Overview
1. Entity Types
Types are referenced by name today; the application's allowed lists, connection mappings, the subject attribute map, node properties and each user record. Renaming one breaks all of them (#5329).
handleis immutable.handlewill have the same format constraints as other handles in the system (e.g., lowercase, hyphen-separated).namebecomesdisplayNameis open, see question 1.nameis unique within its category today (UNIQUE (NAME, CATEGORY, DEPLOYMENT_ID)), so a user type and an agent type can share a name. Two choices forhandle:F. Unique within its category (recommended)
nametoday, so migration derives handles without clashes.G. Unique across the deployment
2. Flow
2.1 Allowed Types
AllowedUserTypesandAllowedAgentTypesin the application will be moved to the flow level, either as separate fields per category or as a single field keyed by category.H. A field per category
I. One field keyed by category (recommended)
Per flow type:
AUTHENTICATIONCUSTOMADMINISTRATIONUserTypeResolver,ProvisioningExecutor,OUExecutor,AttributeUniquenessValidator), or when it prompts for an attribute.ExecutorMetacan flag those executors, next toSupportedFlowTypes.2.2 Flow References
authFlowId, and takesauthFlowHandleonly at import. A CALL node'sflow.refis a flow id, including in the bootstrap resources.2.3 Organization Unit Default Flow
authFlowId,registrationFlowId,recoveryFlowIdand so on).2.4 Full Example, with I
Type values are type handles, and
flow.refis a flow handle.3. Flow Validation
When a flow calls another, the calling flow's list must cover the called flow's list, whatever the flow types. Ex: an
AUTHENTICATIONflow calling aCUSTOMone, or aCUSTOMflow calling anAUTHENTICATIONone. There's no runtime inference.Ex:
customer-experienceallows customer and employee, and calls three flows.employee-signuprecoverypartner-signupcustomer-experiencedoesn't allow partneremployee-signupa customer can't register, even though the caller allows customers.GetReachableCallTargetsalready walks the chain and visits each flow once, so a cycle doesn't loop. In a cycle every flow ends up with the same list.Changing a flow's types:
4. Allowed Type Validation at Runtime
checkSubjectAllowedin the authn provider manager already rejects an agent whose type isn't allowed, right after a provider resolves the subject.PermitsSubjectreturns true for every user. The change is to check user types there as well.UserTypeResolverworks in any flow, not only registration. It resolves or prompts for one type from the flow's list, and the picked type narrows the check to that one type. Same for an agent type resolver when there is one.OUExecutorandProvisioningExecutorread the running flow's list where they read the application's today.5. Application
Covers users and agents signing in to the application.
flowis the flow's handle. NoallowedUserTypesorallowedAgentTypes.5.1 Token Configuration
Two shapes for the per type lists:
J. One map keyed by type
K. Keyed by category, then type (recommended)
allowedTypesin I.With one category and one type, the tab is the flat list as today, stored under that type.
With several user types, it's D or E from the earlier comment, yet to be picked.
With agents allowed as well, two ways to separate them.
L. Both categories in the type selector
M. Issued to first, then the type (recommended)
For E, L adds the agent types as extra columns, and M shows a matrix per category.
5.2 Full Example, with I and K
clientConfigis the application's own token from client credentials. There's no signed in user or agent, so it stays flat. Same for an agent's own token.scopeClaimsfollows the same shape, as noted under Next in the earlier comment.6. Agent
Covers users and agents signing in through the agent, which is delegated mode. In client credentials mode the agent runs no flow, and its own token config stays flat.
flow, no allowed lists, and token config per K.Today the Tokens tab lists Agent and User under "Issued to", in delegated mode. With M it becomes This agent, Users and Agents, and Users gets the type selector.
7. Configuration Experience
7.1 Flow Onboarding
P. On the details step
Q. An access step before the template
R. Same as Q, in one step (recommended)
7.2 Flow Configuration
7.3 Application Onboarding
The user type block on the details step goes away, and with it the default of selecting every type. The type owned by the application's organization unit is preselected, else the first one.
S. Only when a flow is generated, on the security step
T. Always, on an access step before security (recommended)
7.4 Application Access Tab
7.5 Agent Access Tab
N. On the Flows tab
O. On the Access tab, as for applications
Security Considerations
Impacted Areas
handle, and every reference to a typeUserTypeResolver,OUExecutor,ProvisioningExecutorAlternatives Considered
N/A. Each decision lists its options by letter, with one marked recommended.
Questions for Community Input
Should
nameon user and agent types becomedisplayName? An earlier discussion agreed on an immutable handle and adisplayNamefor every resource. For types it's a breaking change with a migration.U. Rename
nametodisplayNamename.V. Accept both
nameanddisplayNameas the display nameShould flow references refer by handle instead of the ID? Breaking change wil be the concern, but anyway we'll have to do it in certain places to address the overall concern.
Should the agent access tab be merged with the application access tab?
Should entity type handle be unique across all entity types or only within its category?
All reactions