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

ACT #11

Closed
wants to merge 12 commits into from
Closed

ACT #11

wants to merge 12 commits into from

Conversation

aranyia
Copy link
Collaborator

@aranyia aranyia commented Mar 14, 2024

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Access control (ACT) implementation

The Access Control Trie (ACT) is a data structure that stores access control information for Swarm nodes. It is used to determine whether a node has permission to access a particular resource.

SWIP

See the SWIP draft PR for more details.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

Copy link

@zelig zelig left a comment

Choose a reason for hiding this comment

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

preliminary partial review.
observe golang style:

  • no underscores, only Camelcase
  • no need to put non-public methods to interface
  • no redundancy in names: dynamicaccess/accesslogic -> access/logic
  • comment everything, never write a public function or introduce a public struct without comment. comment fields of a struct too.
  • only English, no Hungarian in the code, including comments and all identifiers like variables, function names, fields

pkg/dynamicaccess/accesslogic.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/accesslogic.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/accesslogic.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/accesslogic.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/act.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/act.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/act.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/act.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/act.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/session.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/session.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/session_test.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/session_test.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/session_test.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/timestamp.go Outdated Show resolved Hide resolved
pkg/kvs/kvs.go Outdated Show resolved Hide resolved
pkg/kvs/kvs.go Outdated Show resolved Hide resolved
pkg/kvs/manifest/kvs.go Outdated Show resolved Hide resolved
pkg/kvs/manifest/kvs.go Outdated Show resolved Hide resolved
@bosi95 bosi95 mentioned this pull request Mar 25, 2024
4 tasks
Copy link

@zelig zelig left a comment

Choose a reason for hiding this comment

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

I stopped reviewing this... terrible state

pkg/dynamicaccess/accesslogic.go Outdated Show resolved Hide resolved

// Adds a new grantee to the ACT
func (al ActLogic) AddGrantee(ctx context.Context, storage kvs.KeyValueStore, publisherPubKey, granteePubKey *ecdsa.PublicKey, accessKeyPointer *encryption.Key) error {
var accessKey encryption.Key
Copy link

Choose a reason for hiding this comment

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

accessKey should be initialised as a field of actLogic right?

Copy link

Choose a reason for hiding this comment

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

I think there is no need to store the accessKey as member

pkg/dynamicaccess/accesslogic.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/accesslogic.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/accesslogic.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/accesslogic.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/accesslogic.go Outdated Show resolved Hide resolved
pkg/dynamicaccess/accesslogic_test.go Outdated Show resolved Hide resolved
@aranyia
Copy link
Collaborator Author

aranyia commented May 13, 2024

I stopped reviewing this... terrible state

@zelig The act-grantees branch has the latest state of the ACT feature. We were holding on merging that into this branch, until that part becomes fully functional and without issues.

We are also planning to have another look at this branch and do some refactoring and optimizations before this main feature branch PR is finalized.
We will make sure these comments will be addressed there if they weren't covered yet in act-grantees.

ottpeter
ottpeter previously approved these changes May 17, 2024
@aranyia aranyia mentioned this pull request May 22, 2024
4 tasks
@aranyia aranyia force-pushed the act branch 2 times, most recently from 8f6be5b to 20e42fa Compare July 9, 2024 14:19
@aranyia aranyia marked this pull request as ready for review July 9, 2024 14:31
@gacevicljubisa
Copy link

If you need to test your changes against some other (specific) beekeeper branch, you can do it by changing the beekeeper branch on this line

BEEKEEPER_BRANCH: "master"
(replace with BEEKEEPER_BRANCH: "feat/act")
just make sure that you return it to "master" branch before the merge.

@aranyia aranyia force-pushed the act branch 2 times, most recently from 5cb87b6 to cb80041 Compare July 25, 2024 09:39
@aranyia
Copy link
Collaborator Author

aranyia commented Aug 8, 2024

This branch was merged into the ethersphere/bee master branch as part of PR #4692.

@aranyia aranyia closed this Aug 8, 2024
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.

7 participants