mirror of
https://github.com/datarhei/core.git
synced 2025-10-05 07:57:13 +08:00
Fix reloading policies, add API endpoints for observing internal cluster state
This commit is contained in:
@@ -73,6 +73,7 @@ type Cluster interface {
|
||||
|
||||
IAM(superuser iamidentity.User, jwtRealm, jwtSecret string) (iam.IAM, error)
|
||||
ListIdentities() store.Users
|
||||
ListPolicies() store.Policies
|
||||
AddIdentity(origin string, identity iamidentity.User) error
|
||||
SetPolicies(origin, name string, policies []iamaccess.Policy) error
|
||||
RemoveIdentity(origin string, name string) error
|
||||
@@ -782,6 +783,10 @@ func (c *cluster) ListIdentities() store.Users {
|
||||
return c.store.UserList()
|
||||
}
|
||||
|
||||
func (c *cluster) ListPolicies() store.Policies {
|
||||
return c.store.PolicyList()
|
||||
}
|
||||
|
||||
func (c *cluster) AddIdentity(origin string, identity iamidentity.User) error {
|
||||
if !c.IsRaftLeader() {
|
||||
return c.forwarder.AddIdentity(origin, identity)
|
||||
|
Reference in New Issue
Block a user