-
Notifications
You must be signed in to change notification settings - Fork 17
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
Meta token should contain client secret too #311
Comments
Yes this is very cool for a dynamic platform and app. But i only see one problem. The researchers sometimes have to send QR codes over the email either for remote recruitment or if the scanning did not work in person. In these cases, the QR code transfer is vulnerable and could compromise the client_secret. Right now, only refresh token is compromised which will expire and without client credentials no one can get access tokens. But if the client_secret is also included within it, this could pose a potential risk. Also since the meta token URL is exposed as no security is in place, this is a further risk. |
Another solution we can use is restrict the Android app to not display the client credentials. For example in pRMT, Right now i can access them in the android logs but I am assuming that we can hide these. PS - The new QR code looks really nice. I can already see all the complexity gone. |
I started typing, but here's the TLDR 😄: there is no issue with sharing the client secret for the mobile apps. A bit of clarification regarding the client secret. The name 'secret' is misleading in these cases. Any mobile app or browser app is considered a public client, which means these apps can not keep a secret hidden. Therefore, for these clients, we only accept the In fact, the OAuth spec recommends that public clients like these use the
Spring does not seem to support that mode of operation so that's why we still need it and have to keep using it , even though it's confusing to configure and maintain 'secrets' that are not secret and provide no security... By contrast, e.g. the redcap integration app and RestAPI are applications that can keep their credentials a secret, since they are fully under our control. In cases like that, we can use the Hope this helps clear things up! |
I am a little confused now. I though we cannot use Also, since Spring does not support the other types, if we add |
An attacker can easily get the secret of user clients by reading or modifying the Android APK or Javascript code, but there is a convenience barrier. In those cases, there is little protective value to the secret. The |
Hi @yatharthranjan, we use the The OAuth client credentials, which are the client id and client secret, are different than the username and password of the participant. They are only used to identify which OAuth client, i.e. which app, is acting on behalf of the user. E.g. the passive app is sending actigraphy data not by itself, but on behalf of the user. The passive app therefore has no authorities by itself, but through the use of the In contrast, an OAuth client which uses the In the meantime I've found out that we can configure an empty client secret in Spring, which does allow an OAuth client to authenticate without a client secret as well (see also this comment). Therefore I'm closing this and opening an issue to use an empty secret for public clients. @blootsvoets has made the appropriate issues in other projects here and here. |
Hi @dennyverbeeck, thanks for the explanation. It is much clear now to me. |
@dennyverbeeck the empty credentials on the apps does sound better for managing the local clients credentials (which we can keep secret). We presumably need to notify the THINC-IT developer too. |
To allow configurable platform, the MP should also send the client secret with the meta-token. Otherwise, it will add a constraint of all platforms using the same secret. This has higher risk than sending secrets with meta-token.
FYI @blootsvoets, @dennyverbeeck , @yatharthranjan
The text was updated successfully, but these errors were encountered: