# Simpl-Open Credential Delivery A Dagster data service for generating Gitea credentials and delivering them to an application consumer by email. ## Description This service extends the standard Dagster workflow template with a credential provisioning flow for Simpl-Open. The workflow: 1. receives a repository identifier and consumer details 2. generates Gitea credentials and repository access 3. sends the generated credentials by email ## Project Structure ``` simpl_open_credential_delivery/ ├── src/ │ └── simpl_open_credential_delivery/ │ ├── repository.py │ ├── config/ │ ├── hooks/ │ ├── jobs/ │ ├── models/ │ ├── ops/ │ └── services/ ├── tests/ ├── documents/ ├── yaml/ ├── Dockerfile ├── pyproject.toml ├── requirements.txt └── workspace.yaml ``` ## Getting Started ### Prerequisites - Python 3.12+ - uv or pip for dependency management ### Installation ```bash uv sync ``` Or with pip: ```bash pip install -r requirements.txt ``` ### Run Dagster ```bash dagster dev ``` ## Environment Variables ### Gitea Integration - `GITEA_BASE_URL`: Base URL of the Gitea instance - `GITEA_ADMIN_TOKEN`: Admin token used to provision users, tokens, and repository access - `GITEA_DEFAULT_OWNER` (optional): Default repository owner used when the repository identifier is not fully qualified ### Email Delivery - `SMTP_HOST`: SMTP server hostname - `SMTP_PORT`: SMTP server port - `SMTP_USERNAME` (optional): SMTP username - `SMTP_PASSWORD` (optional): SMTP password - `SMTP_USE_TLS` (default `true`): Enable STARTTLS - `SMTP_FROM_ADDRESS`: Sender email address ## Workflow Input The workflow accepts the following high-level inputs: - `repository_identifier` - `consumer_email` (required, must be a valid email address) - `access_level` Email subject and body templates are read from environment variables: - `EMAIL_SUBJECT_TEMPLATE` - `EMAIL_BODY_TEMPLATE` ## Jobs ### simpl_open_credentials_delivery_workflow Provision Gitea access credentials and send them by email to the consumer. ## Development ### Tests ```bash pytest ``` ### Docker Image ```bash docker build -t simpl-open-credential-delivery:latest . ``` ## License See LICENSE file for details. ## Authors - Mat Basile ## Version 0.1.0