# cattle_grid
cattle_grid is meant to simplify handling authentication in server to
server communication of the Fediverse. cattle_grid checks the HTTP
signatures based on the headers. For this public keys are retrieved
and cached.
For installation instructions see the [documentation](https://bovine.codeberg.page/cattle_grid/).
## Development
One can run the pytest tests via
```bash
poetry install
poetry run pytest
```
## Development with Fediverse pasture
In your Funfedi.dev directory (see [here](https://funfedi.dev/testing_tools/verify_actor/)
for details), run
```bash
cd fediverse-pasture
docker compose --file pasture.yml up pasture_verify_actor
```
Now in the cattle grid directory, run
```bash
poetry run python -mcattle_grid.config --actor_id http://cattle_grid/actor
```
to create a `cattle_grid.toml` file. Then start the docker containers via
```bash
docker compose up
```
By opening [http://localhost:2909/?actor_uri=jskitten@cattle_grid_demo](http://localhost:2909/?actor_uri=jskitten%40cattle_grid_demo), you should then be able to view the verify actor result. By refreshing the page and inspecting the log files, you can also check that the requests only ran once.
## Running GUI tests with the pasture
Start mastodon accessible through your browser
```bash
cd fediverse-pasture
docker compose --file mastodon42.yml --profile nginx up
```
See [Fun Fediverse Development](https://funfedi.dev/fediverse_pasture/applications/mastodon_4_2/) for instructions.
Then you can open [mastodon42web](http://mastodon42web) and lookup `jskitten@cattle_grid_demo`.
When you send a message to this kitten, it should reply with a meow, e.g.
![Kitten meows](mastodon.png)
Raw data
{
"_id": null,
"home_page": "https://codeberg.org/bovine/cattle_grid/",
"name": "cattle-grid",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Helge",
"author_email": "helge.krueger@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/83/da/5655becc076194c3733ba42dc817bab4105efb1274e118dd89b13c9ef868/cattle_grid-0.1.0.tar.gz",
"platform": null,
"description": "# cattle_grid\n\ncattle_grid is meant to simplify handling authentication in server to\nserver communication of the Fediverse. cattle_grid checks the HTTP\nsignatures based on the headers. For this public keys are retrieved\nand cached.\n\nFor installation instructions see the [documentation](https://bovine.codeberg.page/cattle_grid/).\n\n## Development\n\nOne can run the pytest tests via\n\n```bash\npoetry install\npoetry run pytest\n```\n\n## Development with Fediverse pasture\n\nIn your Funfedi.dev directory (see [here](https://funfedi.dev/testing_tools/verify_actor/)\nfor details), run\n\n```bash\ncd fediverse-pasture\ndocker compose --file pasture.yml up pasture_verify_actor\n```\n\nNow in the cattle grid directory, run\n\n```bash\npoetry run python -mcattle_grid.config --actor_id http://cattle_grid/actor\n```\n\nto create a `cattle_grid.toml` file. Then start the docker containers via\n\n```bash\ndocker compose up\n```\n\nBy opening [http://localhost:2909/?actor_uri=jskitten@cattle_grid_demo](http://localhost:2909/?actor_uri=jskitten%40cattle_grid_demo), you should then be able to view the verify actor result. By refreshing the page and inspecting the log files, you can also check that the requests only ran once.\n\n## Running GUI tests with the pasture\n\nStart mastodon accessible through your browser\n\n```bash\ncd fediverse-pasture\ndocker compose --file mastodon42.yml --profile nginx up\n```\n\nSee [Fun Fediverse Development](https://funfedi.dev/fediverse_pasture/applications/mastodon_4_2/) for instructions.\n\nThen you can open [mastodon42web](http://mastodon42web) and lookup `jskitten@cattle_grid_demo`.\nWhen you send a message to this kitten, it should reply with a meow, e.g.\n\n![Kitten meows](mastodon.png)\n",
"bugtrack_url": null,
"license": "",
"summary": "An authentication layer for the Fediverse",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://cattle-grid.readthedocs.io/en/latest/",
"Homepage": "https://codeberg.org/bovine/cattle_grid/",
"Repository": "https://codeberg.org/bovine/cattle_grid/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "980a8fa5c54ff596dab3f7e54a9b8b8e988009135bae63218a80135cc085e87c",
"md5": "627922382382c03342a80b3e0200cf33",
"sha256": "da30cebe58a5721e88b0b7c73a1f9696b93b95f5af5de7221c91432ca7a82cae"
},
"downloads": -1,
"filename": "cattle_grid-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "627922382382c03342a80b3e0200cf33",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11,<4.0",
"size": 12214,
"upload_time": "2023-12-03T10:18:14",
"upload_time_iso_8601": "2023-12-03T10:18:14.842349Z",
"url": "https://files.pythonhosted.org/packages/98/0a/8fa5c54ff596dab3f7e54a9b8b8e988009135bae63218a80135cc085e87c/cattle_grid-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "83da5655becc076194c3733ba42dc817bab4105efb1274e118dd89b13c9ef868",
"md5": "80298b5ee591f3cd3c4186c19ea07ac3",
"sha256": "bbae5404d1b085c627d0d271453cdb3c3b186745c415fa5a9f8c3338ad6559e2"
},
"downloads": -1,
"filename": "cattle_grid-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "80298b5ee591f3cd3c4186c19ea07ac3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11,<4.0",
"size": 9516,
"upload_time": "2023-12-03T10:18:16",
"upload_time_iso_8601": "2023-12-03T10:18:16.596359Z",
"url": "https://files.pythonhosted.org/packages/83/da/5655becc076194c3733ba42dc817bab4105efb1274e118dd89b13c9ef868/cattle_grid-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-03 10:18:16",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": true,
"codeberg_user": "bovine",
"codeberg_project": "cattle_grid",
"lcname": "cattle-grid"
}