Skip to content
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

Check for valid credentials for file virtual owner. #1

Open
crspybits opened this issue Aug 23, 2020 · 0 comments
Open

Check for valid credentials for file virtual owner. #1

crspybits opened this issue Aug 23, 2020 · 0 comments

Comments

@crspybits
Copy link
Member

Internally, in my server, I need a means to check if credentials are valid under the following scenario: User A tries to access the files of user B. E.g., user A tries to download one of user B’s files.

If B is an owning user the final/authoritative check will be made by the owning cloud service, and will be terminated there if B’s credentials are invalid or have been revoked.

If B is a sharing user the situation seems more complicated. The file can be virtually owned by user B (i.e., B initiated the upload), but really owned by say owning user C—where C is a real owning user. In this case, we need to do what we can to make sure that B’s credentials are valid before allowing the download. It doesn’t seem to make sense to allow a download for a file when its (virtual) owner is invalid. For Apple Sign In credentials, we may need to make a 24 hour validity check with Apple if that call hasn’t been made in the last 24 hours. We may also need to check some field in our Apple Sign In credentials (in our custom server database) to see if the credentials are known to be invalid—which could have occurred by Mechanism 2 (see my second Apple Sign In Medium article). This suggests we need an alteration to our Account interface (in https://github.com/SyncServerII/ServerAccount.git) that enables a synchronous check to credentials to see if they are valid or not.

The above also suggests that for our ServerFacebookAccount, we need a polling mechanism to check if the credentials are valid. This is different than the existing generateTokens call for ServerFacebookAccount. The check for valid credentials is not trying to generate tokens, but rather just needing to check if the credentials have been revoked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant