Comment 4 for bug 1833311

Revision history for this message
Michael Carpenter (macarpen) wrote :

My use case does not involve Horizon but rather a custom application that uses keystone for identity.

This is what the callback payload looks like when using fernet tokens (using https://httpbin.org/post as a stand-in for the callback):

"form": {
    "token": "gAAAAABdC74ZolSC6H85K0_iOVSoYyYSo8CC2-Tc0wa9LwxvDlL2DnFNREPFUyCw5yaFmqW8FhHZW45TE1c1ZzaLrYVV4ggvzCfmfzZtkk4P3AwHza3LJLefmca1IzITA2z3RV4AQ2j-FqLC60L8gOJ27Q2iPN5hpX7yTPNH-EJfsKOX34HUAGU"
  }

This is what it looks like when using jws tokens:

"form": {
    "token": "b'eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJzdWIiOiI4ZTJkYWRmYjcwNGU0ODg1OWYyNzI1NWI0ZjRjMTkxZCIsImlhdCI6MTU2MTA1MDg3OCwiZXhwIjoxNTYxMDY1Mjc4LCJvcGVuc3RhY2tfbWV0aG9kcyI6WyJvcGVuaWQiXSwib3BlbnN0YWNrX2F1ZGl0X2lkcyI6WyJiNjdZOWJXSlRZMnpFQUJaZm1PdEZ3Il0sIm9wZW5zdGFja19ncm91cF9pZHMiOltdLCJvcGVuc3RhY2tfaWRwX2lkIjoidzNpZCIsIm9wZW5zdGFja19wcm90b2NvbF9pZCI6Im9wZW5pZCJ9.Q77MWAgyIlFjHJgEPajXbI72qR9KelV29oi7KQ1ydZsWncKThkfRKJreBoKM2pLcPZp3whol9T8lPEppb4wkOg'"
  }

Notice when using jws tokens the token parameter is sent as b'<token_value>' instead of just <token_value>. Does Horizon have logic to parse out the token value when jws is being used as the token provider? I realize the logic involved would be trivial, but it just seemed odd that the token would be formatted differently depending on which token provider is in use.