Open asachs01 opened 4 years ago
@nikkixdev here's another one for the assets discussion
Feature spec:
SOME_VAR: {{ assetEnv "sensu/ruby:1.1.1" "ENV_VAR_FOO" }}
assetEnv
(see defaultFunc as an example)ENV_VAR_FOO
above) of the asset through this functionRequires https://github.com/sensu/sensu-go/issues/3639 Requires https://github.com/sensu/sensu-go/issues/3492
I believe the spec on this issue is incorrect. Perhaps it was posted to the wrong issue?
The user story described in this issue can be satisfied by the following feature:
secret
.Environment variables don't come into play, as these headers are used outside any shell execution context.
@echlebek Thanks for the clarification, that's super useful!
That being said, I'm still not sure how the secret would be transmitted from the backend to the agent, in case the asset is executed on the agent.
Right now, whenever a check requires a secret, the backend (schedulerd) will substitute the secret tokens with the secret value. It means the backend would also need to be aware of the assets required by the agent and somehow provide those secrets too?
I suppose that we would need to modify the system to also send secrets for the asset to the agent.
Sorry for the confusion! I originally filed https://github.com/sensu/sensu-go/issues/3697 based on the technical specifications we swarmed on as a team. At the time I believed that spec would satisfy the user story described in this issue, so I closed it out in favor of this one. If that is not the case, should we re-open https://github.com/sensu/sensu-go/issues/3697 if the spec is still relevant to a desired use case?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This discussion seems to have gone stale without coming to a conclusion.
Re-opening.
Should #3697 be re-opened as well? As it seems from previous comments the secret template function sounds like its part of the necessary implementation so secrets can be injected via token substitution.
As a user who has security restrictions around using external repositories to provide assets, I'd like to have the ability to provide an asset configuration which specifies header information (like tokens or user/password auth) in the form of a secret or an environment variable. Ideally, this would look something like: