Skip to main content
Version: Next

Identity and access

Say who signs in where, and with which role.

People​

People come into a model as identities and roles, never as individuals. A component or a monolith marked idp is an identity provider, such as Entra ID or Keycloak; it is a component in every other respect. An identity sits in its provider; a role sits in the application people use through it, a component or a monolith holding a user interface of its own, and names its provider. An application nobody signs into, such as a public site, a local tool or a kiosk, is marked anonymous instead and holds no role.

Each identity and each role has one persona:

Persona
employeeInternal
freelancerInternal
customerExternal
b2b-representativeExternal
auditorExternal

A role's holders are computed: every identity of its persona in its provider. You never assign one, so a role can't be held by the wrong people, and a role whose provider has no identity of its persona is an error (KQ042). A role uses its application's user interfaces, also without a statement; where it uses only some of them, it says which with ui (clerk -> desktop over ui), and then uses those only. A role's ui stays in its own application (KQ085). An identity no role uses is fine: a directory exists before any application signs in through it. The IAM view draws identities and roles; the other views leave them out.

A job role is a position in the organization, a mechanic or a claims handler, and holds the roles a person in it gets in each application. It sits in its ecosystem, never in a domain, has an internal persona, and is the lane of a business process. Nothing assigns a person to it. See Job roles.

Workloads​

A service has an identity of its own, as people do. A workload identity is a workload's identity at an identity provider: a managed identity, an app registration or a service account. A client workload identity is what the workload signs in as; it holds its credential (a secret or a certificate kept in a vault, a federated token from an outside issuer, or managed by the platform) and is granted roles. A server workload identity is what an API is known as, and declares the roles a client may be granted: an app role, for one service calling another as itself, or a scope, for a service calling on behalf of a user.

A workload identity sits in the component or monolith whose identity it is, or in a platform when several components share it. A grant is written on the client, and a role it names that the server doesn't declare is created. See Workload identities and grants.

Identity providers, identities and roles​

People are modeled where your landscape knows them: as accounts in an identity provider, and as the roles those accounts have in the applications they use. A model never names a person.

platform iam "Identity" { component staff-idp "Staff directory" : saas idp technology "Entra ID" { identity staff "Staff" : employee identity contractors "Contractors" : freelancer } component customer-idp "Customer identity" : saas idp technology "Azure AD B2C" { identity customers "Customers" : customer } } platform internet-banking "Internet Banking" { component web-app "Web Application" : user-facing-app technology "Java and Spring MVC" { spa web-ui "Internet Banking" role account-holder "Account holder" in iam/customer-idp : customer } } monolith mainframe "Mainframe Banking System" : custom idp { identity operators "Operators" : employee desktop-app terminal "Terminal" role back-office "Back office" in mainframe : employee }
  • idp after a component's or a monolith's kind, before technology, marks it an identity provider: Entra ID, Keycloak, a mainframe's own user store.
  • anonymous in the same place says nobody signs into the application: a public site, a local tool such as VS Code or a command line, a kiosk. It holds no role and is never an identity provider. Leave it off where the roles just aren't written yet.
  • bounded-context, last on the line, after technology and before big-ball-of-mud, marks a component a bounded context of its own. A platform takes it after its name, a monolith after its kind and its marks, and a module after its kind and technology: module billing "Billing" : grouping bounded-context. Contexts don't nest, so no component may be in two (KQ095).
  • identity <code> "<name>" : <persona> is a population of accounts of one persona, written inside its identity provider.
  • role <code> "<name>" in <provider> : <persona> is an app role, written inside the application people use, a component or a monolith with a user interface of its own. in names the identity provider, looked up from the platform or monolith the role is in, and may reach another platform or ecosystem. A monolith that keeps its own accounts names itself.
  • A persona is one of employee, freelancer (internal), customer, b2b-representative or auditor (external). An internal auditor is an employee. Every persona is a reserved word, so a Code that is one is written with an @, such as @customer.
  • Who holds a role is not written. It is every identity of the role's persona in the provider it names. What a role uses is not written either: the user interfaces of the application it is in.

Job roles​

A job role is a position in your organization: a mechanic, a claims handler, a controller. It says why people have the access they have, and it is the lane of a business process. It never names a person.

