Skip to main content

Entity collection endpoint for OpenID Federation

Project description

oidfed-collector: The OpenID Federation Entity Collection Service

This project implements the OpenID Federation Entity Collection specification.

Installation

To install the oidfed-collector, you can use pip or Docker.

Using pip

pip install oidfed_collector

Using Docker

docker pull ddgu/oidfed-collector:latest

Configuration

The service accepts a configuration file in JSON format. You can specify the configuration file using the CONFIG environment variable. By default, it looks for config.json in the current directory. The repository includes an example configuration file config.json. You can modify it according to your needs. Here is an example configuration with the default values:

{
    "port": 12345,
    "log_level": "info",
    "api_base_url": "/collection",
    "cache": {
        "ttl": 300,
        "max_size": 1000,
        "cleanup_interval": 60
    },
    "session": {
        "max_concurrent_requests": 100,
        "ttl": 30
    }
}
  • The port specifies the port on which the service will run.
  • The log_level can be set to debug, info, warning, error, or critical.
  • The api_base_url is the base URL for the API endpoints.
  • The cache section configures the caching behavior, including time-to-live (ttl), maximum size in items, and cleanup interval.
  • The session section configures HTTP session management, including maximum concurrent requests and session time-to-live (ttl).

Running the Service

To run the service, you can run it directly as a Python module or from a Docker container.

Using Python

python -m oidfed_collector

Using Docker

docker run -d -p 12345:12345 -v $(pwd)/config.json:/config.json ddgu/oidfed-collector:latest

We also provide a docker-compose.yaml file for easier deployment, which mounts the configuration file from the current directory. Modify to your needs and use it as follows:

docker-compose up -d

Usage

Once the service is running, you can access the API at http://localhost:12345/collection. The service supports a single endpoint for entity collection as defined in the OpenID Federation Entity Collection specification.

Development

To contribute to the development of oidfed-collector, you can clone the repository and install the dependencies using poetry:

git clone https://github.com/dianagudu/oidfed-collector.git
cd oidfed-collector
poetry install

You can then run the service locally:

poetry run oidfed-collector

If you wish to build the Docker image locally, note that we provide a multi-stage Dockerfile, with separate targets for development and production. You can build it with:

docker build --target development -t oidfed-collector:dev .
docker build --target production -t oidfed-collector:latest .

License

This project is licensed under the MIT License.

This project includes code from fedservice (https://github.com/SUNET/fedservice), licensed under the Apache License, Version 2.0. Modifications were made to adapt it for this project.


This work was started in and supported by the Geant Trust & Identity Incubator.

Trust & Identity Incubator logo

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

oidfed_collector-0.3.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oidfed_collector-0.3.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file oidfed_collector-0.3.0.tar.gz.

File metadata

  • Download URL: oidfed_collector-0.3.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.13 Linux/6.11.0-1018-azure

File hashes

Hashes for oidfed_collector-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c147e6585ef332710ce09f1b9f76ad1cf1ba211c705d31e6de520f63e7440a00
MD5 7c607229c84a927c473341555b05903a
BLAKE2b-256 84fe5e8e3f785289d190470b67db4d30422bc6b416a809cf80454fe4e0ded686

See more details on using hashes here.

File details

Details for the file oidfed_collector-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: oidfed_collector-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.13 Linux/6.11.0-1018-azure

File hashes

Hashes for oidfed_collector-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94c580eac5d2d9b4fc481cfda22496a7444da1b40bfd45a83cf674dd55dc2b11
MD5 8a1dc95287bfbf6efa5da297c2ff4058
BLAKE2b-256 ae6df09144a60a1fd11725ec266ae97983afa7fb3a735253e564371219044d96

See more details on using hashes here.

Supported by

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