{"id":19096604,"url":"https://github.com/sapcc/swift-addons","last_synced_at":"2026-05-08T02:07:09.627Z","repository":{"id":19628682,"uuid":"83299210","full_name":"sapcc/swift-addons","owner":"sapcc","description":"Swift addons by SAP CC","archived":false,"fork":false,"pushed_at":"2025-02-06T16:13:48.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":56,"default_branch":"master","last_synced_at":"2025-02-19T18:47:30.461Z","etag":null,"topics":["middleware","openstack","python","swift","wsgi"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sapcc.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-27T10:44:13.000Z","updated_at":"2025-02-06T16:13:54.000Z","dependencies_parsed_at":"2024-04-05T15:42:43.145Z","dependency_job_id":null,"html_url":"https://github.com/sapcc/swift-addons","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sapcc/swift-addons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fswift-addons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fswift-addons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fswift-addons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fswift-addons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapcc","download_url":"https://codeload.github.com/sapcc/swift-addons/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fswift-addons/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32763519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"online","status_checked_at":"2026-05-08T02:00:05.879Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["middleware","openstack","python","swift","wsgi"],"created_at":"2024-11-09T03:37:13.045Z","updated_at":"2026-05-08T02:07:09.610Z","avatar_url":"https://github.com/sapcc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swift addons by SAP\n\nThis repo contains addon middlewares that we use at SAP to support our workflows in\n[OpenStack Swift](https://github.com/openstack/swift).\n\n## Installation\n\n```\npip install git+https://github.com/sapcc/swift-addons.git\n```\n\nThen follow the instructions for the specific middlewares as shown below.\n\n## Middlewares\n\n### sysmeta-domain-override\n\nOur Swift is configured for manual account creation such that all accounts are created by\nan automated process (reseller user). The user that performs this automated account\ncreation resides in a different domain than the domain where the accounts are created. Due\nto this, the newly created accounts have their `X-Account-Sysmeta-Project-Domain-Id`\nattribute set to the project domain ID of the reseller user rather than their actual\ndomains where these accounts exist.\n\nThis middleware solves this problem by allowing reseller users to specify the domain ID\nfor the project in question with the `X-Account-Project-Domain-Id-Override` header.\n\nTo enable this middleware, add the following snippet to the `proxy-server.conf` file:\n\n```conf\n[filter:sysmeta-domain-override]\nuse = egg:sapcc-swift-addons#sysmeta_domain_override\n```\n\nand then in the same file, add `sysmeta-domain-override` to the application pipeline\n**directly after** the `keystoneauth` middleware, but also **after** the `gatekeeper`\nmiddleware. For example:\n\n```conf\npipeline = ... gatekeeper ... keystoneauth sysmeta-domain-override ...\n```\n\n### write-restriction\n\nThis middleware allows you to restrict write operations on a container, i.e. make the\ncontainer read-only, by setting the `X-Container-Meta-Write-Restricted` metadata header on\na container to `true`. Additionally, you **need** to specify which roles are allowed to\nperform write operations on the container by defining the `allowed_roles` option in the\nconfig file.\n\nOnly users that have one of the _allowed roles_ can set/modify the write restriction\nmetadata header. This is to prevent non-privileged users from locking themselves out their\ncontainers.\n\nTo enable this middleware, add the following snippet to the `proxy-server.conf` file:\n\n```conf\n[filter:write-restriction]\nuse = egg:sapcc-swift-addons#write_restriction\n# allowed_roles takes a comma-separated list of roles.\nallowed_roles = objectstore_admin, reseller_admin, ....\n```\n\nand then in the same file, add `write-restriction` to the application pipeline **after**\nthe `keystoneauth` and  `gatekeeper` middleware. For example:\n\n```conf\npipeline = ... gatekeeper ... keystoneauth ... write-restriction ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fswift-addons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapcc%2Fswift-addons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fswift-addons/lists"}