Projects tigase _server server-core Issues #813
ACL commands configuration doesn't work (#813)
wojciech.kapcia@tigase.net opened 8 years ago

There is seemingly similar issue (#5426) but it's related to conversion (and splitting on slashes during conversion I guess). However even after conversion ACL doesn't work:

'sess-man' {
    'dynamic-roster-classes' = 'tigase.xmpp.impl.roster.DynamicRosterTest'
    amp {
        'msg-offline' = 'false'
    }
    command {
        'connection-time' = 'LOCAL'
        'roster-fixer' = 'LOCAL'
        'roster-fixer-cluster' = 'LOCAL'
        'user-domain-perm' = 'LOCAL'
        'user-roster-management' = 'LOCAL'
        'user-roster-management-ext' = 'LOCAL'

        'http\://jabber.org/protocol/admin#add-user' = 'LOCAL'
        'http\://jabber.org/protocol/admin#delete-user' = 'LOCAL'
        'http\://jabber.org/protocol/admin#change-user-password' = 'LOCAL'
        'http\://jabber.org/protocol/admin#get-user-roster' = 'LOCAL'
        'http\://jabber.org/protocol/admin#user-stats' = 'LOCAL'
        'http\://jabber.org/protocol/admin#get-active-users-num' = 'LOCAL'
        'http\://jabber.org/protocol/admin#get-idle-users-num' = 'LOCAL'
        'http\://jabber.org/protocol/admin#get-registered-users-list' = 'LOCAL'
        'http\://jabber.org/protocol/admin#get-online-users-list' = 'LOCAL'
        'http\://jabber.org/protocol/admin#get-active-users' = 'LOCAL'
        'http\://jabber.org/protocol/admin#get-idle-users' = 'LOCAL'
        'http\://jabber.org/protocol/admin#announce' = 'LOCAL'
        'http\://jabber.org/protocol/admin#add-user-tracker' = 'LOCAL'
        'http\://jabber.org/protocol/admin#get-top-active-users' = 'LOCAL'
        'http\://jabber.org/protocol/admin#remove-user-tracker' = 'LOCAL'
    }
}

Please refer to Access Control Lists in Tigase for details. Basically with the above configuration any local user should be able to execute command.

Andrzej Wójcik (Tigase) commented 8 years ago

I've updated documentation in task #5427 as config you prepared was invalid - commands should be used instead of @command@.

wojciech.kapcia@tigase.net commented 8 years ago

Works now:

wojtek@atlantiscity.local ~/dev/tigase/tigase-testsuite $ ./scripts/all-tests-runner.sh --other scripts/xmpts/
admin-commands-tests.xmpt   large-queue-small-mem.xmpt  multi-thread-tests.xmpt     privacy-lists.xmpt          tls-required.xmpt
basic-tests.xmpt            large-queue.xmpt            packet-order.xmpt           pubsub-tests.xmpt           vhosts-tests.xmpt
extras.xmpt                 muc-tests.xmpt              presence-subscription.xmpt  ssl-tls.xmpt
wojtek@atlantiscity.local ~/dev/tigase/tigase-testsuite $ ./scripts/all-tests-runner.sh --other scripts/xmpts/admin-commands-tests.xmpt
Tigase server home directory: /Users/wojtek/dev/tmps/tigase-server-dists/tigase-issue #7.2.0-SNAPSHOT-b4803
Version: 7.2.0-SNAPSHOT-b4803
Output dir: files/static/tests/7.2.0-SNAPSHOT-b4803
Test type:        other
Database:         mysql
Database IP:      localhost
Server directory: /Users/wojtek/dev/tmps/tigase-server-dists/tigase-issue #7.2.0-SNAPSHOT-b4803
Server IP:        127.0.0.1
Extra parameters: scripts/xmpts/admin-commands-tests.xmpt
Re-creating database: mysql

…

Picked up JAVA_TOOL_OPTIONS: -Djava.awt.headless=true
Script name: scripts/add-admin.xmpt
Init 0:  JEP-0077 - In-Band Registration, register  ... success,  Total: 294ms

Running: 7.2.0-SNAPSHOT-b4803-mysql test, IP 127.0.0.1...
Picked up JAVA_TOOL_OPTIONS: -Djava.awt.headless=true
Script name: scripts/xmpts/admin-commands-tests.xmpt
Prep 1:  Create a regular server account  ... success,  Total: 208ms
Prep 2:  Create domain owner account  ... success,  Total: 22ms
Prep 3:  Create a domain admin account  ... success,  Total: 19ms
Prep 4:  Create a regular VHost account  ... success,  Total: 23ms
Prep 5:  Configuring VHost in regard of different rights for different users  ... success,  Total: 260ms
Prep 6:  Add user to the test user roster  ... success,  Total: 324ms
Prep 7:  Add user to the test user roster (VHost)  ... success,  Total: 36ms
AdminAdHoc 4_1-1:  XEP-0133: 4.1. Add User :: (server-user) as (server-admin)  ... success,  Total: 80ms
AdminAdHoc 4_1-2:  XEP-0133: 4.1. Add User :: (domain-user) as (server-admin)  ... success,  Total: 53ms
AdminAdHoc 4_1-3:  XEP-0133: 4.1. Add User :: (server-user) as (domain-admin) (expecting error)  ... success,  Total: 59ms
AdminAdHoc 4_1-4:  XEP-0133: 4.1. Add User :: (domain-user) as (domain-admin)  ... success,  Total: 60ms
AdminAdHoc 4_2-1:  XEP-0133: 4.2. Delete User :: (server-user) as (server-admin)  ... success,  Total: 186ms
AdminAdHoc 4_2-2:  XEP-0133: 4.2. Delete User :: (domain-user) as (server-admin)  ... success,  Total: 32ms
AdminAdHoc 4_2-3:  XEP-0133: 4.2. Delete User :: (server-user) as (domain-admin) (expecting error)  ... success,  Total: 27ms
AdminAdHoc 4_2-4:  XEP-0133: 4.2. Delete User :: (domain-user) as (domain-admin)  ... success,  Total: 29ms
AdminAdHoc 4_7-1:  XEP-0133: 4.7. Change User Password :: (server-user) as (server-admin)  ... success,  Total: 56ms
AdminAdHoc 4_7-2:  XEP-0133: 4.7. Change User Password :: (domain-user) as (server-admin)  ... success,  Total: 30ms
AdminAdHoc 4_7-3:  XEP-0133: 4.7. Change User Password :: (server-user) as (domain-admin) (expecting error)  ... success,  Total: 32ms
AdminAdHoc 4_7-4:  XEP-0133: 4.7. Change User Password :: (domain-user) as (domain-admin)  ... success,  Total: 25ms
AdminAdHoc 4_8-1:  XEP-0133: 4.8. Get User Roster :: (server-user) as (server-admin)  ... success,  Total: 84ms
AdminAdHoc 4_8-2:  XEP-0133: 4.8. Get User Roster :: (domain-user) as (server-admin)  ... success,  Total: 34ms
AdminAdHoc 4_8-3:  XEP-0133: 4.8. Get User Roster :: (server-user) as (domain-admin) (expecting error)  ... success,  Total: 30ms
AdminAdHoc 4_8-4:  XEP-0133: 4.8. Get User Roster :: (domain-user) as (domain-admin)  ... success,  Total: 57ms
AdminAdHoc 4_10-1:  XEP-0133: 4.10. Get User Statistics :: statistics of (server-user) user as (server-admin)  ... success,  Total: 63ms
AdminAdHoc 4_10-2:  XEP-0133: 4.10. Get User Statistics :: statistics of (domain-user) user as (server-admin)  ... success,  Total: 37ms
AdminAdHoc 4_10-3:  XEP-0133: 4.10. Get User Statistics :: statistics of (server-user) user as (domain-admin) [expecting error]  ... success,  Total: 39ms
AdminAdHoc 4_10-4:  XEP-0133: 4.10. Get User Statistics :: statistics of (domain-user) user as (domain-admin)  ... success,  Total: 43ms
AdminAdHoc 4_16-1:  XEP-0133: 4.16. Get Number of Active Users :: server test-d user number as (server-admin)  ... success,  Total: 166ms
AdminAdHoc 4_16-2:  XEP-0133: 4.16. Get Number of Active Users :: VHost test-domain user number as (server-admin)  ... success,  Total: 30ms
AdminAdHoc 4_16-3:  XEP-0133: 4.16. Get Number of Active Users :: server test-d user number as (server-admin) [expecting error]  ... success,  Total: 41ms
AdminAdHoc 4_16-4:  XEP-0133: 4.16. Get Number of Active Users :: VHost test-domain user number as (domain-admin)  ... success,  Total: 30ms
AdminAdHoc 4_17-1:  XEP-0133: 4.17. Get Number of Idle Users :: server test-d user number as (server-admin)  ... success,  Total: 85ms
AdminAdHoc 4_17-2:  XEP-0133: 4.17. Get Number of Idle Users :: VHost test-domain user number as (server-admin)  ... success,  Total: 26ms
AdminAdHoc 4_17-3:  XEP-0133: 4.17. Get Number of Idle Users :: server test-d user number as (server-admin) [expecting error]  ... success,  Total: 31ms
AdminAdHoc 4_17-4:  XEP-0133: 4.17. Get Number of Idle Users :: VHost test-domain user number as (domain-admin)  ... success,  Total: 26ms
AdminAdHoc 4_18-1:  XEP-0133: 4.18. Get List of Registered Users :: server test-d user list as (server-admin)  ... success,  Total: 115ms
AdminAdHoc 4_18-2:  XEP-0133: 4.18. Get List of Registered Users :: VHost test-domain user list as (server-admin)  ... success,  Total: 28ms
AdminAdHoc 4_18-3:  XEP-0133: 4.18. Get List of Registered Users :: server test-d user list as (server-admin) [expecting error]  ... success,  Total: 33ms
AdminAdHoc 4_18-4:  XEP-0133: 4.18. Get List of Registered Users :: VHost test-domain user list as (domain-admin)  ... success,  Total: 28ms
AdminAdHoc 4_20-1:  XEP-0133: 4.20. Get List of Online Users :: server test-d user list as (server-admin)  ... success,  Total: 114ms
AdminAdHoc 4_20-2:  XEP-0133: 4.20. Get List of Online Users :: VHost test-domain user list as (server-admin)  ... success,  Total: 26ms
AdminAdHoc 4_20-3:  XEP-0133: 4.20. Get List of Online Users :: server test-d user list as (server-admin) [expecting error]  ... success,  Total: 28ms
AdminAdHoc 4_20-4:  XEP-0133: 4.20. Get List of Online Users :: VHost test-domain user list as (domain-admin)  ... success,  Total: 27ms
AdminAdHoc 4_21-1:  XEP-0133: 4.21. Get List of Active Users :: server test-d user list as (server-admin)  ... success,  Total: 93ms
AdminAdHoc 4_21-2:  XEP-0133: 4.21. Get List of Active Users :: VHost test-domain user list as (server-admin)  ... success,  Total: 25ms
AdminAdHoc 4_21-3:  XEP-0133: 4.21. Get List of Active Users :: server test-d user list as (server-admin) [expecting error]  ... success,  Total: 26ms
AdminAdHoc 4_21-4:  XEP-0133: 4.21. Get List of Active Users :: VHost test-domain user list as (domain-admin)  ... success,  Total: 26ms
AdminAdHoc 4_22-1:  XEP-0133: 4.22. Get List of Idle Users :: server test-d user list as (server-admin)  ... success,  Total: 89ms
AdminAdHoc 4_22-2:  XEP-0133: 4.22. Get List of Idle Users :: VHost test-domain user list as (server-admin)  ... success,  Total: 23ms
AdminAdHoc 4_22-3:  XEP-0133: 4.22. Get List of Idle Users :: server test-d user list as (server-admin) [expecting error]  ... success,  Total: 34ms
AdminAdHoc 4_22-4:  XEP-0133: 4.22. Get List of Idle Users :: VHost test-domain user list as (domain-admin)  ... success,  Total: 23ms
AdminAdHoc 4_23-1:  XEP-0133: 4.23 Send Announcement to Online Users :: sending announcement as (server-admin)  ... success,  Total: 1607ms
Prep-deamon 1:  Create a daemon user account  ... success,  Total: 1520ms
Prep-deamon 2:  Setup a user daemon wating for messages  ... success,  Total: 503ms
Prep-deamon 3:  Create a daemon domain-user account  ... success,  Total: 1518ms
Prep-deamon 4:  Setup a domain-user daemon wating for messages  ... success,  Total: 502ms
AdminAdHoc 4_23-2:  XEP-0133: 4.23 Send Announcement to Online Users :: sending announcement as (domain-admin) [expecting response only from domain users] [[n/a]]  ... success,  Total: 1528ms
Prep-deamon 1:  Create a daemon user account  ... FAILURE,  Total: 1524ms
Prep-deamon 2:  Setup a user daemon wating for messages  ... success,  Total: 502ms
Prep-deamon 3:  Create a daemon domain-user account  ... FAILURE,  Total: 1516ms
Prep-deamon 4:  Setup a domain-user daemon wating for messages  ... success,  Total: 501ms
AdminAdHoc Monitor_1_1:  Execute script monitor/LoadErrors as (server-admin)  ... success,  Total: 44ms
AdminAdHoc Monitor_1_2:  Execute script monitor/LoadErrors as (domain-admin) [expecting error]  ... success,  Total: 25ms
AdminAdHoc BasicConf_1_1:  Execute script basic-conf/ListConfiguration as (server-admin)  ...        failure!
…
AdminAdHoc BasicConf_1_2:  Execute script basic-conf/ListConfiguration as (domain-admin) [expecting error]  ...        failure!
…
AdminAdHoc BasicConf_2_1:  Execute script basic-conf/UpdateConfiguration as (server-admin)  ...        failure!
…
AdminAdHoc BasicConf_2_2:  Execute script basic-conf/UpdateConfiguration as (domain-admin) [expecting error]  ...        failure!
…
AdminAdHoc BasicConf_3_1:  Execute script basic-conf/GetAnyFile as (server-admin)  ...        failure!
…
AdminAdHoc BasicConf_3_2:  Execute script basic-conf/GetAnyFile as (domain-admin) [expecting error]  ...        failure!
…
AdminAdHoc BasicConf_4_1:  Execute script basic-conf/GetConfigurationFile as (server-admin)  ...        failure!
…
AdminAdHoc BasicConf_4_2:  Execute script basic-conf/GetConfigurationFile as (domain-admin) [expecting error]  ...        failure!
…
AdminAdHoc BasicConf_5_1:  Execute script basic-conf/Get_init.properties_configuration as (server-admin)  ...        failure!
…
AdminAdHoc BasicConf_5_2:  Execute script basic-conf/Get_init.properties_configuration as (domain-admin) [expecting error]  ...        failure!
…
AdminAdHoc BasicConf_6_1:  Execute script basic-conf/Manage active server components: List as (server-admin)  ...        failure!
…
AdminAdHoc BasicConf_6_2:  Execute script basic-conf/Manage active server components: List as (domain-admin) [expecting error]  ...        failure!
…
AdminAdHoc BasicConf_7_1:  Execute script basic-conf/Manage active server components: Edit as (server-admin)  ...        failure!
…
AdminAdHoc BasicConf_7_2:  Execute script basic-conf/Manage active server components: Edit as (domain-admin) [expecting error]  ...        failure!
…
AdminAdHoc BasicConf_8_1:  Execute script basic-conf/Manage active server components: Remove as (server-admin)  ...        failure!
…
AdminAdHoc BasicConf_8_2:  Execute script basic-conf/Manage active server components: Remove as (domain-admin) [expecting error]  ...        failure!
…
AdminAdHoc BasicConf_9_1:  Execute script basic-conf/Manage active server components: Add as (server-admin)  ...        failure!
…
AdminAdHoc BasicConf_9_2:  Execute script basic-conf/Manage active server components: Add as (domain-admin) [expecting error]  ...        failure!
…
AdminAdHoc s2s_1_1:  Execute script s2s/Bad State Connections as (server-admin)  ... success,  Total: 42ms
AdminAdHoc s2s_1_2:  Execute script s2s/Bad State Connections as (domain-admin) [expecting error]  ... success,  Total: 30ms
AdminAdHoc s2s_2_1:  Execute script s2s/Reset Bad State Connections as (server-admin)  ... success,  Total: 49ms
AdminAdHoc s2s_2_2:  Execute script s2s/Reset Bad State Connections as (domain-admin) [expecting error]  ... success,  Total: 28ms
AdminAdHoc s2s_3_1:  Execute script s2s/Get CID connection state as (server-admin)  ... success,  Total: 53ms
AdminAdHoc s2s_3_2:  Execute script s2s/Get CID connection state as (domain-admin) [expecting error]  ... success,  Total: 24ms
AdminAdHoc Stats_1_1:  Execute script Stats/Server Statistics as (server-admin)  ... success,  Total: 35ms
AdminAdHoc Stats_1_2:  Execute script Stats/Server Statistics as (domain-admin) [expecting error]  ... success,  Total: 20ms
AdminAdHoc cl-comp_1_1:  Execute script cl-comp/List Service Keys as (server-admin)  ... success,  Total: 63ms
AdminAdHoc cl-comp_1_2:  Execute script cl-comp/List Service Keys as (domain-admin) [expecting error]  ... success,  Total: 30ms
AdminAdHoc cl-comp_2_1:  Execute script cl-comp/Force stop service as (server-admin)  ... success,  Total: 67ms
AdminAdHoc cl-comp_2_2:  Execute script cl-comp/Force stop service as (domain-admin) [expecting error]  ... success,  Total: 22ms
AdminAdHoc cl-comp_3_1:  Execute script cl-comp/Simulate serviceStopped method call as (server-admin)  ... success,  Total: 117ms
AdminAdHoc cl-comp_3_2:  Execute script cl-comp/Simulate serviceStopped method call as (domain-admin) [expecting error]  ... success,  Total: 17ms
AdminAdHoc sess-man_1_1:  Execute script sess-man/Activate log tracker for a user as (server-admin)  ... success,  Total: 67ms
AdminAdHoc sess-man_1_2:  Execute script sess-man/Activate log tracker for a user as (domain-admin) [expecting error]  ... success,  Total: 31ms
AdminAdHoc sess-man_2_1:  Execute script sess-man/Remove log tracker for a user as (server-admin)  ... success,  Total: 48ms
AdminAdHoc sess-man_2_2:  Execute script sess-man/Remove log tracker for a user as (domain-admin) [expecting error]  ... success,  Total: 32ms
AdminAdHoc sess-man_3_1:  Execute script sess-man/Update user roster entry :: (server-user) as (server-admin)  ... success,  Total: 36ms
AdminAdHoc sess-man_3_2:  Execute script sess-man/Update user roster entry :: (domain-user) as (server-admin)  ... success,  Total: 45ms
AdminAdHoc sess-man_3_3:  Execute script sess-man/Update user roster entry :: (server-user) as (domain-admin) (expecting error) [expecting error]  ... success,  Total: 28ms
AdminAdHoc sess-man_3_4:  Execute script sess-man/Update user roster entry :: (domain-user) as (domain-admin)  ... success,  Total: 38ms
AdminAdHoc sess-man_4_1:  Execute script sess-man/Update user roster entry, extended version. :: (server-user) as (server-admin)  ... success,  Total: 126ms
AdminAdHoc sess-man_4_2:  Execute script sess-man/Update user roster entry, extended version. :: (domain-user) as (server-admin)  ... success,  Total: 51ms
AdminAdHoc sess-man_4_3:  Execute script sess-man/Update user roster entry, extended version. :: (server-user) as (domain-admin) (expecting error) [expecting error]  ... success,  Total: 26ms
AdminAdHoc sess-man_4_4:  Execute script sess-man/Update user roster entry, extended version. :: (domain-user) as (domain-admin)  ... success,  Total: 41ms
AdminAdHoc sess-man_5_1:  Execute script sess-man/Fixes user's roster as (server-admin)  ... success,  Total: 106ms
AdminAdHoc sess-man_5_2:  Execute script sess-man/Fixes user's roster as (domain-admin) [expecting error]  ... success,  Total: 20ms
AdminAdHoc sess-man_6_1:  Execute script sess-man/Fixes user's roster on Tigase cluster as (server-admin)  ... success,  Total: 2117ms
AdminAdHoc sess-man_6_2:  Execute script sess-man/Fixes user's roster on Tigase cluster as (domain-admin) [expecting error]  ... success,  Total: 19ms
AdminAdHoc sess-man_7_1:  Execute script sess-man/ConnectionTime as (server-admin)  ... success,  Total: 38ms
AdminAdHoc sess-man_7_2:  Execute script sess-man/ConnectionTime as (domain-admin)  ... success,  Total: 24ms
AdminAdHoc sess-man_8_1:  Execute script sess-man/Change user inter-domain communication permission as (server-admin)  ... success,  Total: 124ms
AdminAdHoc sess-man_8_2:  Execute script sess-man/Change user inter-domain communication permission as (domain-admin) [expecting error]  ... success,  Total: 20ms
Test finished after: 00:00:31
Referenced from commit 1 year ago
Referenced from commit 1 year ago
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
5427
Version
tigase-server-8.0.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#813
Please wait...
Page is in error, reload to recover