API : api_token_update bug
OS : CENTOS 7.4 kvm
cPanel : v68.0.29
When issuing the command:
The command returns:
Using the ,"name":"tokenname"}}
So - question: is there a cPanel service I need to restart after I use the whmapi1 command to get the system to pick up the new acl? Is this a bug?
whmapi1 api_token_update token_name= acl-1=all
The command returns:
data:
acls:
- all
create_time: '1518471368'
name:
metadata:
command: api_token_update
reason: OK
result: 1
version: 1
Using the ,"name":"tokenname"}}
So - question: is there a cPanel service I need to restart after I use the whmapi1 command to get the system to pick up the new acl? Is this a bug?
-
[QUOTE="Dev@SH, post: 2527991, member: 526171">However, when you view the token's permissions from inside WHM, the token does not have 'all' applied and the token does not actually have the permission either. ( cPanel API Response: You do not have permission to create sessions for the user )
Hello, I've been unable to reproduce this issue on a test system. Are you logging into WHM as "root" when reproducing this issue? Thank you.0 -
Yes. root is best user... :) 0 -
Hello, I used the following steps in an attempt to replicate this issue: 1. Created the API token using the following command while logged in via SSH as "root": whmapi1 api_token_create token_name=subway acl-1=all
2. Accessed WHM as "root" and browsed to the "Manage API Tokens" option. 3. Clicked on "Edit" under "subway" and confirmed that all privileges were assigned to the token. 4. Updated the ACLS for the token:whmapi1 api_token_update token_name=subway acl-1=news
5. Clicked on "Edit" under "subway" and confirmed that just the "news" privilege was assigned to the token. 6. Updated the ACLS for the token:whmapi1 api_token_update token_name=subway acl-1=all
7. Clicked on "Edit" under "subway" and confirmed that all privileges were assigned to the token. Is there an additional step that isn't working for you, or a difference in one of the above steps? Thank you.0
Please sign in to leave a comment.
Comments
3 comments