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.1.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.1-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oidfed_collector-0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 0b04f8c55c8f49cb8108d61b1d7eb5ac4a82b5c0a63c3e4528b191f947feb0ce
MD5 d895d3d8e445a81b213d1c87ce77a808
BLAKE2b-256 154e693507affb936b602130bb19f492ac63cfe7a8815180aa93cca9939941e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oidfed_collector-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 23.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bfeec2eb7366aaf5effd6cf8cff371beb0946955f1121ff7c757b9f69e3a7600
MD5 ad8a443657012bd68b9c290660bdf9c7
BLAKE2b-256 906e41f1aba50a5832e94d796dd7c7d90ce3b7289f28fe6b655eabdd7e2eac34

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