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:/app/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.

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.2.0.tar.gz (16.3 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.2.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for oidfed_collector-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bc45f7095c1994049c003da6bdd60a84a78efa1ab9aec34cf511aa83256916c4
MD5 f826e0f693268c1f7ad75f0fed03a27f
BLAKE2b-256 096cbc0e2c294bf31c776ef7cbf655f2954ed429a038e07a875215a100026b7d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for oidfed_collector-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5dc099e74f7d74cfc95ba6c992df850908a507167649424930c44b1f246fbe31
MD5 8c8e885b845ba9d4e9ecb966211a4b4a
BLAKE2b-256 5454aee88109ba7a8da91c4e7030a628ff8c2ee3491e142cf6063fd6a665ef13

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