Skip to content

Refactor the Secrets utility to be extendable #6

@joan38

Description

@joan38

Motivation

The current Secret management utility object suffers from multiple flaws:

  1. It's not thread safe since https://github.com/Orkestra-Tech/orkestra/blob/master/orkestra-core/src/main/scala/tech/orkestra/utils/Secrets.scala#L4 is mutable without any atomicity.
  2. Is working with env var only and we might want to use something like HashiCorp Vault instead of the Kubernetes Env var Secrets.

Proposed change

Implementing a trait LogObfuscator as replacement of the Secrets object that would be responsible to obfuscate log and would be expected as input to the creation of a Job.
We would provide a default thread safe implementation for Kubernetes Env var Secrets and people would be free to implement one for any other sensible data provider that should not be logged.

This was one found on the spot, please tell me if you have a better idea.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions