interface AccessControlBehavior {
    [reference]: Datasource<StateType>;
    agent: Agent;
    cluster: never;
    context: ActionContext;
    endpoint: Endpoint<Empty>;
    env: Environment;
    events: EventEmitter & Omit<Events, never> & {
        accessControlEntriesPerFabric$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
        acl$Changing: ClusterEvents.AttributeObservable<WritableFabricScopedAttribute<TypeFromFields<{
            authMode: FieldType<AccessControl.AccessControlEntryAuthMode>;
            fabricIndex: FieldType<FabricIndex>;
            privilege: FieldType<AccessControl.AccessControlEntryPrivilege>;
            subjects: FieldType<null | NodeId[]>;
            targets: FieldType<null | TypeFromFields<(...)>[]>;
        }>[], any>>;
        subjectsPerAccessControlEntry$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
        targetsPerAccessControlEntry$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    } & {
        extension$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableFabricScopedAttribute<TypeFromFields<{
            data: FieldType<Uint8Array>;
            fabricIndex: FieldType<FabricIndex>;
        }>[], any>>;
    } & {
        accessControlEntriesPerFabric$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
        acl$Changed: ClusterEvents.AttributeObservable<WritableFabricScopedAttribute<TypeFromFields<{
            authMode: FieldType<AccessControl.AccessControlEntryAuthMode>;
            fabricIndex: FieldType<FabricIndex>;
            privilege: FieldType<AccessControl.AccessControlEntryPrivilege>;
            subjects: FieldType<null | NodeId[]>;
            targets: FieldType<null | TypeFromFields<(...)>[]>;
        }>[], any>>;
        subjectsPerAccessControlEntry$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
        targetsPerAccessControlEntry$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    } & {
        extension$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableFabricScopedAttribute<TypeFromFields<{
            data: FieldType<Uint8Array>;
            fabricIndex: FieldType<FabricIndex>;
        }>[], any>>;
    } & {
        accessControlEntryChanged: ClusterEvents.EventObservable<Event<TypeFromFields<{
            adminNodeId: FieldType<null | NodeId>;
            adminPasscodeId: FieldType<null | number>;
            changeType: FieldType<AccessControl.ChangeType>;
            fabricIndex: FieldType<FabricIndex>;
            latestValue: FieldType<null | TypeFromFields<{
                authMode: FieldType<(...)>;
                fabricIndex: FieldType<(...)>;
                privilege: FieldType<(...)>;
                subjects: FieldType<(...)>;
                targets: FieldType<(...)>;
            }>>;
        }>, any>>;
        accessControlExtensionChanged: ClusterEvents.EventObservable<Event<TypeFromFields<{
            adminNodeId: FieldType<null | NodeId>;
            adminPasscodeId: FieldType<null | number>;
            changeType: FieldType<AccessControl.ChangeType>;
            fabricIndex: FieldType<FabricIndex>;
            latestValue: FieldType<null | TypeFromFields<{
                data: FieldType<(...)>;
                fabricIndex: FieldType<(...)>;
            }>>;
        }>, any>>;
    } & {};
    features: TypeFromBitSchema<{}>;
    session: SecureSession;
    state: Omit<{}, never> & {
        acl: TypeFromFields<{
            authMode: FieldType<AccessControl.AccessControlEntryAuthMode>;
            fabricIndex: FieldType<FabricIndex>;
            privilege: FieldType<AccessControl.AccessControlEntryPrivilege>;
            subjects: FieldType<null | NodeId[]>;
            targets: FieldType<null | TypeFromFields<{
                cluster: FieldType<(...)>;
                deviceType: FieldType<(...)>;
                endpoint: FieldType<(...)>;
            }>[]>;
        }>[];
    } & {
        extension?: TypeFromFields<{
            data: FieldType<Uint8Array>;
            fabricIndex: FieldType<FabricIndex>;
        }>[];
    } & {
        accessControlEntriesPerFabric: number;
        subjectsPerAccessControlEntry: number;
        targetsPerAccessControlEntry: number;
    } & {};
    [asyncDispose](): MaybePromise;
    asAdmin(fn: (() => void)): void;
    assertAttributeEnabled<This, K>(this: This, attributeName: K): void;
    callback<A, R>(reactor: Reactor<A, R>, options?: Reactor.Options): ((...args: A) => undefined | R);
    initialize(_options?: {}): MaybePromise;
    reactTo<O>(observable: O, reactor: Reactor<Parameters<O["emit"]>, ReturnType<O["emit"]>>, options?: Reactor.Options): void;
    requireAttributeEnabled<This, K>(this: This, attributeName: K): Exclude<This["state"][K], undefined>;
    toString(): string;
    State: any;
}

Hierarchy (view full)

Properties

[reference]: Datasource<StateType>
agent: Agent
cluster: never

The implemented cluster.

