-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wf_user_info()
can return "bad" info
#14
Comments
Isn't this expected behaviour if the key is a unique identifier and the From part ignored? The information which is returned is not bad, the only thing that might be helpful is clarify if the username in the keyring does not match the uid returned by the function. Ideally this should happen when setting the key.
|
Yes, that's what I mean with "bad". From the user POV is unexpected because they mean to get info or use one user and then end up using another. |
You could not allow the key to be set if it doesn't work, using the above code and that for CDS to check before this happens (I would skip using |
Yeah, I think it's fair to enforce a consistent user/key combo. |
For debugging I added a new user with username “user” and the same API key than “[email protected]”
But even though there's no "user" username,
wf_user_info()
still thinks is a valid username and returns information, albeit on the "eliocampitelli" username.Created on 2019-03-19 by the reprex package (v0.2.1.9000)
The ECMFW API seems to ignore the username part of the request and return the user information associated with the API key. In other words in this part of the code
The
"From" = user
part is ignored (it works the same if commented out). One solution could be to validate the combination (even if ECMWF wont) by checking that the username returned by the API is the same as the one in the local keyring.The text was updated successfully, but these errors were encountered: