Skip to content

Instantly share code, notes, and snippets.

@jcantrill
Created June 17, 2015 19:49
Show Gist options
  • Save jcantrill/bec1cf4decb1e9f6038c to your computer and use it in GitHub Desktop.
Save jcantrill/bec1cf4decb1e9f6038c to your computer and use it in GitHub Desktop.
[vagrant@openshiftdev origin]$ osc policy add-role-to-user cluster-admin test-admin --config=openshift.local.config/master/admin.kubeconfig
[vagrant@openshiftdev origin]$ curl -k -H "Authorization : Bearer dvLiJ9ssLYLSf11VocMBoqyrAQAFTHQCefVjfER_fmw" https://localhost:8443/api/v1/pods/namespaces/openshift/pods
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "User \"test-admin\" cannot get pods/openshift at the cluster scope",
"reason": "Forbidden",
"details": {},
"code": 403
}[vagrant@openshiftdev origin]$ curl -k -H "Authorization : Bearer dvLiJ9ssLYLSf11VocMBoqyrAQAFTHQCefVjfER_fmw" https://localhost:8443/api/v1/pods/namespaces/test/pods
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "User \"test-admin\" cannot get pods/test at the cluster scope",
"reason": "Forbidden",
"details": {},
"code": 403
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment