deNBI / perunKeystoneAdapter

Perun Keystone Adapter parses data propagated by Perun data and modifies a connected Keystone.
https://perunkeystoneadapter.readthedocs.io/en/latest/
Apache License 2.0
5 stars 0 forks source link

Preexisting users/projects in the same domain could cause trouble ... (Python 2 only) #8

Closed jkrue closed 6 years ago

jkrue commented 6 years ago

If the domain used for the Perun propagations service contains user/projects which are not created by perunKeystoneAdapter then encoding problems could occur when using Python 2. Since values coming from keystone are currently not cast to an explizit type, it's not clear if str or unicode str is used as underlying type. Since 'abc' is not u'abc' (Python2), the perunKeystoneAdapter fails detecting existing user/projects in this case. A simple solution could be to cast all values to an explizit type (str or unicode str). This problems affects only Python2, since Python3 str has unicode support.