ecosystem bikes { /// Repairs bikes in the workshop and takes the parts from stock. job-role mechanic "Mechanic" : employee { holds workshop/app/mechanic holds stock/app/picker } }
  • job-role <code> "<name>" : <persona> is written in an ecosystem, never in a domain: a position works across domains. Its persona is employee or freelancer; a customer or a partner is not a position (KQ233).
  • holds <path> names a role a person in that position gets in one application. The path may reach another ecosystem, and names a role only. The role's persona is the job role's (KQ234).
  • A job role that holds nothing is fine: a position is real before its access is written. Once an ecosystem has a job role, a role of an internal persona that no job role holds is reported, as access no position explains (KQ120).

Workload identities and grants​

A service signs in as itself, with an identity of its own at an identity provider: a workload identity. Write it in the component or monolith whose identity it is.

platform iam "Identity" { component platform-idp "Platform identity" : saas idp technology "Entra ID" vault secrets "Secrets" : azure.key-vault environment PRD x1 } platform payments "Payments" { component payments "Payments" : backend { workload payments-api "Payments API" : server in iam/platform-idp { app-role write "Payments.Write" scope read "Payments.Read" } } } platform orders "Orders" { component orders "Orders" : backend { workload orders-app "Orders" : client in iam/platform-idp { environment PRD credential secret stored-in iam/secrets rotate P90D } } orders -> payments/payments/api over http auth client-credentials via iam/platform-idp grant write orders -> iam/secrets over http }
LineMeans
workload <code> "<name>" : client in <provider>What the service signs in as. in names the identity provider, as a role's does
workload <code> "<name>" : server in <provider>What an API is known as, declaring the roles a client may be granted
app-role <code> "<value>"A role for a service calling as itself; the value is what its token carries
scope <code> "<value>"A role for a service calling on behalf of a user
credential secret stored-in <vault> rotate P90DA secret the service keeps, in a vault, replaced every 90 days. certificate works the same way
credential federated from <issuer> subject "<subject>"No secret: the service trades a token from an outside issuer, such as a CI pipeline's, marked idp
credential managedNo secret: the platform the service runs on holds it
environment <stage>The stage it's registered in
used-by <identity> because "<reason>"People sign in as it. Always a warning, so say why

stored-in names a vault, an element of its own (see Writing infrastructure), never a component.

A credential is part of its workload identity's declaration. To change it in a later plateau, or keep it in another vault, declare the workload identity again there with its credential line; declared again without one, it has none from there on.

A grant gives a client one role. Write it on the call, after the scheme: grant write names a role of the server workload identity of the component the call lands on, and grant "Storage Blob Data Reader" a role the cloud defines on it. For a grant with no call, write it in the client's block: grant payments/payments/payments-api/write, or grant "Contributor" on payments/payments for a deployment right. A role the server doesn't declare is created for you, like an interface a call names, and kept in <name>.g.kq.

A shared workload identity goes in a platform, and a component that runs as it says so with runs-as iam/shared.

Authentication​

Say how the caller proves who it is with auth after the transport, and which identity provider issues its token with via. Both are optional; leave auth out and nothing is said, which is not the same as auth none, saying on purpose that nobody is checked.

portal-bff -> orders/api over http/json auth user-token via iam/customer-idp orders -> payments/api over http auth on-behalf-of via iam/customer-idp orders -> stripe/api over http auth key orders -> events/orders auth workload-identity orders -> billing over events/orders sender-auth workload-identity receiver-auth key
SchemeUse it for
noneNobody is checked: a public endpoint, an open relay, an anonymous bind
keyA secret the caller stores: a password, an API or subscription key, a SAS token, a connection string, a signed webhook, an SNMP community string
certificateA key pair the caller holds: a client certificate (mTLS), an SSH key
client-credentialsThe application's own OAuth 2.0 or OIDC token
workload-identityA token the platform obtains for the caller, with no secret in its configuration: a managed identity, an IAM role, a cloud service account
user-tokenThe signed-in user's token, passed on unchanged: a bearer token, a session cookie from a user interface to its BFF
on-behalf-ofA token the caller gets for itself by exchanging the user's token and its own credential, still carrying the user: the on-behalf-of flow, a token exchange
kerberosWindows integrated authentication: Kerberos, NTLM, Negotiate

Schemes are named by how the credential works, never by product: a managed identity in Azure and an IAM role in AWS are both workload-identity, and a password and an API key are both key.

Each transport takes the schemes it can carry. A scheme the transport doesn't accept is an error (KQ060):

TransportAccepts
http, graphqlevery scheme
grpc, web-socket, signal-revery scheme but kerberos
ldapnone, key, certificate, kerberos
email, as a protocol or a brokernone, key, client-credentials, workload-identity
snmpkey
kafkanone, key, certificate, client-credentials, workload-identity, kerberos
rabbitmq, activemq, mqttnone, key, certificate, client-credentials
redis-pub-sub, redis-streamsnone, key, certificate, client-credentials, workload-identity
azure.service-bus.queues, azure.service-bus.topics, azure.event-hubs, azure.event-grid, azure.storage-queue, sms, push, a blob-storage channelkey, client-credentials, workload-identity
a file-share channelkey, workload-identity, kerberos
an sftp channelkey, certificate
in-processnothing: there is nobody to authenticate to
ipcnothing: who may open a local channel is the operating system's business
rpa.queuesnothing: the queues are the RPA product's own

Every other provider's broker word, such as aws.sqs, accepts the schemes listed for it in Kanoniq's registry.

via goes only with a token: client-credentials, workload-identity, user-token, on-behalf-of or kerberos. It names a component or monolith marked idp, by its path as a role's in does, and may reach into another platform or ecosystem. Leave it out when the provider is a partner's or a cloud's and not in your model.

A path into a broker is two arrows, so it states two schemes: sender-auth for the sender's credential at the broker, then receiver-auth for the receiver's, each with its own via. A plain auth there is an error, and so are sender-auth and receiver-auth on a single arrow. On a one-sided leg such as orders -> events/orders, auth is that component's credential at the broker. Where two statements mean the same leg, it takes the scheme either states; two different ones are an error (KQ063).

user-token or on-behalf-of? If the service passes the user's token along as it is, that's user-token. If it trades the user's token for one of its own, issued to it for the downstream API, that's on-behalf-of: the downstream API still sees the user, and the service needs its own credential to make the exchange.

Reference​

The element types, relationships and kinds of this area, each with what it means.

Element types

Element typeWhat it is
IdentityAn Identity is a population of accounts of one persona in one Identity Provider, such as the staff in the corporate directory. An Identity's parent is its Identity Provider.
RoleA Role is an app role: the capacity in which accounts use one user-facing application. A Role sits in that application, has one persona, and is held by every Identity of its persona in the Identity Provider it names.
Workload IdentityA Workload Identity is a workload's identity at an Identity Provider, such as a managed identity, an app registration or a service account. A Workload Identity sits in the Component or Monolith whose identity it is, or in a Platform when several Components share it.
PermissionA Permission is a role a server Workload Identity declares, which a client Workload Identity may be granted. A Permission's name is the value its token carries.
Job RoleA Job Role is a position in the organization, such as Mechanic or Claims handler: who does the work, and why a person has the access they have. A Job Role sits in its Ecosystem, has one internal persona, and holds app Roles.

Relationships

RelationshipWhat it says
GrantA Grant assigns one role to one client Workload Identity: a Permission of a server Workload Identity, or a role the cloud defines on a resource.
Runs AsA Runs As says a Component or Monolith runs as a Workload Identity it does not own, or as a person's Identity, which validation reports.
Used ByA Used By says people sign in as a Workload Identity, with the reason. Validation always reports it.
HoldsA Holds says a Job Role is granted an app Role: what a person in that position can do in one application.

Persona: A persona: a kind of person, never an individual. A persona is the kind of an Identity and of a Role, and is internal or external by what it is.

ValueMeans
employeeA person employed by the organization, an internal persona. An internal auditor is an Employee.
freelancerA freelancer working for the organization, an internal persona.
customerA customer of the organization, an external persona.
b2b-representativeA person representing a business partner, an external persona.
auditorAn external auditor, an external persona.

Workload identity kind: A Workload Identity's kind: whether a workload signs in as the Workload Identity, or an API is known by it.

ValueMeans
clientA client Workload Identity: what a workload signs in as. A client Workload Identity holds its credential and is granted roles.
serverA server Workload Identity: what an API is known as. A server Workload Identity declares the Permissions a client may be granted.

Permission kind: A Permission's kind: an application permission or a delegated one.

ValueMeans
app-roleAn application permission, for calls from one workload to another with no user involved.
scopeA delegated permission, for calls made on behalf of a signed-in user.

Credential kind: How a client Workload Identity's credential is held. The kind decides which authentication schemes the credential carries.

ValueMeans
secretA client secret. A Secret credential carries the client-credentials, key and on-behalf-of schemes.
certificateA certificate. A Certificate credential carries the client-credentials, certificate and on-behalf-of schemes.
federatedA trust in a token another Identity Provider issues. A Federated credential carries the workload-identity, client-credentials and on-behalf-of schemes.
managedA managed identity, whose credential the platform the workload runs on holds. A Managed credential carries the workload-identity scheme only.

© 2026 Extenza Works. All rights reserved.