Skip to content

Commit

Permalink
Add support for Aliro credential provisioning in door locks (project-…
Browse files Browse the repository at this point in the history
…chip#31144)

* Add support for Aliro credential provisioning in door locks

- Add enums, attributes and commands for supporting Aliro credential provisioning to door locks

- Add auto generated code corresponding to changes in the XML

* Update src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml

Co-authored-by: Boris Zbarsky <[email protected]>

* Apply suggestions from code review

Co-authored-by: Boris Zbarsky <[email protected]>

* Regenerate the zap files

* Add AliroExpeditedTransactionSupportedProtocolVersions and AliroSupportedBLEUWBProtocolVersions attributes as lists

---------

Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
nivi-apple and bzbarsky-apple authored Jan 9, 2024
1 parent 64449a1 commit 6b21935
Show file tree
Hide file tree
Showing 44 changed files with 5,703 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2617,6 +2617,9 @@ cluster DoorLock = 257 {
kFingerprint = 3;
kFingerVein = 4;
kFace = 5;
kAliroCredentialIssuerKey = 6;
kAliroEvictableEndpointKey = 7;
kAliroNonEvictableEndpointKey = 8;
}

enum DataOperationTypeEnum : enum8 {
Expand Down Expand Up @@ -2729,6 +2732,9 @@ cluster DoorLock = 257 {
kFingerprint = 8;
kFingerVein = 9;
kFace = 10;
kAliroCredentialIssuerKey = 11;
kAliroEvictableEndpointKey = 12;
kAliroNonEvictableEndpointKey = 13;
}

enum LockOperationTypeEnum : enum8 {
Expand Down Expand Up @@ -2766,6 +2772,7 @@ cluster DoorLock = 257 {
kRemote = 7;
kRFID = 8;
kBiometric = 9;
kAliro = 10;
}

enum UserStatusEnum : enum8 {
Expand Down Expand Up @@ -2926,6 +2933,8 @@ cluster DoorLock = 257 {
kYearDayAccessSchedules = 0x400;
kHolidaySchedules = 0x800;
kUnbolt = 0x1000;
kAliroProvisioning = 0x2000;
kAliroBLEUWB = 0x4000;
}

struct CredentialStruct {
Expand Down Expand Up @@ -3006,6 +3015,15 @@ cluster DoorLock = 257 {
attribute access(write: administer) optional boolean sendPINOverTheAir = 50;
attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51;
attribute access(write: administer) optional int16u expiringUserTimeout = 53;
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -3171,6 +3189,13 @@ cluster DoorLock = 257 {
optional octet_string PINCode = 0;
}

request struct SetAliroReaderConfigRequest {
octet_string<32> signingKey = 0;
octet_string<65> verificationKey = 1;
octet_string<16> groupIdentifier = 2;
optional octet_string<16> groupResolvingKey = 3;
}

/** This command causes the lock device to lock the door. */
timed command LockDoor(LockDoorRequest): DefaultSuccess = 0;
/** This command causes the lock device to unlock the door. */
Expand Down Expand Up @@ -3209,6 +3234,10 @@ cluster DoorLock = 257 {
timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38;
/** This command causes the lock device to unlock the door without pulling the latch. */
timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39;
/** This command communicates an Aliro Reader configuration to the lock. */
timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40;
/** This command clears an existing Aliro Reader configuration for the lock. */
timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41;
}

/** Provides an interface for controlling and adjusting automatic window coverings. */
Expand Down
29 changes: 29 additions & 0 deletions examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,9 @@ cluster DoorLock = 257 {
kFingerprint = 3;
kFingerVein = 4;
kFace = 5;
kAliroCredentialIssuerKey = 6;
kAliroEvictableEndpointKey = 7;
kAliroNonEvictableEndpointKey = 8;
}

enum DataOperationTypeEnum : enum8 {
Expand Down Expand Up @@ -1430,6 +1433,9 @@ cluster DoorLock = 257 {
kFingerprint = 8;
kFingerVein = 9;
kFace = 10;
kAliroCredentialIssuerKey = 11;
kAliroEvictableEndpointKey = 12;
kAliroNonEvictableEndpointKey = 13;
}

enum LockOperationTypeEnum : enum8 {
Expand Down Expand Up @@ -1467,6 +1473,7 @@ cluster DoorLock = 257 {
kRemote = 7;
kRFID = 8;
kBiometric = 9;
kAliro = 10;
}

enum UserStatusEnum : enum8 {
Expand Down Expand Up @@ -1627,6 +1634,8 @@ cluster DoorLock = 257 {
kYearDayAccessSchedules = 0x400;
kHolidaySchedules = 0x800;
kUnbolt = 0x1000;
kAliroProvisioning = 0x2000;
kAliroBLEUWB = 0x4000;
}

struct CredentialStruct {
Expand Down Expand Up @@ -1707,6 +1716,15 @@ cluster DoorLock = 257 {
attribute access(write: administer) optional boolean sendPINOverTheAir = 50;
attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51;
attribute access(write: administer) optional int16u expiringUserTimeout = 53;
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1872,6 +1890,13 @@ cluster DoorLock = 257 {
optional octet_string PINCode = 0;
}

request struct SetAliroReaderConfigRequest {
octet_string<32> signingKey = 0;
octet_string<65> verificationKey = 1;
octet_string<16> groupIdentifier = 2;
optional octet_string<16> groupResolvingKey = 3;
}

/** This command causes the lock device to lock the door. */
timed command LockDoor(LockDoorRequest): DefaultSuccess = 0;
/** This command causes the lock device to unlock the door. */
Expand Down Expand Up @@ -1910,6 +1935,10 @@ cluster DoorLock = 257 {
timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38;
/** This command causes the lock device to unlock the door without pulling the latch. */
timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39;
/** This command communicates an Aliro Reader configuration to the lock. */
timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40;
/** This command clears an existing Aliro Reader configuration for the lock. */
timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41;
}

endpoint 0 {
Expand Down
29 changes: 29 additions & 0 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1846,6 +1846,9 @@ cluster DoorLock = 257 {
kFingerprint = 3;
kFingerVein = 4;
kFace = 5;
kAliroCredentialIssuerKey = 6;
kAliroEvictableEndpointKey = 7;
kAliroNonEvictableEndpointKey = 8;
}

enum DataOperationTypeEnum : enum8 {
Expand Down Expand Up @@ -1958,6 +1961,9 @@ cluster DoorLock = 257 {
kFingerprint = 8;
kFingerVein = 9;
kFace = 10;
kAliroCredentialIssuerKey = 11;
kAliroEvictableEndpointKey = 12;
kAliroNonEvictableEndpointKey = 13;
}

enum LockOperationTypeEnum : enum8 {
Expand Down Expand Up @@ -1995,6 +2001,7 @@ cluster DoorLock = 257 {
kRemote = 7;
kRFID = 8;
kBiometric = 9;
kAliro = 10;
}

enum UserStatusEnum : enum8 {
Expand Down Expand Up @@ -2155,6 +2162,8 @@ cluster DoorLock = 257 {
kYearDayAccessSchedules = 0x400;
kHolidaySchedules = 0x800;
kUnbolt = 0x1000;
kAliroProvisioning = 0x2000;
kAliroBLEUWB = 0x4000;
}

struct CredentialStruct {
Expand Down Expand Up @@ -2235,6 +2244,15 @@ cluster DoorLock = 257 {
attribute access(write: administer) optional boolean sendPINOverTheAir = 50;
attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51;
attribute access(write: administer) optional int16u expiringUserTimeout = 53;
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -2400,6 +2418,13 @@ cluster DoorLock = 257 {
optional octet_string PINCode = 0;
}

request struct SetAliroReaderConfigRequest {
octet_string<32> signingKey = 0;
octet_string<65> verificationKey = 1;
octet_string<16> groupIdentifier = 2;
optional octet_string<16> groupResolvingKey = 3;
}

/** This command causes the lock device to lock the door. */
timed command LockDoor(LockDoorRequest): DefaultSuccess = 0;
/** This command causes the lock device to unlock the door. */
Expand Down Expand Up @@ -2438,6 +2463,10 @@ cluster DoorLock = 257 {
timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38;
/** This command causes the lock device to unlock the door without pulling the latch. */
timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39;
/** This command communicates an Aliro Reader configuration to the lock. */
timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40;
/** This command clears an existing Aliro Reader configuration for the lock. */
timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41;
}

endpoint 0 {
Expand Down
29 changes: 29 additions & 0 deletions examples/lock-app/nxp/zap/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,9 @@ cluster DoorLock = 257 {
kFingerprint = 3;
kFingerVein = 4;
kFace = 5;
kAliroCredentialIssuerKey = 6;
kAliroEvictableEndpointKey = 7;
kAliroNonEvictableEndpointKey = 8;
}

enum DataOperationTypeEnum : enum8 {
Expand Down Expand Up @@ -1217,6 +1220,9 @@ cluster DoorLock = 257 {
kFingerprint = 8;
kFingerVein = 9;
kFace = 10;
kAliroCredentialIssuerKey = 11;
kAliroEvictableEndpointKey = 12;
kAliroNonEvictableEndpointKey = 13;
}

enum LockOperationTypeEnum : enum8 {
Expand Down Expand Up @@ -1254,6 +1260,7 @@ cluster DoorLock = 257 {
kRemote = 7;
kRFID = 8;
kBiometric = 9;
kAliro = 10;
}

enum UserStatusEnum : enum8 {
Expand Down Expand Up @@ -1414,6 +1421,8 @@ cluster DoorLock = 257 {
kYearDayAccessSchedules = 0x400;
kHolidaySchedules = 0x800;
kUnbolt = 0x1000;
kAliroProvisioning = 0x2000;
kAliroBLEUWB = 0x4000;
}

struct CredentialStruct {
Expand Down Expand Up @@ -1494,6 +1503,15 @@ cluster DoorLock = 257 {
attribute access(write: administer) optional boolean sendPINOverTheAir = 50;
attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51;
attribute access(write: administer) optional int16u expiringUserTimeout = 53;
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1659,6 +1677,13 @@ cluster DoorLock = 257 {
optional octet_string PINCode = 0;
}

request struct SetAliroReaderConfigRequest {
octet_string<32> signingKey = 0;
octet_string<65> verificationKey = 1;
octet_string<16> groupIdentifier = 2;
optional octet_string<16> groupResolvingKey = 3;
}

/** This command causes the lock device to lock the door. */
timed command LockDoor(LockDoorRequest): DefaultSuccess = 0;
/** This command causes the lock device to unlock the door. */
Expand Down Expand Up @@ -1697,6 +1722,10 @@ cluster DoorLock = 257 {
timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38;
/** This command causes the lock device to unlock the door without pulling the latch. */
timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39;
/** This command communicates an Aliro Reader configuration to the lock. */
timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40;
/** This command clears an existing Aliro Reader configuration for the lock. */
timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41;
}

endpoint 0 {
Expand Down
29 changes: 29 additions & 0 deletions examples/lock-app/qpg/zap/lock.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,9 @@ cluster DoorLock = 257 {
kFingerprint = 3;
kFingerVein = 4;
kFace = 5;
kAliroCredentialIssuerKey = 6;
kAliroEvictableEndpointKey = 7;
kAliroNonEvictableEndpointKey = 8;
}

enum DataOperationTypeEnum : enum8 {
Expand Down Expand Up @@ -1614,6 +1617,9 @@ cluster DoorLock = 257 {
kFingerprint = 8;
kFingerVein = 9;
kFace = 10;
kAliroCredentialIssuerKey = 11;
kAliroEvictableEndpointKey = 12;
kAliroNonEvictableEndpointKey = 13;
}

enum LockOperationTypeEnum : enum8 {
Expand Down Expand Up @@ -1651,6 +1657,7 @@ cluster DoorLock = 257 {
kRemote = 7;
kRFID = 8;
kBiometric = 9;
kAliro = 10;
}

enum UserStatusEnum : enum8 {
Expand Down Expand Up @@ -1811,6 +1818,8 @@ cluster DoorLock = 257 {
kYearDayAccessSchedules = 0x400;
kHolidaySchedules = 0x800;
kUnbolt = 0x1000;
kAliroProvisioning = 0x2000;
kAliroBLEUWB = 0x4000;
}

struct CredentialStruct {
Expand Down Expand Up @@ -1891,6 +1900,15 @@ cluster DoorLock = 257 {
attribute access(write: administer) optional boolean sendPINOverTheAir = 50;
attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51;
attribute access(write: administer) optional int16u expiringUserTimeout = 53;
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -2056,6 +2074,13 @@ cluster DoorLock = 257 {
optional octet_string PINCode = 0;
}

request struct SetAliroReaderConfigRequest {
octet_string<32> signingKey = 0;
octet_string<65> verificationKey = 1;
octet_string<16> groupIdentifier = 2;
optional octet_string<16> groupResolvingKey = 3;
}

/** This command causes the lock device to lock the door. */
timed command LockDoor(LockDoorRequest): DefaultSuccess = 0;
/** This command causes the lock device to unlock the door. */
Expand Down Expand Up @@ -2094,6 +2119,10 @@ cluster DoorLock = 257 {
timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38;
/** This command causes the lock device to unlock the door without pulling the latch. */
timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39;
/** This command communicates an Aliro Reader configuration to the lock. */
timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40;
/** This command clears an existing Aliro Reader configuration for the lock. */
timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41;
}

endpoint 0 {
Expand Down
Loading

0 comments on commit 6b21935

Please sign in to comment.