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

feat/acl: add acl support #4443

Merged
merged 22 commits into from
Mar 12, 2024
Merged

Conversation

jiefenghuang
Copy link
Contributor

  1. add interface GetFacl and SetFacl
  2. implement ACL support for three engines: TKV, Redis, and SQL.
  • sync mode and acl
  • add new acl
  • inherit from default acl
  1. vfs interface support

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 62.08477% with 331 lines in your changes are missing coverage. Please review.

Project coverage is 55.32%. Comparing base (59659db) to head (3e2de08).
Report is 21 commits behind head on main.

Files Patch % Lines
pkg/meta/redis.go 59.15% 66 Missing and 21 partials ⚠️
pkg/meta/sql.go 67.07% 58 Missing and 22 partials ⚠️
pkg/meta/tkv.go 60.71% 56 Missing and 21 partials ⚠️
pkg/meta/base.go 50.00% 34 Missing and 9 partials ⚠️
pkg/vfs/vfs.go 68.90% 25 Missing and 12 partials ⚠️
pkg/acl/cache.go 30.00% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4443      +/-   ##
==========================================
- Coverage   56.00%   55.32%   -0.69%     
==========================================
  Files         156      157       +1     
  Lines       40417    42058    +1641     
==========================================
+ Hits        22636    23269     +633     
- Misses      15262    16188     +926     
- Partials     2519     2601      +82     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jiefenghuang jiefenghuang marked this pull request as ready for review March 6, 2024 03:29
pkg/acl/acl.go Outdated Show resolved Hide resolved
pkg/meta/base.go Outdated Show resolved Hide resolved
pkg/meta/base.go Outdated Show resolved Hide resolved
Signed-off-by: jiefeng <[email protected]>
Signed-off-by: jiefeng <[email protected]>
pkg/meta/base.go Outdated Show resolved Hide resolved
pkg/meta/interface.go Outdated Show resolved Hide resolved
@@ -605,6 +635,10 @@ func (m *redisMeta) totalInodesKey() string {
return m.prefix + totalInodes
}

func (m *redisMeta) aclKey(id uint32) string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to have all these in single HashMap

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

pkg/meta/sql.go Show resolved Hide resolved
pkg/meta/sql.go Show resolved Hide resolved
pkg/meta/tkv.go Show resolved Hide resolved
pkg/vfs/vfs.go Outdated Show resolved Hide resolved
pkg/vfs/vfs.go Outdated Show resolved Hide resolved
pkg/vfs/vfs.go Outdated Show resolved Hide resolved
pkg/vfs/vfs.go Outdated Show resolved Hide resolved
pkg/meta/tkv.go Outdated Show resolved Hide resolved
pkg/meta/tkv.go Outdated Show resolved Hide resolved
pkg/meta/tkv.go Show resolved Hide resolved
pkg/meta/tkv.go Show resolved Hide resolved
pkg/meta/tkv.go Outdated Show resolved Hide resolved
pkg/meta/tkv.go Outdated Show resolved Hide resolved
@SandyXSD
Copy link
Contributor

@jiefenghuang Listxattr should display ACLs as well?

pkg/meta/base.go Outdated Show resolved Hide resolved
pkg/meta/base.go Outdated Show resolved Hide resolved
pkg/meta/tkv.go Outdated Show resolved Hide resolved
pkg/meta/tkv.go Outdated Show resolved Hide resolved
pkg/meta/redis.go Outdated Show resolved Hide resolved
pkg/meta/tkv.go Outdated Show resolved Hide resolved
@jiefenghuang jiefenghuang merged commit 61598c3 into juicedata:main Mar 12, 2024
26 checks passed
@jiefenghuang jiefenghuang mentioned this pull request Mar 13, 2024
@jiefenghuang jiefenghuang deleted the feat/acl-support branch April 15, 2024 09:35
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

Successfully merging this pull request may close these issues.

3 participants