Moving forward on Quotas
A message that is not in the archive (sent off-list or not yet received): 20080605083957.GQ6283@lore
Quota are determined by the owner of the file, not by the uid of the process.
We have been propagating owners / gid of files from MDS to OSS for this reason.
I don't understand the issue.
Peter
Quoted 13 lines
I've discussed with Fanyong and imo, the uid mapping issue is clearly a showstopper for now. On HEAD, the client-side uid/gid packed by GSS is translated to a sevice-side uid/gid. This mapping exists on the MDS, but not on the OSSs. The problem is that for quotas, OSSs must be aware of this mapping.
We should find a solution to this problem (not straightforward) which needs to be addressed anyway even for DMU support.In general, I don't think that much of this work will be "throw away".
Cheers,
Johann
Quoted 2 lines · Peter Braam
Quota are determined by the owner of the file, not by the uid of the process.
In my understanding, the client is not aware of the server-side uid/gid and the file owner returned to the client is translated too. Please let me know if I misunderstood how the uid/gid mapping feature works.
Quoted 4 lines
We have been propagating owners / gid of files from MDS to OSS for this reason.
I don't understand the issue.
The problem is that the owner / group is propagated to the OSTs through the client the first time it sends a bulk write rpc (by setting the OBD_MD_FLUID/GID flags) and those identifiers - supplied by the client - must be translated too.
Johann
Well, this protocol hasn't been published yet; why not include the server side uid / gid then?
But more seriously, how is this encoded in such a way that the OST can trust the information - it must be in the capability too?
Peter
Quoted 23 lines · Johann Lombardi
Quoted 2 lines · Peter Braam
Quota are determined by the owner of the file, not by the uid of the process.
In my understanding, the client is not aware of the server-side uid/gid and the file owner returned to the client is translated too. Please let me know if I misunderstood how the uid/gid mapping feature works.
Quoted 4 lines
We have been propagating owners / gid of files from MDS to OSS for this reason.
I don't understand the issue.
The problem is that the owner / group is propagated to the OSTs through the client the first time it sends a bulk write rpc (by setting the OBD_MD_FLUID/GID flags) and those identifiers - supplied by the client - must be translated too.
Johann
_______________________________________________
Lustre-devel mailing list
Lustre-devel at lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-devel
Quoted 2 lines · Peter Braam
Well, this protocol hasn't been published yet; why not include the server side uid / gid then?
I understood from Fanyong that according to the remote client design requirements, we should not allow the remote client to access the server-side uid/gid mapping.
Quoted 2 lines
But more seriously, how is this encoded in such a way that the OST can trust the information - it must be in the capability too?
hmm, I don't see any capability associated with this.
Johann
Quoted 7 lines · Johann Lombardi
Quoted 2 lines · Peter Braam
Well, this protocol hasn't been published yet; why not include the server side uid / gid then?
I understood from Fanyong that according to the remote client design requirements, we should not allow the remote client to access the server-side uid/gid mapping.
You have two choices: break that rule OR let the MDS server do the ownership changes. It's not complicated, just make a choice.
Quoted 5 lines
Quoted 3 lines
But more seriously, how is this encoded in such a way that the OST can trust the information - it must be in the capability too?
hmm, I don't see any capability associated with this.
We had better find it, otherwise there is a security hole.
Quoted 6 lines
Johann
_______________________________________________
Lustre-devel mailing list
Lustre-devel at lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-devel
Peter Braam ??:
Quoted 18 lines · Johann Lombardi
Quoted 11 lines · Peter Braam
Quoted 4 lines
Well, this protocol hasn't been published yet; why not include the server side uid / gid then?
I understood from Fanyong that according to the remote client design requirements, we should not allow the remote client to access the server-side uid/gid mapping.
You have two choices: break that rule OR let the MDS server do the ownership changes. It's not complicated, just make a choice.
Quoted 10 lines
Quoted 5 lines
Quoted 3 lines
But more seriously, how is this encoded in such a way that the OST can trust the information - it must be in the capability too?
hmm, I don't see any capability associated with this.
We had better find it, otherwise there is a security hole.
I think we can divide clients into two sorts: trusted and untrusted. The client reliability is defined by administrator. Remote client should be counted as untrusted one. The best simple way is that:
local client is trusted, remote client is untrusted.
For the trusted ones, disable capability, OSS set file "uid" and "gid" with "oa.o_uid" and "oa.o_gid". It is the current using means. For the untrusted ones, enable capability, OSS set file "uid" and "gid" which contain in the OSS capability got from MDS when open. With OSS capability enabled will affect performance, and current capability's design does not contain the consideration for that. We can fix the OSS capability design in the task "o3_se_capa_review"
Note: since capability feature is time-consuming, we want to support enforcing capabilities on selected clients (or somewhat MDS/OSS capability should aim at remote client). On he other hand, enforcing capabilities on selected clients can simply the capability interoperability between HEAD and b1_6.
If this idea can be approved, then the current remote client uid mapping rules can be unchanged, uid mapping on OST is unnecessary also.
Thanks!
--
Fan Yong
Quoted 9 lines
Quoted 6 lines
Johann
_______________________________________________
Lustre-devel mailing list
Lustre-devel at lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-devel
Thanks for explaining.
The trust concept you outline is definitely not acceptable - we need a capability for all access and modifications done through clients on behalf of a capability.
Even changes made by the MDS need to be secured - that can be through a kerberos connection, and again, not through blind trust.
Would you please send the capability HLD to me? Thanks!
- Peter -
Quoted 67 lines · Yong Fan
Peter Braam ??:
Quoted 19 lines · Johann Lombardi
Quoted 12 lines · Peter Braam
Quoted 4 lines
Well, this protocol hasn't been published yet; why not include the server side uid / gid then?
I understood from Fanyong that according to the remote client design requirements, we should not allow the remote client to access the server-side
uid/gid mapping.You have two choices: break that rule OR let the MDS server do the ownership changes. It's not complicated, just make a choice.
Quoted 11 lines
Quoted 6 lines
Quoted 4 lines
But more seriously, how is this encoded in such a way that the OST can trust
the information - it must be in the capability too?hmm, I don't see any capability associated with this.
We had better find it, otherwise there is a security hole.
I think we can divide clients into two sorts: trusted and untrusted. The client reliability is defined by administrator. Remote client should be counted as untrusted one. The best simple way is that:
local client is trusted, remote client is untrusted.For the trusted ones, disable capability, OSS set file "uid" and "gid" with "oa.o_uid" and "oa.o_gid". It is the current using means. For the untrusted ones, enable capability, OSS set file "uid" and "gid" which contain in the OSS capability got from MDS when open. With OSS capability enabled will affect performance, and current capability's design does not contain the consideration for that. We can fix the OSS capability design in the task "
o3_se_capa_review"Note: since capability feature is time-consuming, we want to support enforcing capabilities on selected clients (or somewhat MDS/OSS capability should aim at remote client). On he other hand, enforcing capabilities on selected clients can simply the capability interoperability between HEAD and
b1_6.If this idea can be approved, then the current remote client uid mapping rules can be unchanged, uid mapping on OST is unnecessary also.
Thanks!
--
Fan YongQuoted 9 lines
Quoted 6 lines
Johann
_______________________________________________
Lustre-devel mailing list
Lustre-devel at lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-devel
Peter Braam ??:
Quoted 9 lines
Thanks for explaining.
The trust concept you outline is definitely not acceptable - we need a capability for all access and modifications done through clients on behalf of a capability.
Even changes made by the MDS need to be secured - that can be through a kerberos connection, and again, not through blind trust.
The client reliability (trusted or untrusted) and the MDS/OSS capabilities are not conflict. They can be combined together as mentioned in draft of new MDS/OSS capabilities HLD.
capabilities.lyx is the old HLD
capability_hld.lyx is the new HLD which is in patch inspection and fix.
Thanks!
--
Fan Yong
Quoted 84 lines
Would you please send the capability HLD to me? Thanks!
- Peter -
Quoted 73 lines · Yong Fan
Peter Braam ??:
Quoted 27 lines · Johann Lombardi
Quoted 16 lines · Peter Braam
Quoted 6 lines
Well, this protocol hasn't been published yet; why not include the server side uid / gid then?
I understood from Fanyong that according to the remote client design requirements, we should not allow the remote client to access the server-side
uid/gid mapping.You have two choices: break that rule OR let the MDS server do the ownership changes. It's not complicated, just make a choice.
Quoted 5 lines
Quoted 5 lines
But more seriously, how is this encoded in such a way that the OST can trust
the information - it must be in the capability too?Quoted 8 lines
Quoted 3 lines
hmm, I don't see any capability associated with this.
We had better find it, otherwise there is a security hole.
I think we can divide clients into two sorts: trusted and untrusted. The client reliability is defined by administrator. Remote client should be counted as untrusted one. The best simple way is that:
local client is trusted, remote client is untrusted.For the trusted ones, disable capability, OSS set file "uid" and "gid" with "oa.o_uid" and "oa.o_gid". It is the current using means. For the untrusted ones, enable capability, OSS set file "uid" and "gid" which contain in the OSS capability got from MDS when open. With OSS capability enabled will affect performance, and current capability's design does not contain the consideration for that. We can fix the OSS capability design in the task "
o3_se_capa_review"Note: since capability feature is time-consuming, we want to support enforcing capabilities on selected clients (or somewhat MDS/OSS capability should aim at remote client). On he other hand, enforcing capabilities on selected clients can simply the capability interoperability between HEAD and
b1_6.If this idea can be approved, then the current remote client uid mapping rules can be unchanged, uid mapping on OST is unnecessary also.
Thanks!
--
Fan YongQuoted 9 lines
Quoted 7 lines
Johann
_______________________________________________
Lustre-devel mailing list
Lustre-devel at lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: capabilities.lyx
Type: application/x-lyx
Size: 8268 bytes
Desc: not available
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20080610/c0ee7ff3/attachment.lyx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: capability_hld.lyx
Type: application/x-lyx
Size: 20857 bytes
Desc: not available
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20080610/c0ee7ff3/attachment-0001.lyx>
Peter Braam ??:
Quoted 9 lines · Johann Lombardi
Quoted 7 lines · Peter Braam
Quoted 4 lines
Well, this protocol hasn't been published yet; why not include the server side uid / gid then?
Quoted 8 lines
Quoted 4 lines
I understood from Fanyong that according to the remote client design requirements, we should not allow the remote client to access the server-side uid/gid mapping.
You have two choices: break that rule OR let the MDS server do the ownership changes. It's not complicated, just make a choice.
1) MDS changes file owner for objects on OSS when create. It introduces one additional RPC between MDS and OSS for each objects, which causes the per-create meaningless. Maybe we can not accept the creation performance undre such case.
An improvement for that is that we can initialize all the pre-create objects on OSS with the same uid/gid as the current created file. And the succedent creations check the per-created object's uid/gid, if they match the owner's uid/gid, then the additional setattr to OSS is unnecessary, otherwise, chown to OSS will be sent. The best case is equal to the current implementation; the worst case is equal to no such improvement. Under creation performance sensitivity case, maybe HPC or some benchmark test. There are few uid/gid context switch. So I think such improvement can match most creation performance requirement.
2) Pack file owner into OSS capability when write to OSS. According to our UID mapping rules, we do not want the client (especially the untrusted client, maybe remote client) to know which the server-side uid/gid are mapped. For that, dynamic UID mapping are used, and some complex remote acl operations are implemented.
So if file real owner (server-side uid/gid) need to be packed in OSS capability back to client, bad better to encrypt them to match our UID mapping rules. Otherwise, most of our effort for that before are broken. On the other hand, MDS/OSS capabilities use HMAC-SHA1 to prevent from being modified or fabricated. Signing MAC is somewhat time-consuming, and uid/gid encryption are similar, so the performance will become worse. To implement server-side uid/gid encryption and decryption, need to design some key-update mechanism also.
So I do not think it is a good choice.
3) Establish UID mapping on OSS also, just like MDS does. It has the same principle as done on MDS which needs lower layer GSS support. Many codes can be shared between MDS and OSS for UID mapping. It is the most complete solution, little affect on creation performance and UID mapping rules. The shortcoming is much changes on OSS, how much GSS effort for that is not well estimated yet.
Quoted 10 lines
Quoted 6 lines
Quoted 4 lines
But more seriously, how is this encoded in such a way that the OST can trust the information - it must be in the capability too?
hmm, I don't see any capability associated with this.
We had better find it, otherwise there is a security hole.
Root user's super permission should be considered for OSS capability. On client-side, the opened file descriptor can be shared by different threads, and the different threads maybe have different "uid". Consider the following case:
Root user writes a file through other normal user (Tom) opened file descriptor. The root user can breaks through Tom's quota limitation, he should tell OSS that he is a root user, but how can the OSS believe him? Such information should be contained in the OSS capability.
(Note: on lustre 1.6, llite set "OBD_BRW_NOQUOTA" directly for that, which can be fabricated by baleful client)
Best Regards!
--
Fan Yong
Quoted 10 lines
Quoted 7 lines
Johann
_______________________________________________
Lustre-devel mailing list
Lustre-devel at lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-devel
I did not read the entire long message, but clearly the importance of authorizing operations on the OSS far exceeds that of exposing a uid to a client.
Moreover, it doesn't have to be exposed. If the capability contains the uid it can be encrypted with a key so that only the OSS can see it.
This seems the preferred solution.
Peter
Quoted 102 lines · Yong Fan
Peter Braam ??:
Quoted 9 lines · Johann Lombardi
Quoted 7 lines · Peter Braam
Quoted 4 lines
Well, this protocol hasn't been published yet; why not include the server side uid / gid then?
Quoted 9 lines
Quoted 5 lines
I understood from Fanyong that according to the remote client design requirements, we should not allow the remote client to access the server-side
uid/gid mapping.You have two choices: break that rule OR let the MDS server do the ownership changes. It's not complicated, just make a choice.
1) MDS changes file owner for objects on OSS when create. It introduces one additional RPC between MDS and OSS for each objects, which causes the per-create meaningless. Maybe we can not accept the creation performance undre such case.
An improvement for that is that we can initialize all the pre-create objects on OSS with the same uid/gid as the current created file. And the succedent creations check the per-created object's uid/gid, if they match the owner's uid/gid, then the additional setattr to OSS is unnecessary, otherwise, chown to OSS will be sent. The best case is equal to the current implementation; the worst case is equal to no such improvement. Under creation performance sensitivity case, maybe HPC or some benchmark test. There are few uid/gid context switch. So I think such improvement can match most creation performance requirement.
2) Pack file owner into OSS capability when write to OSS. According to our UID mapping rules, we do not want the client (especially the untrusted client, maybe remote client) to know which the server-side uid/gid are mapped. For that, dynamic UID mapping are used, and some complex remote acl operations are implemented.
So if file real owner (server-side uid/gid) need to be packed in OSS capability back to client, bad better to encrypt them to match our UID mapping rules. Otherwise, most of our effort for that before are broken. On the other hand, MDS/OSS capabilities use HMAC-SHA1 to prevent from being modified or fabricated. Signing MAC is somewhat time-consuming, and uid/gid encryption are similar, so the performance will become worse. To implement server-side uid/gid encryption and decryption, need to design some key-update mechanism also.
So I do not think it is a good choice.
3) Establish UID mapping on OSS also, just like MDS does. It has the same principle as done on MDS which needs lower layer GSS support. Many codes can be shared between MDS and OSS for UID mapping. It is the most complete solution, little affect on creation performance and UID mapping rules. The shortcoming is much changes on OSS, how much GSS effort for that is not well estimated yet.Quoted 11 lines
Quoted 7 lines
Quoted 5 lines
But more seriously, how is this encoded in such a way that the OST can trust
the information - it must be in the capability too?hmm, I don't see any capability associated with this.
We had better find it, otherwise there is a security hole.
Root user's super permission should be considered for OSS capability. On client-side, the opened file descriptor can be shared by different threads, and the different threads maybe have different "uid". Consider the following case:
Root user writes a file through other normal user (Tom) opened file descriptor. The root user can breaks through Tom's quota limitation, he should tell OSS that he is a root user, but how can the OSS believe him? Such information should be contained in the OSS capability.
(Note: on lustre 1.6, llite set "OBD_BRW_NOQUOTA" directly for that, which can be fabricated by baleful client)Best Regards!
--
Fan YongQuoted 10 lines
Quoted 7 lines
Johann
_______________________________________________
Lustre-devel mailing list
Lustre-devel at lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-devel_______________________________________________
Lustre-devel mailing list
Lustre-devel at lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-devel