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

Flow web app: expose unevaluated config files #517

Open
rfratto opened this issue Nov 8, 2022 · 4 comments
Open

Flow web app: expose unevaluated config files #517

rfratto opened this issue Nov 8, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@rfratto
Copy link
Member

rfratto commented Nov 8, 2022

It would be nice to have an endpoint which shows the unevaluated config file for all config blocks and components. This can be viewable in a single page (similar to Prometheus' config file endpoint), or we could also show the unevaluated config per-component when viewing a component-specific page.

However, doing this securely isn't simple: we'd still want to scrub any hard-coded strings which are passed to any attribute with a secret type.

#517

@rfratto rfratto added the enhancement New feature or request label Nov 8, 2022
@rfratto rfratto changed the title Flow: show unevaluated config file Flow UI: show unevaluated config file Nov 8, 2022
@rfratto
Copy link
Member Author

rfratto commented Nov 8, 2022

However, doing this securely isn't simple: we'd still want to scrub any hard-coded strings which are passed to any attribute with a secret type.

This should be enough to guarantee all strings used for secrets get scrubbed correctly. If we want extra safety, we could also support some kind of secret function to explicitly convert a string into a secret and hide string arguments to that.

If/when support for variables gets added in the future, we'd have to do a little more work to make sure a string doesn't get exposed, probably by doing some kind of analysis to see if a variable is ever passed to a secret-typed argument.

@xiyu95
Copy link

xiyu95 commented Nov 29, 2022

@rfratto It would be great if there is a separate ticket for frontend and one for backend, so that we can note down any important description within the ticket without getting messy 😃

@rfratto rfratto changed the title Flow UI: show unevaluated config file Flow web app: expose unevaluated config files Nov 29, 2022
@rfratto
Copy link
Member Author

rfratto commented Nov 29, 2022

@xiyu95 Sure, I turned this into a high-level issue and split the issue up:

@ptodev
Copy link
Contributor

ptodev commented Feb 10, 2023

For API endpoints like this, would it be good to require extra authentication when calling the Agent API? If I understand correctly, at the moment there is no authentication. Especially for Agent Management there might be a benefit in seeing the full unredacted config file.

@rfratto rfratto transferred this issue from grafana/agent Apr 11, 2024
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
No open projects
Development

No branches or pull requests

3 participants