Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 24, 2026

Extends oJob to decrypt .yaml.enc and .json.enc files. Encrypted files are now transparently loaded alongside regular oJob files, both locally and remotely.

Implementation

  • Added 4 decryption handlers in js/owrap.oJob.js:

    • fnDownEncYAML / fnDownEncJSON for remote files
    • fnReadEncYAML / fnReadEncJSON for local files
  • Updated file extension matching to check .enc patterns before regular .yaml/.json extensions

  • Maintains consistency with existing code patterns (unsafe eval support, error handling via _load wrapper)

Usage

// Load encrypted oJob files transparently
oJob("myconfig.yaml.enc", { token: "abc123" })
oJob("https://example.com/jobs.json.enc", {})

Files are decrypted using the same mechanism as password fields throughout OpenAF. If decryption fails, the original content is returned (graceful degradation via decryptIfPossible).

Testing

Added test coverage in tests/autoTestAll.oJob.{js,yaml} verifying both YAML and JSON encrypted file loading.

Copilot AI and others added 3 commits January 24, 2026 03:01
Co-authored-by: nmaguiar <11761746+nmaguiar@users.noreply.github.com>
Co-authored-by: nmaguiar <11761746+nmaguiar@users.noreply.github.com>
Co-authored-by: nmaguiar <11761746+nmaguiar@users.noreply.github.com>
Copilot AI changed the title [WIP] Add decryption for ojob .yaml.enc and .json.enc files Add encrypted oJob file support (.yaml.enc, .json.enc) Jan 24, 2026
Copilot AI requested a review from nmaguiar January 24, 2026 03:08
@nmaguiar nmaguiar moved this from Backlog to In Progress in Continuous Enhancement Jan 24, 2026
@nmaguiar nmaguiar marked this pull request as ready for review January 24, 2026 04:15
@nmaguiar nmaguiar merged commit 002a1b0 into t8 Jan 24, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Continuous Enhancement Jan 24, 2026
@nmaguiar nmaguiar deleted the copilot/add-decrypt-feature-ojob-files branch January 24, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

2 participants