Added fixes to Token Handling#8
Conversation
Previous implementation did not properly do token introspection on incoming tokens due to them being the wrong token type. The new implementation only accepts tokens from the minid defined scope.
| GLOBUS_AUTH_ENABLED = False | ||
|
|
||
| GLOBUS_CLIENT_ID = "a5cdede9-567f-4ae5-aba5-cb997d08693a" | ||
| GLOBUS_CLIENT_SECRET = "" |
There was a problem hiding this comment.
The GLOBUS_AUTH_ENABLED config option was removed. Not including a Client ID or Secret does effectively the same thing.
ericblau
left a comment
There was a problem hiding this comment.
I find it slightly confusing in minid_server/api/utils.py that
when you do:
code = authorization_header.split()
the variable code actually contains the bearer token that you later introspect, doesn't it? Thus I'd prefer "token" as a variable name, or something similar.
Good point! I also notice that |
| 'code.', user=email, | ||
| type='AuthorizationFailed') | ||
| ids = client.get_identities(ids=info.data['identity_set']) | ||
| linked_emails = [str(u_id['email']) |
There was a problem hiding this comment.
Originally this was set to username, which isn't what we want. Sometimes usernames match up with emails, but not always. One example is Globus IDs, which could have a user with the id of malcomreynolds@globusid.org and email of malcomr@globus.org.
|
@kylechard Question for you: do you know how many users are using the old auth tokens? The NIH Commons project just got setup to use them, and I'm not sure how many more folks are also using the old system. For those users these changes are breaking (although the only thing they need to do is switch their servers to request the minid scope, and re-login with their minid clients). An alternative is we still allow the old token functionality for the time being and have the minid client log a deprecation warning when someone tries to use it. |
Previous implementation did not properly do token introspection on
incoming tokens due to them being the wrong token type. The new
implementation only accepts tokens from the minid defined scope.