|
@@ -279,12 +279,12 @@ func (e *EmqxOnPrem) GetUserACL(username string) (*aclObject, error) {
|
|
|
|
|
|
// CreateDefaultDenyRule - creates a rule to deny access to all topics for all users by default
|
|
|
// to allow user access to topics use the `mq.CreateUserAccessRule` function
|
|
|
-func (e *EmqxOnPrem) CreateDefaultDenyRule() error {
|
|
|
+func (e *EmqxOnPrem) CreateDefaultAllowRule() error {
|
|
|
token, err := getEmqxAuthToken()
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
- payload, err := json.Marshal(&aclObject{Rules: []aclRule{{Topic: "#", Permission: "deny", Action: "all"}}})
|
|
|
+ payload, err := json.Marshal(&aclObject{Rules: []aclRule{{Topic: "#", Permission: "allow", Action: "all"}}})
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
@@ -311,6 +311,7 @@ func (e *EmqxOnPrem) CreateDefaultDenyRule() error {
|
|
|
|
|
|
// CreateHostACL - create host ACL rules
|
|
|
func (e *EmqxOnPrem) CreateHostACL(hostID, serverName string) error {
|
|
|
+ return nil
|
|
|
token, err := getEmqxAuthToken()
|
|
|
if err != nil {
|
|
|
return err
|
|
@@ -365,6 +366,7 @@ var nodeAclMux sync.Mutex
|
|
|
|
|
|
// AppendNodeUpdateACL - adds ACL rule for subscribing to node updates for a node ID
|
|
|
func (e *EmqxOnPrem) AppendNodeUpdateACL(hostID, nodeNetwork, nodeID, serverName string) error {
|
|
|
+ return nil
|
|
|
nodeAclMux.Lock()
|
|
|
defer nodeAclMux.Unlock()
|
|
|
token, err := getEmqxAuthToken()
|