context: ActionContext
endpoint: Endpoint<Empty>
events: EventEmitter & Omit<Events, never> & {
    accessControlEntriesPerFabric$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    acl$Changing: ClusterEvents.AttributeObservable<WritableFabricScopedAttribute<TypeFromFields<{
        authMode: FieldType<AccessControl.AccessControlEntryAuthMode>;
        fabricIndex: FieldType<FabricIndex>;
        privilege: FieldType<AccessControl.AccessControlEntryPrivilege>;
        subjects: FieldType<null | NodeId[]>;
        targets: FieldType<null | TypeFromFields<(...)>[]>;
    }>[], any>>;
    subjectsPerAccessControlEntry$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    targetsPerAccessControlEntry$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {
    extension$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableFabricScopedAttribute<TypeFromFields<{
        data: FieldType<Uint8Array>;
        fabricIndex: FieldType<FabricIndex>;
    }>[], any>>;
} & {
    accessControlEntriesPerFabric$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    acl$Changed: ClusterEvents.AttributeObservable<WritableFabricScopedAttribute<TypeFromFields<{
        authMode: FieldType<AccessControl.AccessControlEntryAuthMode>;
        fabricIndex: FieldType<FabricIndex>;
        privilege: FieldType<AccessControl.AccessControlEntryPrivilege>;
        subjects: FieldType<null | NodeId[]>;
        targets: FieldType<null | TypeFromFields<(...)>[]>;
    }>[], any>>;
    subjectsPerAccessControlEntry$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    targetsPerAccessControlEntry$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {
    extension$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableFabricScopedAttribute<TypeFromFields<{
        data: FieldType<Uint8Array>;
        fabricIndex: FieldType<FabricIndex>;
    }>[], any>>;
} & {
    accessControlEntryChanged: ClusterEvents.EventObservable<Event<TypeFromFields<{
        adminNodeId: FieldType<null | NodeId>;
        adminPasscodeId: FieldType<null | number>;
        changeType: FieldType<AccessControl.ChangeType>;
        fabricIndex: FieldType<FabricIndex>;
        latestValue: FieldType<null | TypeFromFields<{
            authMode: FieldType<(...)>;
            fabricIndex: FieldType<(...)>;
            privilege: FieldType<(...)>;
            subjects: FieldType<(...)>;
            targets: FieldType<(...)>;
        }>>;
    }>, any>>;
    accessControlExtensionChanged: ClusterEvents.EventObservable<Event<TypeFromFields<{
        adminNodeId: FieldType<null | NodeId>;
        adminPasscodeId: FieldType<null | number>;
        changeType: FieldType<AccessControl.ChangeType>;
        fabricIndex: FieldType<FabricIndex>;
        latestValue: FieldType<null | TypeFromFields<{
            data: FieldType<(...)>;
            fabricIndex: FieldType<(...)>;
        }>>;
    }>, any>>;
} & {}

Access the behavior's events.

Type declaration

  • ReadonlyaccessControlEntryChanged: ClusterEvents.EventObservable<Event<TypeFromFields<{
        adminNodeId: FieldType<null | NodeId>;
        adminPasscodeId: FieldType<null | number>;
        changeType: FieldType<AccessControl.ChangeType>;
        fabricIndex: FieldType<FabricIndex>;
        latestValue: FieldType<null | TypeFromFields<{
            authMode: FieldType<(...)>;
            fabricIndex: FieldType<(...)>;
            privilege: FieldType<(...)>;
            subjects: FieldType<(...)>;
            targets: FieldType<(...)>;
        }>>;
    }>, any>>

    The cluster shall send AccessControlEntryChanged events whenever its ACL attribute data is changed by an Administrator.

    • Each added entry shall generate an event with ChangeType Added.

    • Each changed entry shall generate an event with ChangeType Changed.

    • Each removed entry shall generate an event with ChangeType Removed.

    MatterSpecification.v13.Core § 9.10.7.1

  • ReadonlyaccessControlExtensionChanged: ClusterEvents.EventObservable<Event<TypeFromFields<{
        adminNodeId: FieldType<null | NodeId>;
        adminPasscodeId: FieldType<null | number>;
        changeType: FieldType<AccessControl.ChangeType>;
        fabricIndex: FieldType<FabricIndex>;
        latestValue: FieldType<null | TypeFromFields<{
            data: FieldType<(...)>;
            fabricIndex: FieldType<(...)>;
        }>>;
    }>, any>>

    The cluster shall send AccessControlExtensionChanged events whenever its extension attribute data is changed by an Administrator.

    • Each added extension shall generate an event with ChangeType Added.

    • Each changed extension shall generate an event with ChangeType Changed.

    • Each removed extension shall generate an event with ChangeType Removed.

    MatterSpecification.v13.Core § 9.10.7.2

features: TypeFromBitSchema<{}>

Supported features as a flag object.

session: SecureSession
state: Omit<{}, never> & {
    acl: TypeFromFields<{
        authMode: FieldType<AccessControl.AccessControlEntryAuthMode>;
        fabricIndex: FieldType<FabricIndex>;
        privilege: FieldType<AccessControl.AccessControlEntryPrivilege>;
        subjects: FieldType<null | NodeId[]>;
        targets: FieldType<null | TypeFromFields<{
            cluster: FieldType<(...)>;
            deviceType: FieldType<(...)>;
            endpoint: FieldType<(...)>;
        }>[]>;
    }>[];
} & {
    extension?: TypeFromFields<{
        data: FieldType<Uint8Array>;
        fabricIndex: FieldType<FabricIndex>;
    }>[];
} & {
    accessControlEntriesPerFabric: number;
    subjectsPerAccessControlEntry: number;
    targetsPerAccessControlEntry: number;
} & {}

Access the behavior's state.

Type declaration

  • Readonlyacl: TypeFromFields<{
        authMode: FieldType<AccessControl.AccessControlEntryAuthMode>;
        fabricIndex: FieldType<FabricIndex>;
        privilege: FieldType<AccessControl.AccessControlEntryPrivilege>;
        subjects: FieldType<null | NodeId[]>;
        targets: FieldType<null | TypeFromFields<{
            cluster: FieldType<(...)>;
            deviceType: FieldType<(...)>;
            endpoint: FieldType<(...)>;
        }>[]>;
    }>[]

    An attempt to add an Access Control Entry when no more entries are available shall result in a RESOURCE_EXHAUSTED error being reported and the ACL attribute shall NOT have the entry added to it. See access control limits.

    See the AccessControlEntriesPerFabric attribute for the actual value of the number of entries per fabric supported by the server.

    Each Access Control Entry codifies a single grant of privilege on this Node, and is used by the Access Control Privilege Granting algorithm to determine if a subject has privilege to interact with targets on the Node.

    MatterSpecification.v13.Core § 9.10.5.3

Type declaration

  • Optional Readonlyextension?: TypeFromFields<{
        data: FieldType<Uint8Array>;
        fabricIndex: FieldType<FabricIndex>;
    }>[]

    If present, the Access Control Extensions may be used by Administrators to store arbitrary data related to fabric’s Access Control Entries.

    The Access Control Extension list shall support a single extension entry per supported fabric.

    MatterSpecification.v13.Core § 9.10.5.4

Type declaration

  • ReadonlyaccessControlEntriesPerFabric: number

    This attribute shall provide the minimum number of ACL Entries per fabric that are supported by this server.

    Since reducing this value over time may invalidate ACL entries already written, this value shall NOT decrease across time as software updates occur that could impact this value. If this is a concern for a given implementation, it is recommended to only use the minimum value required and avoid reporting a higher value than the required minimum.

    MatterSpecification.v13.Core § 9.10.5.7

  • ReadonlysubjectsPerAccessControlEntry: number

    This attribute shall provide the minimum number of Subjects per entry that are supported by this server.

    Since reducing this value over time may invalidate ACL entries already written, this value shall NOT decrease across time as software updates occur that could impact this value. If this is a concern for a given implementation, it is recommended to only use the minimum value required and avoid reporting a higher value than the required minimum.

    MatterSpecification.v13.Core § 9.10.5.5

  • ReadonlytargetsPerAccessControlEntry: number

    This attribute shall provide the minimum number of Targets per entry that are supported by this server.

    Since reducing this value over time may invalidate ACL entries already written, this value shall NOT decrease across time as software updates occur that could impact this value. If this is a concern for a given implementation, it is recommended to only use the minimum value required and avoid reporting a higher value than the required minimum.

    MatterSpecification.v13.Core § 9.10.5.6

Methods

  • Release resources. This is the public API for releasing application resources held by behaviors in internal state.

    Returns MaybePromise

  • Execute logic with elevated privileges.

    The provided function executes with privileges escalated to offline mode. This is not commonly necessary.

    Elevated logic effectively ignores ACLs so should be used with care.

    Note that interactions with the behavior will remain elevated until the synchronous completion of this call. You should only elevate privileges for synchronous logic.

    Parameters

    • fn: (() => void)

      the elevated logic

        • (): void
        • Returns void

    Returns void

  • Type Parameters

    • This extends Behavior
    • K extends string | number | symbol

    Parameters

    • this: This
    • attributeName: K

    Returns void

  • Create a generic callback function that has the same properties as a Reactor.

    Like a reactor, the callback's "this" will be bound to an active Behavior instance. Because of this: The reactor MUST be a real JS function - arrow functions will not work!

    Type Parameters

    • A extends any[]
    • R

    Parameters

    Returns ((...args: A) => undefined | R)

      • (...args): undefined | R
      • Parameters

        • Rest...args: A

        Returns undefined | R

  • Behaviors are ephemeral and should not perform initialization in their constructor. They can override this method instead.

    This method may be synchronous or asyncronous. If asynchronous, the behavior will not be available for external use until initialization completes.

    Parameters

    • Optional_options: {}

      Returns MaybePromise

    • Install a Reactor.

      Important: The reactor MUST be a real JS function - arrow functions will not work!

      Type Parameters

      Parameters

      Returns void

    • Type Parameters

      • This extends Behavior
      • K extends string | number | symbol

      Parameters

      • this: This
      • attributeName: K

      Returns Exclude<This["state"][K], undefined>

    • Description used in diagnostic messages.

      Returns string