Closed samugi closed 5 years ago
Thank you Sam, I'll look into this today.
Maybe both is a good idea.
Yes probably logging it at the beginning of the output if a non-admin user is detected
would be best (if possible). I would log it as a blocking message that requires confirmation to continue, something like "WARNING: you are running the script without the required privileges to obtain a full project dump, you should run the script as administrator, would you like to proceed anyway? y/N"
@samu91gn right now it was added on the end as a warning since it was the quickest method to address the issue but I've created https://github.com/estevaobk/3scaledump/issues/18 to follow it up.
Cheers.
Addressed half of the request on https://github.com/estevaobk/3scaledump/commit/49dfc64d549c10e90c1b77c26f69c6f942bc054d.
The other half will be addressed on https://github.com/estevaobk/3scaledump/issues/18.
Current behavior is to display a warning message in the end.
The KCS Article has also been updated with the section: Administrator (Recommended)
For example, status/node.txt may contain the following value:
Error from server (Forbidden): nodes is forbidden: User "XXXX" cannot list nodes at the cluster scope: no RBAC policy matched
If the user XXXX does not have the right permission to access the requested details. It would probably be enough to mention in the README that you should be logged as system:admin prior to executing the script. Optionally we could also log something to the command line as a reminder.