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 request: declarative cache configuration. #169

Open
henningphan opened this issue Sep 3, 2024 · 5 comments
Open

Feature request: declarative cache configuration. #169

henningphan opened this issue Sep 3, 2024 · 5 comments

Comments

@henningphan
Copy link

Hello,
Would be nice if the attic server config would have options for caches and their settings so its not a manual process to create them.
Example

declarative = (hard|soft|true|false)
[cache.my_cache]
public = true
retention = 2 days

[cache.my_other_cache]
public = false
retention = 3 days

The global declarative option dictates if caches without a corresponding config section should be deleted.

@vonjackets
Copy link

Scripting the initialization, authentication, and cache creation steps feels like an intuitive workflow at the moment, despite the imperative nature of it. This feature could introduce security concerns. If a bad actor gains access to the server, declares a poisonous caches without clients knowing it could be a big problem. Figuring out a logging solution to create an audit trail to ensure we know who made the caches and when may be a big piece of this.

@LoganBarnett
Copy link

LoganBarnett commented Nov 24, 2024

How would a declarative configuration be any different (or worse) in security posture than a home rolled, scripted solution?

Edit: Typo.

@henningphan
Copy link
Author

@vonjackets
I would say scripting has bigger flaws, if we have configuration as code I can clearly see if the attic config has drifted by just comparing to my casc. But its not easy to see if it has drifted if we have to script it, because scripting usually just activates settings we want, but doesnt remove already preactivated configurations

Also if its only deployed through a cicd pipeline I can also see who made the change in git so we get some sort of audit trail by git logs, extra powerful if we can just check for intruders by checking if we drift.

@vonjackets
Copy link

But its not easy to see if it has drifted if we have to script it, because scripting usually just activates settings we want, but doesnt remove already preactivated configurations
I agree here. A declarative setup would eliminate any need/desire for that part of the setup. Though I'm still new to this project (and nix) myself. Do you have a solution in mind? @henningphan

Also if its only deployed through a cicd pipeline I can also see who made the change in git so we get some sort of audit trail by git logs, extra powerful if we can just check for intruders by checking if we drift.
Pairing that with logs that detail how subsequent caches got created via the client would enable a lot of fact-finding! Perhaps that could be another quality of life improvement

@henningphan
Copy link
Author

@vonjackets I outlined a solution when I opened this feature request, I would guess the database holds the state and the config would check against the database what needs to change. I dont have any code as Im not familiar with rust.

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

No branches or pull requests

3 participants