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

don't add bind and dial permissions to services for admins #1782

Closed
wants to merge 8 commits into from

Conversation

scareything
Copy link
Member

fixes #1781

@scareything scareything requested review from a team as code owners February 28, 2024 16:18
@scareything scareything marked this pull request as draft February 28, 2024 16:23
}
}
// service permissions for admin & non-admin identities will be set according to policies
service, err = result.manager.ReadForNonAdminIdentityInTx(tx, key, result.identityId)
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if this is valid when result.identityId == "" ?

@scareything scareything marked this pull request as ready for review February 28, 2024 17:02
@@ -143,10 +133,14 @@ func (self *EdgeServiceManager) ReadForIdentityInTx(tx *bbolt.Tx, id string, ide

Copy link
Member

Choose a reason for hiding this comment

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

Can we merge ReadForNonAdminIdentityInTx into ReadForIdentityInTx, as the 'NonAdmin' name is no longer accurate and the first method is now pretty short?

}
}
// service permissions for admin & non-admin identities will be set according to policies
service, err = result.manager.ReadForIdentityInTx(tx, key, result.identityId, result.configTypes)
Copy link
Member Author

Choose a reason for hiding this comment

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

☝️ this will now happen when result.identityId == "", and I'm not really sure what that means or if it's ok.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure it can happen, but we could short-circuit it in queryServices. If the identityId is "" we could return the service list result before we run the query.

@plorenz
Copy link
Member

plorenz commented Feb 29, 2024

Can you add a note to the changelog as well, please?

Copy link
Member

@plorenz plorenz left a comment

Choose a reason for hiding this comment

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

Changelog needs to be uypdated, since version numbers have changed, but otherwise, I think it looks good 👍

@scareything
Copy link
Member Author

unable to rebase due to unsigned commits in release-next. recreating PR as #1919.

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.

admin identities have bind and dial permissions to services
2 participants