Skip to main content

omraade

Omraade ([ɔmroːdeː], normally spelled område), from the Swedish word for "area", is an application that injects secrets defined via references in environment variables securely from a backend secret store. By storing references to a secret's location within a secret store rather than its content itself, a secret's actual content cannot simply be read from the environment (or an .env file etc.) by other applications. Instead, omraade then requests the referenced content from the secret store.

The most common usage for injection is running another command while only resolving secret references during the command's execution (i.e., during its runtime), discarding the resolved environment afterwards.

Usage

This project provides a command-line application omraade, either as a Python application, or optionally as a compiled binary independent of a local Python environment.

The application supports a number of command-line arguments, which can be listed via --help. The application uses subcommands to dispatch specific functionality, and subcommand-specific arguments can be listed via <subcommand> --help:

usage: app.py [-h] [--scheme SCHEME] [--backend {keepass}] [-d PATH] [-P PASSWORD] [-K KEYFILE] {run} ...

options:
  -h, --help            show this help message and exit

config:
  --scheme SCHEME       Omraade URI scheme, default: omraade
  --backend {keepass}   Omraade secret store backend, default: keepass

keepass:
  -d, --database PATH   Keepass database path
  -P, --password PASSWORD
                        Keepass database password
  -K, --keyfile KEYFILE
                        Keepass database keyfile

subcommands:
  {run}
    run

Example

Let's assume that secrets are stored in a local Keepass database. The database's filename can be specified via --database <filename>, and it's password via --password. With this information, omraade is able to find and decrypt the database.

References to secrets contained within this database can then be stored as environment variables, referencing the omraade URI scheme, e.g.:

export TEST_FOO="omraade:/First/Second/Push#token"

This instructs omraade to look for a secret with the title Push, located in the nested groups First -> Second. The URI fragment further instructs omraade to return the value from the token attribute (or it's default password attribute if unspecified).

In order to wrap the command printenv by running omraade run --database <filename> --password <password> -- printenv, the omraade application first unlocks the relevant database, then replaces all valid omraade URIs with their resolved values from the Keepass database, and sets this as the active environment for the printenv command. The environment is not exported, so as soon as the wrapped command returns, omraade terminates, thus both discarding the resolved values in its temporary environment and closing the open database again.

Development

This project is written in python3. It uses uv for dependency management, pytest for testing, black for formatting, and nuitka for binary compilation.

Metadata

Release files for omraade 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for omraade 1.0.1
File Interpreter ABI Platform Actions
omraade-1.0.1-py3-none-any.whl Python 3 none any Details for omraade-1.0.1-py3-none-any.whl

Release files / omraade-1.0.1-py3-none-any.whl

Download URL omraade-1.0.1-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
581c6aafc9137c54cc8ba62be4e4934d7c54fb76e9a7fa09052f27c948218ab8
BLAKE2b-256 checksum
How to use checksums
dd38951579371b717bb9b491b52c111527ec1e6d4fa6993f2643a001c76896dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.10

Security for omraade 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page