Impact: High
Likelihood: Low
According to the discussion with the team, it is expected that in Space
contracts, only one Role can have the Permissions.Owner permission.
Currently, multiple Roles can be created containing this permission.
This is caused by Space.sol’s createRole() function allowing the
OpenZeppelin owner to create new owner-permissioned roles without limit.
Remediations to consider:
Do not allow multiple roles to be created with the ownership permission.
This could be done with something like: if Space.sol’s ownerRoleId is
set, do not allow new roles to be created with the Permissions.Owner
permission.
Fixes HNT-703 as well
Removing the OpenZeppelin ownership logic, and, checking directly for
the ownership of the Space’s SpaceOwner NFT. The SpaceFactory could be
the owner during the bootstrapping phase, and afterwards, could transfer
the NFT to the proper owner. Doing a direct check like
_spaceOwner().ownerOf(tokenId) == _msgSender() would be safe because
that’s what the owner entitlement is going to check eventually.
---------
Co-authored-by: Kerem Kazan <kerem.kazan@gmail.com>
this pr computes dendrite docker version from the commit hash, instead
of bumping versions. the previous setup caused issues and conflicts when
branch protection is enabled. this way we can seamlessly keep pushing to
main and it will keep getting built and published
Overloaded isEntitled func in ISpace.sol and Space.sol caused the generated client types to turn into string names. Renaming one of them to isEntitledToChannel.
- Add new functions to modify role name, permissions, token entitlement
and user entitlement with a single call
- Add new solidity tests for the new functions
- Re-generated TypeScript and Go types for both localhost and goerli
- Created a package.json in servers/dendrite. Moving forward, this file
is our canonical dendrite version, and our docker builds will depend on
this version.
- Created a script that extracts the package.json version and puts it
into the GitHub actions build environment as `RELEASE_VERSION`.
- Updated the GitHub action so that it builds and publishes the docker
image to dockerhub whenever we merge dendrite changes to main.
Co-authored-by: Automated Version Bump <gh-action-bump-version@users.noreply.github.com>