Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support system/environment variable substitutions #261

Closed
dbwiddis opened this issue Dec 7, 2023 · 2 comments
Closed

[FEATURE] Support system/environment variable substitutions #261

dbwiddis opened this issue Dec 7, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@dbwiddis
Copy link
Member

dbwiddis commented Dec 7, 2023

Is your feature request related to a problem?

API credentials (access key, user/password, etc.) are needed for some workflow steps and should not be stored in a workflow, but may be available on the user's personal machine (as an environment variable) or passed on the command line at program start (the -E switch on OpenSearch). We need a way to do run-time substitutions based on available environment parameters or system properties. These values should not be stored (unencrypted) with the workflow, however.

What solution would you like?

Have a designated workflow substitution like ${env.FOOBAR} that fetches System.genEnv() with a possible override from System.getProperty("FOOBAR") at a minimum.

This step should ideally occur right before they're encrypted.

Do you have any additional context?

There are more complicated ways of fetching the info, such as from a server, that we can fetch later.

@dbwiddis dbwiddis added enhancement New feature or request untriaged labels Dec 7, 2023
@minalsha minalsha removed the untriaged label Dec 7, 2023
@dbwiddis
Copy link
Member Author

dbwiddis commented Dec 8, 2023

To be clear on the use case/benefit of this:

  • Two users can have an identical workflow template file, but each has their own API key. They can both run the same template text but it'll act differently on their machines.
  • WE can put a template in CI for testing and use GitHub secrets to enable it on particular API endpoints

@dbwiddis
Copy link
Member Author

dbwiddis commented Dec 9, 2023

After further consideration, I've realized this idea was born of local testing convenience and isn't really useful.

The use of environment variables requires them to be present on every node, which isn't practical. There's a possibility that properites might be passed on the command line, but that's highly unlikely for the envisioned use case here of runtime credential substitution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants