mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 23:15:57 +03:00
[GH-ISSUE #518] TacticalRMM console storage for Environmental Variables available to scripts and agents. #2270
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#2270
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wiicode on GitHub (May 18, 2021).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/518
Is your feature request related to a problem? Please describe.
When doing script work I occasionally need system unique variables, or even secrets, passed to a machine. This may be something like a special value unique to the system (local) or something like a generic URL to a resource (global).
Describe the solution you'd like
I would like each config on the webUIX side to have an Environment Variables section, much like AWS does for Elastic Beanstalk, where I could store parameters and even secrets. I would like that storage to obfuscate and hash the variables, and then decrypt them locally for usage when needed. They would respond just like all other environment variables. Actually, it would be great if it had a set of globals, org-level globals, and local (per agent) tiers to really help functionality.
Describe alternatives you've considered
So far I've had to rely on encrypted key files, local system environment variables, or bad practices. It's a pain in either case and often extremely risky.
Additional context
@bradhawkins85 commented on GitHub (May 18, 2021):
Global Keystore: https://wh1te909.github.io/tacticalrmm/functions/keystore/
or Custom Fields https://wh1te909.github.io/tacticalrmm/functions/custom_fields/
Might be what you are looking for.
Not sure if it obfuscate and hash the variables but it would probably be a start.
@wiicode commented on GitHub (May 18, 2021):
thanks @bradhawkins85 , I may be caught up in the semantics, but custom fields I see as only useful to TacticalRMM whereas environment variables are useful to the instance. Say I had a software that needed to retrieve a license key, it could do it from an env variable independently of the agent/rmm.
@sadnub commented on GitHub (May 20, 2021):
You can save data into custom fields and inject that data into scripts as arguments. You can even use collector tasks to save data from agents to a custom field.
So the script args would be like -API_KEY {{global.API_KEY}} and the value in the database will be replaced.
Since we are using args the script itself can be used on any platform.
Let me know if that covers your use case.