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

set more restricted permissions for store #197

Open
lukas016 opened this issue Feb 21, 2024 · 4 comments · May be fixed by #215
Open

set more restricted permissions for store #197

lukas016 opened this issue Feb 21, 2024 · 4 comments · May be fixed by #215
Assignees
Labels
enhancement New feature or request prio-low

Comments

@lukas016
Copy link
Contributor

Summary

Using 0777 and 0666 permissions aren't best practice. Main problem is everybody can edit folders or files, what can create unexpected problems for us and it is security risk.

I recommend change it to 0750 for folder and 0640 for file.

0750 for folder can be maybe problematic for libvirt daemon.

Pls fix return of error in set function in the issue: https://github.com/ironcore-dev/libvirt-provider/blob/main/pkg/host/store.go#L238

Motivation

Better security.

@lukas016 lukas016 added the enhancement New feature or request label Feb 21, 2024
@github-project-automation github-project-automation bot moved this to Todo in Compute Feb 21, 2024
@so-sahu
Copy link
Contributor

so-sahu commented Feb 21, 2024

I would also suggest defining two exported constants and using them universally instead of having individual constants scattered throughout the packages at the package level. This can make it easier to maintain and update constants in the future.

@lukas016
Copy link
Contributor Author

I would also suggest defining two exported constants and using them universally instead of having individual constants scattered throughout the packages at the package level. This can make it easier to maintain and update constants in the future.

I don't think it is possible, it always will depend on use-cases. I don't want to push use only one specific permissions. It can be problematic.

@so-sahu
Copy link
Contributor

so-sahu commented Feb 21, 2024

If the same permissions are used in multiple places, wouldn't it make sense to centralize them in one location and then reference them elsewhere?

@lukas016
Copy link
Contributor Author

Depends on folder structure. If you create one package for constants, it can be use. But using of constants from multiple packages cross whole project can be problematic because you cannot create cycle dependency between packages.

And when we create one package for constants it will ideally put every constants into this package what i don't recommend do in this Issue and create follow up issue for that.

@lukas016 lukas016 self-assigned this Mar 1, 2024
@lukas016 lukas016 moved this from Todo to In Progress in Compute Mar 1, 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 prio-low
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants