{"id":20358113,"url":"https://github.com/irods/irods_rule_engine_plugin_metadata_guard","last_synced_at":"2025-07-02T09:34:05.281Z","repository":{"id":38236230,"uuid":"220675672","full_name":"irods/irods_rule_engine_plugin_metadata_guard","owner":"irods","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-07T15:02:57.000Z","size":69,"stargazers_count":0,"open_issues_count":9,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-07T16:23:02.874Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/irods.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-11-09T17:10:08.000Z","updated_at":"2025-05-07T15:03:02.000Z","dependencies_parsed_at":"2024-03-01T20:24:37.484Z","dependency_job_id":"20e9e500-6fcf-4bf9-8caa-08ac0d362686","html_url":"https://github.com/irods/irods_rule_engine_plugin_metadata_guard","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/irods/irods_rule_engine_plugin_metadata_guard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irods%2Firods_rule_engine_plugin_metadata_guard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irods%2Firods_rule_engine_plugin_metadata_guard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irods%2Firods_rule_engine_plugin_metadata_guard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irods%2Firods_rule_engine_plugin_metadata_guard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irods","download_url":"https://codeload.github.com/irods/irods_rule_engine_plugin_metadata_guard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irods%2Firods_rule_engine_plugin_metadata_guard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263111817,"owners_count":23415529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T23:25:26.647Z","updated_at":"2025-07-02T09:34:05.226Z","avatar_url":"https://github.com/irods.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iRODS Rule Engine Plugin - Metadata Guard\n\n## Requirements\n- iRODS v4.3.0+\n- irods-dev package\n- irods-runtime package\n- irods-externals-boost package\n- irods-externals-json package\n\n## Compiling\n```bash\n$ git clone https://github.com/irods/irods_rule_engine_plugin_metadata_guard\n$ cd irods_rule_engine_plugin_metadata_guard\n$ mkdir _build \u0026\u0026 cd _build\n$ cmake -GNinja ..\n$ ninja package\n```\nAfter compiling, you should now have a `deb` or `rpm` package with a name similar to the following:\n```bash\nirods-rule-engine-plugin-metadata-guard-\u003cplugin_version\u003e-\u003cos\u003e-\u003carch\u003e.\u003cdeb|rpm\u003e\n```\n\n## Installing\nUbuntu:\n```bash\n$ sudo dpkg -i irods-rule-engine-plugin-metadata-guard-*.deb\n```\nCentOS:\n```bash\n$ su -c yum localinstall irods-rule-engine-plugin-metadata-guard-*.rpm\n```\nIf the installation was successful, you should now have a new shared library. The full path to the library\nshould be similar to the following:\n```\n\u003cirods_lib_home\u003e/plugins/rule_engines/libirods_rule_engine_plugin-metadata_guard.so\n```\n\n## Configuration\nThe Rule Engine Plugin config is set as metadata on the **zone collection** (e.g. `/tempZone`).\nEach option is explained below.\n```javascript\n{\n    // The list of strings that represent metadata that should be guarded.\n    // In this example, any metadata beginning with \"irods::\" will be treated special\n    // and require that the user be an administrator or classified as an editor depending\n    // on the configuration.\n    \"prefixes\": [\"irods::\"],\n\n    // Only administrators are allowed to modify metadata.\n    // This option supersedes the \"editors\" option.\n    \"admin_only\": true,\n\n    // The list of editors that can modify guarded metadata.\n    \"editors\": [\n        {\n            // The type of entity that is allowed to modify metadata.\n            // The following options are available:\n            // - \"user\"\n            // - \"group\"\n            \"type\": \"group\",\n\n            // The name of the iRODS entity.\n            // For remote users, you must include the zone (e.g. \"rods#tempZone\").\n            \"name\": \"rodsadmin\"\n        }\n    ]\n}\n```\nOnce you've decided on what your config will be, you'll need to use `imeta` to set it. For example:\n```bash\n$ imeta set -C /tempZone irods::metadata_guard '{\"prefixes\": [\"irods::\"], \"admin_only\": true}'\n```\nAnytime a request to modify metadata is detected by the server, the Rule Engine Plugin will read the JSON\nconfig and determine whether the user should be allowed to continue.\n\n**NOTE: The user setting the metadata on the zone collection must have write permission on that collection!**\n\n## Enabling the Rule Engine Plugin\nTo enable, add the following plugin config to the list of rule engines in `/etc/irods/server_config.json`. \nThe plugin config should be placed before any rule engines that need metadata to be guarded.\n\nEven though this plugin will process PEPs first due to it's positioning, subsequent Rule Engine Plugins will \nstill be allowed to process the same PEPs without any issues.\n```javascript\n\"rule_engines\": [\n    {\n        \"instance_name\": \"irods_rule_engine_plugin-metadata_guard-instance\",\n        \"plugin_name\": \"irods_rule_engine_plugin-metadata_guard\",\n        \"plugin_specific_configuration\": {}\n    },\n    \n    // ... Previously installed Rule Engine Plugin configs ...\n]\n\n```\n\n## Troubleshooting\n\n### Q. What happens if the JSON configuration is incorrect (i.e. invalid JSON format)?\nA. The log file will contain error messages saying the JSON config could not be parsed. Having a bad config can\nbe viewed as not having the metadata guard Rule Engine Plugin installed at all.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firods%2Firods_rule_engine_plugin_metadata_guard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firods%2Firods_rule_engine_plugin_metadata_guard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firods%2Firods_rule_engine_plugin_metadata_guard/lists"}