interface GroupKeyManagementBehavior {
    [reference]: Datasource<StateType>;
    agent: Agent;
    cluster: never;
    context: ActionContext;
    endpoint: Endpoint<Empty>;
    env: Environment;
    events: EventEmitter & Omit<ClusterEvents<Of<{
        attributes: {};
        commands: {};
        events: {};
        id: 0;
        name: "Unknown";
        revision: 0;
    }>, typeof ClusterBehavior>, never> & {
        groupKeyMap$Changing: ClusterEvents.AttributeObservable<WritableFabricScopedAttribute<TypeFromFields<{
            fabricIndex: FieldType<FabricIndex>;
            groupId: FieldType<GroupId>;
            groupKeySetId: FieldType<number>;
        }>[], any>>;
        groupTable$Changing: ClusterEvents.AttributeObservable<FabricScopedAttribute<TypeFromFields<{
            endpoints: FieldType<EndpointNumber[]>;
            fabricIndex: FieldType<FabricIndex>;
            groupId: FieldType<GroupId>;
            groupName: OptionalFieldType<string>;
        }>[], any>>;
        maxGroupKeysPerFabric$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
        maxGroupsPerFabric$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    } & {} & {
        groupKeyMap$Changed: ClusterEvents.AttributeObservable<WritableFabricScopedAttribute<TypeFromFields<{
            fabricIndex: FieldType<FabricIndex>;
            groupId: FieldType<GroupId>;
            groupKeySetId: FieldType<number>;
        }>[], any>>;
        groupTable$Changed: ClusterEvents.AttributeObservable<FabricScopedAttribute<TypeFromFields<{
            endpoints: FieldType<EndpointNumber[]>;
            fabricIndex: FieldType<FabricIndex>;
            groupId: FieldType<GroupId>;
            groupName: OptionalFieldType<string>;
        }>[], any>>;
        maxGroupKeysPerFabric$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
        maxGroupsPerFabric$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    } & {} & {} & {};
    features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
        cacheAndSync: BitFlag;
    }>;
    session: SecureSession;
    state: Omit<ClusterState.Type<Of<{
        attributes: {};
        commands: {};
        events: {};
        id: 0;
        name: "Unknown";
        revision: 0;
    }>, typeof ClusterBehavior>, never> & {
        groupKeyMap: TypeFromFields<{
            fabricIndex: FieldType<FabricIndex>;
            groupId: FieldType<GroupId>;
            groupKeySetId: FieldType<number>;
        }>[];
        groupTable: TypeFromFields<{
            endpoints: FieldType<EndpointNumber[]>;
            fabricIndex: FieldType<FabricIndex>;
            groupId: FieldType<GroupId>;
            groupName: OptionalFieldType<string>;
        }>[];
    } & {} & {
        maxGroupKeysPerFabric: number;
        maxGroupsPerFabric: 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;
    keySetRead(request: GroupKeyManagement.KeySetReadRequest): MaybePromise<GroupKeyManagement.KeySetReadResponse>;
    keySetReadAllIndices(): MaybePromise<GroupKeyManagement.KeySetReadAllIndicesResponse>;
    keySetRemove(request: GroupKeyManagement.KeySetRemoveRequest): MaybePromise;
    keySetWrite(request: GroupKeyManagement.KeySetWriteRequest): 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<ClusterEvents<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior>, never> & {
    groupKeyMap$Changing: ClusterEvents.AttributeObservable<WritableFabricScopedAttribute<TypeFromFields<{
        fabricIndex: FieldType<FabricIndex>;
        groupId: FieldType<GroupId>;
        groupKeySetId: FieldType<number>;
    }>[], any>>;
    groupTable$Changing: ClusterEvents.AttributeObservable<FabricScopedAttribute<TypeFromFields<{
        endpoints: FieldType<EndpointNumber[]>;
        fabricIndex: FieldType<FabricIndex>;
        groupId: FieldType<GroupId>;
        groupName: OptionalFieldType<string>;
    }>[], any>>;
    maxGroupKeysPerFabric$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    maxGroupsPerFabric$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {} & {
    groupKeyMap$Changed: ClusterEvents.AttributeObservable<WritableFabricScopedAttribute<TypeFromFields<{
        fabricIndex: FieldType<FabricIndex>;
        groupId: FieldType<GroupId>;
        groupKeySetId: FieldType<number>;
    }>[], any>>;
    groupTable$Changed: ClusterEvents.AttributeObservable<FabricScopedAttribute<TypeFromFields<{
        endpoints: FieldType<EndpointNumber[]>;
        fabricIndex: FieldType<FabricIndex>;
        groupId: FieldType<GroupId>;
        groupName: OptionalFieldType<string>;
    }>[], any>>;
    maxGroupKeysPerFabric$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    maxGroupsPerFabric$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {} & {} & {}

Access the behavior's events.

features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
    cacheAndSync: BitFlag;
}>

Supported features as a flag object.

session: SecureSession
state: Omit<ClusterState.Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior>, never> & {
    groupKeyMap: TypeFromFields<{
        fabricIndex: FieldType<FabricIndex>;
        groupId: FieldType<GroupId>;
        groupKeySetId: FieldType<number>;
    }>[];
    groupTable: TypeFromFields<{
        endpoints: FieldType<EndpointNumber[]>;
        fabricIndex: FieldType<FabricIndex>;
        groupId: FieldType<GroupId>;
        groupName: OptionalFieldType<string>;
    }>[];
} & {} & {
    maxGroupKeysPerFabric: number;
    maxGroupsPerFabric: number;
} & {}

Access the behavior's state.

Type declaration

  • ReadonlygroupKeyMap: TypeFromFields<{
        fabricIndex: FieldType<FabricIndex>;
        groupId: FieldType<GroupId>;
        groupKeySetId: FieldType<number>;
    }>[]

    This attribute is a list of GroupKeyMapStruct entries. Each entry associates a logical Group Id with a particular group key set.

    MatterSpecification.v13.Core § 11.2.6.1

  • ReadonlygroupTable: TypeFromFields<{
        endpoints: FieldType<EndpointNumber[]>;
        fabricIndex: FieldType<FabricIndex>;
        groupId: FieldType<GroupId>;
        groupName: OptionalFieldType<string>;
    }>[]

    This attribute is a list of GroupInfoMapStruct entries. Each entry provides read-only information about how a given logical Group ID maps to a particular set of endpoints, and a name for the group. The content of this attribute reflects data managed via the Groups cluster (see AppClusters), and is in general terms referred to as the 'node-wide Group Table'.

    The GroupTable shall NOT contain any entry whose GroupInfoMapStruct has an empty Endpoints list. If a RemoveGroup or RemoveAllGroups command causes the removal of a group mapping from its last mapped endpoint, the entire GroupTable entry for that given GroupId shall be removed.

    MatterSpecification.v13.Core § 11.2.6.2

Type declaration

  • ReadonlymaxGroupKeysPerFabric: number

    Indicates the maximum number of group key sets this node supports per fabric. The value of this attribute shall be set according to the minimum number of group key sets to support as specified in Group Limits.

    MatterSpecification.v13.Core § 11.2.6.4

  • ReadonlymaxGroupsPerFabric: number

    Indicates the maximum number of groups that this node supports per fabric. The value of this attribute shall be set to be no less than the required minimum supported groups as specified in Group Limits. The length of the GroupKeyMap and GroupTable list attributes shall NOT exceed the value of the MaxGroupsPerFabric attribute multiplied by the number of supported fabrics.

    MatterSpecification.v13.Core § 11.2.6.3

Methods

  • 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

    • This command is used by Administrators to remove all state of a given Group Key Set.

      Effect on Receipt

      If there exists a Group Key Set associated with the accessing fabric which has the same GroupKey

      SetID as that provided in the GroupKeySetID field, then the contents of that Group Key Set shall be removed, including all epoch keys it contains.

      If there exist any entries for the accessing fabric within the GroupKeyMap attribute that refer to the GroupKeySetID just removed, then these entries shall be removed from that list.

      This command shall fail with an INVALID_COMMAND status code back to the initiator if the GroupKeySetID being removed is 0, which is the Key Set associated with the Identity Protection Key (IPK). The only method to remove the IPK is usage of the RemoveFabric command or any operation which causes the equivalent of a RemoveFabric to occur by side-effect.

      This command shall send a SUCCESS status code back to the initiator on success, or NOT_FOUND if the GroupKeySetID requested did not exist.

      Returns MaybePromise

      MatterSpecification.v13.Core § 11.2.7.4

    • This command is used by Administrators to set the state of a given Group Key Set, including atomically updating the state of all epoch keys.

      Effect on Receipt

      The following validations shall be done against the content of the GroupKeySet field:

      • If the EpochKey0 field is null or its associated EpochStartTime0 field is null, then this command shall fail with an INVALID_COMMAND status code responded to the client.

      • If the EpochKey0 field’s length is not exactly 16 bytes, then this command shall fail with a CONSTRAINT_ERROR status code responded to the client.

      • If the EpochStartTime0 is set to 0, then this command shall fail with an INVALID_COMMAND status code responded to the client. Note that internally, a GroupKeySetStruct’s EpochStartTime0 may be set to zero, due to the behavior of the AddNOC command which synthesizes a GroupKeySetStruct (see IPKValue). However, the value 0 is illegal in the GroupKeySet field sent by a client.

      • If the EpochKey1 field is not null, then the EpochKey0 field shall NOT be null. Otherwise this command shall fail with an INVALID_COMMAND status code responded to the client.

      • If the EpochKey1 field is not null, and the field’s length is not exactly 16 bytes, then this command shall fail with a CONSTRAINT_ERROR status code responded to the client.

      • If the EpochKey1 field is not null, its associated EpochStartTime1 field shall NOT be null and shall contain a later epoch start time than the epoch start time found in the EpochStartTime0 field. Otherwise this command shall fail with an INVALID_COMMAND status code responded to the client.

      • If exactly one of the EpochKey1 or EpochStartTime1 is null, rather than both being null, or neither being null, then this command shall fail with an INVALID_COMMAND status code responded to the client.

      • If the EpochKey2 field is not null, then the EpochKey1 and EpochKey0 fields shall NOT be null. Otherwise this command shall fail with an INVALID_COMMAND status code responded to the client.

      • If the EpochKey2 field is not null, and the field’s length is not exactly 16 bytes, then this command shall fail with a CONSTRAINT_ERROR status code responded to the client.

      • If the EpochKey2 field is not null, its associated EpochStartTime2 field shall NOT be null and shall contain a later epoch start time than the epoch start time found in the EpochStartTime1 field. Otherwise this command shall fail with an INVALID_COMMAND status code responded to the client.

      • If exactly one of the EpochKey2 or EpochStartTime2 is null, rather than both being null, or neither being null, then this command shall fail with an INVALID_COMMAND status code responded to the client.

      If there exists a Group Key Set associated with the accessing fabric which has the same GroupKeySetID as that provided in the GroupKeySet field, then the contents of that group key set shall be replaced. A replacement shall be done by executing the equivalent of entirely removing the previous Group Key Set with the given GroupKeySetID, followed by an addition of a Group Key Set with the provided configuration. Otherwise, if the GroupKeySetID did not match an existing entry, a new Group Key Set associated with the accessing fabric shall be created with the provided data. The Group Key Set shall be written to non-volatile storage.

      Upon completion, this command shall send a status code back to the initiator:

      • If the Group Key Set was properly installed or updated on the Node, the status code shall be

      set to SUCCESS.

      • If there are insufficient resources on the receiver to store an additional Group Key Set, the status code shall be set to RESOURCE_EXHAUSTED (see group key limits);

      • Otherwise, this status code shall be set to FAILURE.

      Returns MaybePromise

      MatterSpecification.v13.Core § 11.2.7.1

    • Install a Reactor.

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

      Type Parameters

      Parameters

      Returns void