How to enable CHIP_CONFIG_USE_ACCESS_RESTRICTIONS in Matter Config

The Matter stack’s auto-generated file `access_buildconfig.h` explicitly sets `CHIP_CONFIG_USE_ACCESS_RESTRICTIONS` to `0`, overriding my attempts to enable it. This prevents me from enforcing access control in my application. 

Could anyone recommended method to enable CHIP_CONFIG_USE_ACCESS_RESTRICTIONS and similar flags in the nRF Connect SDK? Specifically:

  • Is there a Kconfig symbol or build argument to enable this?

  • Are there plans to expose these flags in the SDK’s configuration system?

  • If manual overrides are required, how can I ensure they persist across clean builds?

Parents
  • Hello,

    This prevents me from enforcing access control in my application. 

    What form of access control are you after?

    I am asking because there are some Matter samples in nRF Connect SDK which has the access control cluster enabled by default, i.e. the light bulb sample. See the usage here in the sample documentation.

    Is this what you are after?

    Best regards,

    Maria

  • Hi Maria,

    Thanks for your response.

    My project is based on the light bulb sample with some customizations to the ZAP configuration. Specifically, I’ve enabled the ReviewFabricRestrictions command within the AccessControl cluster.

    However, during a pristine build, I encountered the following linker error:

    /ncs/v3.0.0/nrf/samples/matter/light_bulb/src/default_zap/zap-generated/IMClusterCommandHandler.cpp:58: 
    undefined reference to `emberAfAccessControlClusterReviewFabricRestrictionsCallback(...)`
    collect2: error: ld returned 1 exit status

    Upon investigation, I found that the function emberAfAccessControlClusterReviewFabricRestrictionsCallback is conditionally compiled inside access-control-server.cpp, guarded by #if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS.

    The issue is that CHIP_CONFIG_USE_ACCESS_RESTRICTIONS is set to 0 in the auto-generated access_buildconfig.h file, which prevents this feature from being included during compilation.

    I’m trying to find a proper way to enable CHIP_CONFIG_USE_ACCESS_RESTRICTIONS (and potentially similar flags) so that the access control functionality works as expected. Is there a supported mechanism (e.g. Kconfig option, build flag, or CMake override) to set or override this macro persistently—even across clean builds?

    Any guidance would be appreciated.

    Best regards,

Reply
  • Hi Maria,

    Thanks for your response.

    My project is based on the light bulb sample with some customizations to the ZAP configuration. Specifically, I’ve enabled the ReviewFabricRestrictions command within the AccessControl cluster.

    However, during a pristine build, I encountered the following linker error:

    /ncs/v3.0.0/nrf/samples/matter/light_bulb/src/default_zap/zap-generated/IMClusterCommandHandler.cpp:58: 
    undefined reference to `emberAfAccessControlClusterReviewFabricRestrictionsCallback(...)`
    collect2: error: ld returned 1 exit status

    Upon investigation, I found that the function emberAfAccessControlClusterReviewFabricRestrictionsCallback is conditionally compiled inside access-control-server.cpp, guarded by #if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS.

    The issue is that CHIP_CONFIG_USE_ACCESS_RESTRICTIONS is set to 0 in the auto-generated access_buildconfig.h file, which prevents this feature from being included during compilation.

    I’m trying to find a proper way to enable CHIP_CONFIG_USE_ACCESS_RESTRICTIONS (and potentially similar flags) so that the access control functionality works as expected. Is there a supported mechanism (e.g. Kconfig option, build flag, or CMake override) to set or override this macro persistently—even across clean builds?

    Any guidance would be appreciated.

    Best regards,

Children
No Data
Related