Skip to content

AppRoleBuilder

Configures an App Role that principals are assigned across the whole App.

readonly extends: AppRoleBuilder[]

App Roles this Role extends directly, in the order they were added.


readonly prn: string

Platform Resource Name of the declared resource, derived from the App key and resource key.

BaseRoleBuilder.prn

extend(role): BaseRoleBuilder

Makes this Role act as the given App Role wherever that Role is checked.

BaseRoleBuilder

App Role to extend.

BaseRoleBuilder

This builder for chaining.

Extension is transitive: the emitted Definition lists every Role reachable through extend, and a principal holding this Role passes checks for all of them.

When extending role would create a cycle.

Administrators are also users

const userRole = app.addRole('user', { label: 'User' });
const adminRole = app.addRole('admin', { label: 'Admin' });
adminRole.extend(userRole);

setDescription(description): this

Sets the description emitted into the definition and rendered in generated reference and application assets.

string

Human-readable description of the resource.

this

This builder for chaining.

BaseRoleBuilder.setDescription


toDefinition(): AppRoleDefinition

Emits the Role Definition, including the flattened list of extended Role PRNs.

AppRoleDefinition