It looks like the archive import feature does not support anymore.
If a zip archive contains some techniques categories (defined by a category.xml file), the category file is ignored during the import process.
You can easily reproduce it with the latest Openscap plugin version.
Content of its zip archive:
Archive: ./openscap_technique.zip
creating: configuration/techniques/
creating: configuration/techniques/OpenSCAP_Policies_plugin/
inflating: configuration/techniques/OpenSCAP_Policies_plugin/category.xml
creating: configuration/techniques/OpenSCAP_Policies_plugin/plugin_openscap_policies/
creating: configuration/techniques/OpenSCAP_Policies_plugin/plugin_openscap_policies/1.0/
inflating: configuration/techniques/OpenSCAP_Policies_plugin/plugin_openscap_policies/1.0/technique.yml
But when imported through the API:
2024-04-25 13:02:19+0000 INFO application.archive - Received a new policy archive 'openscap_technique.zip', processing
2024-04-25 13:02:19+0000 TRACE application.archive - Directory 'configuration/techniques/' in archive 'openscap_technique.zip': looking for entries
2024-04-25 13:02:19+0000 TRACE application.archive - Directory 'configuration/techniques/OpenSCAP_Policies_plugin/' in archive 'openscap_technique.zip': looking for entries
2024-04-25 13:02:19+0000 TRACE application.archive - Archive 'openscap_technique.zip': found technique file OpenSCAP_Policies_plugin/category.xml
2024-04-25 13:02:19+0000 TRACE application.archive - Directory 'configuration/techniques/OpenSCAP_Policies_plugin/plugin_openscap_policies/' in archive 'openscap_technique.zip': looking for entries
2024-04-25 13:02:19+0000 TRACE application.archive - Directory 'configuration/techniques/OpenSCAP_Policies_plugin/plugin_openscap_policies/1.0/' in archive 'openscap_technique.zip': looking for entries
2024-04-25 13:02:19+0000 TRACE application.archive - Archive 'openscap_technique.zip': found technique file OpenSCAP_Policies_plugin/plugin_openscap_policies/1.0/technique.yml
2024-04-25 13:02:19+0000 DEBUG application.archive - Processing archive 'openscap_technique.zip': techniques: 'OpenSCAP_Policies_plugin/plugin_openscap_policies/1.0'
2024-04-25 13:02:19+0000 DEBUG application.archive - Processing archive 'openscap_technique.zip': directives: ''
2024-04-25 13:02:19+0000 DEBUG application.archive - Processing archive 'openscap_technique.zip': groups: ''
2024-04-25 13:02:19+0000 DEBUG application.archive - Processing archive 'openscap_technique.zip': rules: ''
2024-04-25 13:02:19+0000 DEBUG application.archive - Processing archive 'openscap_technique.zip': rules: ''
2024-04-25 13:02:19+0000 DEBUG application.archive - Adding technique from archive: 'Plugin Openscap policies' (/var/rudder/configuration-repository/techniques/OpenSCAP_Policies_plugin/plugin_openscap_policies/1.0)
2024-04-25 13:02:19+0000 TRACE application.archive - Deleting technique files for technique 'plugin_openscap_policies/1.0': metadata.xml, technique.cf, technique.ps1
2024-04-25 13:02:19+0000 TRACE application.archive - Writing for commit files for technique 'plugin_openscap_policies/1.0': technique.yml
2024-04-25 13:02:20+0000 INFO policy.generation - Start policy generation, checking updated rules
There is no mention of the category.xml file, and it is not extracted to the configuration-repository folder.
root@server:/var/rudder/packages/rudder-plugin-openscap# tree /var/rudder/configuration-repository/techniques/OpenSCAP_Policies_plugin/
/var/rudder/configuration-repository/techniques/OpenSCAP_Policies_plugin/
└── plugin_openscap_policies
└── 1.0
├── metadata.xml
├── technique.cf
├── technique.ps1
└── technique.yml
3 directories, 4 files