Metadata-Version: 2.4
Name: oaa-runner
Version: 0.4.0
Summary: An OAA Local Runner
Author-email: Kajigga <kajigga@gmail.com>
Maintainer-email: Kajigga <kajigga@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://kajigga.github.io/oaa_generic/
Project-URL: Documentation, https://kajigga.github.io/oaa_generic/
Project-URL: Repository, http://github.com/kajigga/oaa_generic
Project-URL: Issues, http://github.com/kajigga/oaa_generic/issues
Description-Content-Type: text/markdown
Requires-Dist: petl==1.7.17
Requires-Dist: fire==0.7.1
Requires-Dist: oaaclient
Requires-Dist: email_validator==2.2.0
Requires-Dist: python-dotenv==1.1.1
Requires-Dist: requests<3,>=2.28
Requires-Dist: pydantic<3,>=2.0
Requires-Dist: python-dateutil<3,>=2.9
Requires-Dist: pyyaml<7,>=6.0
Requires-Dist: anytree<3,>=2.12
Requires-Dist: Jinja2<4,>=3.1
Requires-Dist: prance
Requires-Dist: openapi-spec-validator
Provides-Extra: mysql
Requires-Dist: pymysql; extra == "mysql"
Provides-Extra: sql
Requires-Dist: pymssql; extra == "sql"
Provides-Extra: dev
Requires-Dist: bpython; extra == "dev"
Requires-Dist: ipdb; extra == "dev"
Requires-Dist: ipython; extra == "dev"
Requires-Dist: pylint; extra == "dev"
Requires-Dist: faker; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-coverage; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: requests-mock; extra == "dev"
Requires-Dist: build; extra == "dev"
Provides-Extra: oracle
Requires-Dist: oracledb; extra == "oracle"
Provides-Extra: security
Requires-Dist: bandit<2,>=1.7; extra == "security"
Dynamic: provides-extra
Dynamic: requires-dist

# OAA Runner

`oaa-runner` is a framework for building and running data integrations that push identity and access data to [Veza](https://www.veza.com/) using the Open Authorization API (OAA).

It handles reading from sources (REST APIs, databases, CSV files, and more), applying field mappings and transforms, and uploading the result to Veza. You write a small module that fetches your data; the runner takes care of the rest.

## How it works

Integrations are defined by a `config.yaml` file:

```yaml
version: v2
veza_url: https://your-veza-instance.example.com
app:
  name: my_app
  application_type: my_app
sources:
  users:
    destination: LocalUser
    source_type: csv
    csv_filepath: ./data/users.csv
    field_mapping:
      UserID:
        destination_field: unique_id
      name:
        destination_field: name
```

Fields can be transformed before they are uploaded, for example combining
first/last name into a display name or normalizing an admin flag:

```yaml
sources:
  users:
    destination: LocalUser
    source_type: csv
    csv_filepath: ./data/users.csv
    field_mapping:
      UserID:
        destination_field: unique_id
      name:
        destination_field: name
        transforms:
          - name: jinja_render
            options:
              template: "{{row.firstName}} {{row.lastName}}"
      IS_ADMIN:
        destination_field: is_admin
        custom_type: BOOLEAN
        transforms:
          - name: validate_boolean
```

Features:

- Source types: REST APIs, SQL/MySQL/Oracle databases, and CSV files
- Field mappings with transforms (Jinja templates, date conversion, lookups, joins, and more)
- Hooks for pre-run validation and transform-time customization
- Dry-run, no-push, and JSON-output modes for testing without writing to Veza
- A `bundle` command to package an integration for deployment

## Install

```sh
uv tool install oaa-runner
```

## Quick start

```sh
oaa-run custom_app run --config-file=./config.yaml
```

Useful commands:

```sh
# Validate a config without running a full sync
oaa-run validate_config --config-file=./config.yaml

# List supported IdP provider types
oaa-run oaa_utils idp_provider_types

# List valid custom property types
oaa-run oaa_utils oaa_property_types

# Show the parsed config
oaa-run custom_app show_config --config-file=./config.yaml
```

## Documentation

Full documentation is available at [kajigga.github.io/oaa_generic](https://kajigga.github.io/oaa_generic).
