[openstack-dev] usability anti-pattern, part 2

Ed Leafe ed at leafe.com
Wed Sep 24 19:17:18 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/19/2014 09:01 PM, Monty Taylor wrote:
>         except exc.Unauthorized:
>             raise exc.CommandError("Invalid OpenStack credentials.")
>         except exc.AuthorizationFailure:
>             raise exc.CommandError("Unable to authorize user")
> 
> This is pervasive enough that both of those exceptions come from
> openstack.common.
> 
> Anyone?
> 
> Please. Explain the difference. In words.

I think that there are two problems here: first, the message for
Unauthorized is wrong; it should be something like "You are not
authorized to do X". The second exception should most likely be
'AuthenticationFailure', and should have the error text from the
Authentication exception.

I've seen confusion between authz and authn in many projects; looks like
OpenStack is no different, unfortunately.


- -- Ed Leafe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iQIcBAEBAgAGBQJUIxi+AAoJEKMgtcocwZqLiq0P/j77O9jrXRBfz/2tEVTbKk0D
xAO1Ol2wwgJgekqokhecQrNlqc4PajzQdlEb0fg497GzjErWvPfHRhHATkSm19M7
z6SLbhtx4G+u/v79p3hoEkfFOEcCgnQU/ZFQ2r5XhVljO12Fo+I6vBprqUhekyMO
bhpVzFyjMifEDoO/C/GrNRY3QdfhkZuQO40Y9fcDlPQADykEghGXNnBx6aFyMARZ
DJL6zcKwX3tMYR68cNMXdHF18Aue/U9wvVlhrw8uFa3qwT8IpJrelRZteNG+oZ0o
ig4J5BDs3Mi/chNWIG7fNlCZ1OMGPT4Zn1tAitHESONme55M0Djc5N7/lizgewzb
VMGkwOrpzDvpbZYZRtUpdiN8LMYEwYjIZpMRG4PO+5Roy2XNkPT8UOSWhc4Xq3ct
vWA7ToBL1k0DzIs5Db0qoz1bdc31BeS3gcX+C5rLQQO/DQ45Au2mtK/yyrwmvtZB
SyplnysiBhHgh6/KhuFnA4pfW5mRMfh+hb9cNyqyVldTDZDyUV4c+Xoh3rGDMlSj
Lr6Gc8y16l/QgAIQZvbb2Z1MbMH5vSkRP8BNUkdhPfrB64ykiso4J4h1ftUEySJR
GM6SpYzJ4tVy6o3XZajEvRJoMZZ09/3Qk/5n0QmwZOy/R6EgfO/8YfyRfGw4Rlvn
zM2SySZlUhnAHfb5CYAT
=f8fm
-----END PGP SIGNATURE-----



More information about the OpenStack-dev mailing list