Comment 16 for bug 1832265

Revision history for this message
Drew Freiberger (afreiberger) wrote : Re: keystone LDAP integration in rocky not working for RBAC rules or token auth

Also tried this. seeing some amount of stripping happening in logs, for the user_id, but still unable to see projects drop-down in horizon when selected on secondary project membership.

Seyeong, if you're looking into reproducing, try adding a second project and make the user a Member of both projects, and then see after switching projects if you still see the projects drop-down.

*** token/token_formatters.py 2019-06-13 14:18:48.628706082 +0000
--- /home/ubuntu/token_formatters.py 2019-06-13 14:12:28.855950201 +0000
*************** class BasePayload(object):
*** 275,308 ****

          :param payload: this variant of payload
          :returns: a tuple of the payloads component data

          """
          raise NotImplementedError()

      @classmethod
      def convert_uuid_hex_to_bytes(cls, uuid_string):
          """Compress UUID formatted strings to bytes.

          :param uuid_string: uuid string to compress to bytes
          :returns: a byte representation of the uuid

          """
+ if isinstance(uuid_string, six.binary_type):
+ LOG.warning("DREW attempt_convert uuid_string: {}".format(uuid_string))
+ uuid_string = uuid_string.decode('utf-8')
+ LOG.warning("DREW attempt_convert uuid_string scrubbed: {}".format(uuid_string))
          uuid_obj = uuid.UUID(uuid_string)
          return uuid_obj.bytes

      @classmethod
      def convert_uuid_bytes_to_hex(cls, uuid_byte_string):
          """Generate uuid.hex format based on byte string.

          :param uuid_byte_string: uuid string to generate from
          :returns: uuid hex formatted string

          """
          uuid_obj = uuid.UUID(bytes=uuid_byte_string)
          return uuid_obj.hex