Solve InvalidAccessKeyId when accessing Ceph RGW dashboard

With Ceph Quincy, I sometimes received the following error: RGW REST API failed request InvalidAccessKeyId. This is as a result of the RGW dashboard user not having the correct permissions. This can be solved by simply deleting the dashboard user as follows:

radosgw-admin user rm --uid=dashboard

Next, create the dashboard user again with the correct permissions with the following:

ceph dashboard set-rgw-credentials

You should now be able to access object gateway dashboard without any errors. Note that the commands above were done within the cephadm shell.