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

[WIP] Add UID and GID to the user object from user package #983

Closed
wants to merge 8 commits into from

Conversation

ishank011
Copy link
Contributor

@ishank011 ishank011 commented Jul 20, 2020

Currently, the UID and GID for users need to be read from the local system which requires local users to be present. This change retrieves that information from the user and auth packages and adds methods to retrieve it.

Closes #964

@ishank011 ishank011 marked this pull request as ready for review July 21, 2020 12:24
@ishank011 ishank011 requested a review from labkode as a code owner July 21, 2020 12:24
@ishank011
Copy link
Contributor Author

ishank011 commented Jul 21, 2020

@labkode the PR is ready for review. Some initial testing is done, working on deploying it for further tests.

One thing which I'm not very sure about is this part. Whenever we stat for resources, EOS returns the UID, which we encode as "uid:xyz" since we have no way of resolving it at the fs level. This is done at the gateway layer to get the user ID back from the UID using this method. I modified the GetUser method to return the user based on UID passed as opaque.

Please let me know if this is fine or if we should switch to some other approach.

@ishank011 ishank011 requested review from IljaN, butonic and refs July 21, 2020 12:31
@labkode
Copy link
Member

labkode commented Jul 21, 2020

@labkode the PR is ready for review. Some initial testing is done, working on deploying it for further tests.

One thing which I'm not very sure about is this part. Whenever we stat for resources, EOS returns the UID, which we encode as "uid:xyz" since we have no way of resolving it at the fs level. This is done at the gateway layer to get the user ID back from the UID using this method. I modified the GetUser method to return the user based on UID passed as opaque.

Please let me know if this is fine or if we should switch to some other approach.

What about having the EOS driver calling the userprovider grpc endpoint to resolve the uid to username and then pass it to the upper layers? This approach will avoid the uid: hack but will add a dependency to the userprovider grpc service. What do you think? Also @butonic @refs @IljaN ?

@ishank011
Copy link
Contributor Author

@labkode yes that could be an approach as well. Would save a lot of the changes I had to do at the upper levels.

@labkode
Copy link
Member

labkode commented Jul 21, 2020

@ishank011 let's try then that approach, the drivers that need extra user information for implementing their logic they can connect to the gateway and request for specific user metadata.

Can you adapt that part to contact the Gateway API instead?

@ishank011
Copy link
Contributor Author

@labkode Cool, I'll make the change. Thanks!

@ishank011
Copy link
Contributor Author

Alternate approach #995 merged.

@ishank011 ishank011 closed this Jul 28, 2020
@ishank011 ishank011 deleted the uid-change branch August 2, 2021 08:05
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

Successfully merging this pull request may close these issues.

eosfs: don't rely on systemcall to obtain user unix IDs/GroupIds
3 participants