Hide Forgot
Description of problem: when add authorization with whitespace scopes "rhc authorization add --scopes ''", it will take userinfo as scopes and pass without error messages. According the help doc of web console, userinfo scopes is the default scopes, but this point does not exist in the help info of rhc. Version-Release number of selected component (if applicable): devenv_4083 rhc-1.18.0 How reproducible: always Steps to Reproduce: 1.Add a authorization with whitespace scopes rhc authorization add --scopes "" rhc authorization add --scopes " " 2. 3. Actual results: It passed with userinfo scopes. Expected results: The following should just exist one: 1.The help info should prompt that userinfo is the default scopes, means when add whitespace as scopes will take default scopes. 2.Deny this usage, the scopes must be a valid string, should not be whitespace Additional info:
Will merge in https://github.com/openshift/rhc/pull/520
Commit pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/d3fd6cabf211b90dce5c099dbd8576b39a984b50 Fix bug 1036064: display scopes help when passing empty scopes on command line
Tried on devenv_4098 with rhc build from it and results as following: # rhc authorization add --scopes "" When adding an authorization, you must specify which permissions clients will have. Scope Description --------------------- --------------------------------------------------------------------------------------------------------------------------------------------- session Grants a client the authority to perform all API actions against your account. Valid for about 1 month. read Allows the client to access resources you own without making changes. Does not allow access to view authorization tokens. Valid for 6 months. userinfo Allows a client to view your login name, unique id, and your user capabilities. Valid for 6 months. domain/:id/view Grant read-only access to a single domain. Valid for 6 months. domain/:id/edit Grant edit access to a single domain and all its applications. Valid for 6 months. domain/:id/admin Grant full administrative access to a single domain and all its applications. Valid for 6 months. application/:id/view Grant read-only access to a single application. Valid for 6 months. application/:id/edit Grant edit access to a single application. Valid for 6 months. application/:id/admin Grant full administrative access to a single application. Valid for 6 months. You may pass multiple scopes to the --scopes option inside of double quotes (--scopes "scope1 scope2") or by separating them with commas (--scopes scope1,scope2). Run 'rhc authorization add --help' to see more options So, can not reproduce this issue.