Skip to main content

An authentication layer for the Fediverse

Project description

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.

Development

One can run the pytest tests via

poetry install
poetry run pytest

Development with Fediverse pasture

In your Funfedi.dev directory (see here for details), run

cd fediverse-pasture
docker compose --file pasture.yml up pasture_verify_actor

Now in the cattle grid directory, run

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

docker compose up

By opening http://localhost:2909/?actor_uri=jskitten@cattle_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

cd fediverse-pasture
docker compose --file mastodon42.yml --profile nginx up

See Fun Fediverse Development for instructions.

Then you can open 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cattle_grid-0.1.0.tar.gz (9.5 kB view hashes)

Uploaded Source

Built Distribution

cattle_grid-0.1.0-py3-none-any.whl (12.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page