You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a follow-up for #9115, let's cache layer sizes globally in a thread-safe
LRU cache. The solution in mentioned PR doesn't really utilize a cache because
during each new import, a new importer is created, whose Import() method is
invoked just once.
Let the cache be shared accross for all the imports happening in image import
controller.
@liggitt can you please elaborate? Is there a harm in fetching layer sizes from a global cache regardless of source/target namespace? With such a tolerant implementation, a user will be able to obtain layer sizes of blobs belonging to images he doesn't have access to (if he's able to guess the layer names). Even so, is the size of any value to him (taking into consideration that size is already contained in image manifest).
as long as presence and size data in the shared cache isn't used as a short-circuiting check as part of layer access elsewhere (which I suspect may be happening in pullthroughblobstore with cachedLayers)
as long as presence and size data in the shared cache isn't used as a short-circuiting check as part of layer access elsewhere (which I suspect may be happening in pullthroughblobstore with cachedLayers)
@liggitt no, the authorization check will be done per imagestream. This will be used just for filling missing image sizes for quota purposes.
Anyway I suppose this issue and proposed solution will be superseded by #9755 (comment)
Activity
liggitt commentedon Jul 11, 2016
seems ok, but we need to be sure we don't use that cache in a way that lets us skip auth checks across imagestreams
miminar commentedon Jul 11, 2016
@liggitt can you please elaborate? Is there a harm in fetching layer sizes from a global cache regardless of source/target namespace? With such a tolerant implementation, a user will be able to obtain layer sizes of blobs belonging to images he doesn't have access to (if he's able to guess the layer names). Even so, is the size of any value to him (taking into consideration that size is already contained in image manifest).
liggitt commentedon Jul 11, 2016
as long as presence and size data in the shared cache isn't used as a short-circuiting check as part of layer access elsewhere (which I suspect may be happening in pullthroughblobstore with cachedLayers)
miminar commentedon Jul 11, 2016
@liggitt no, the authorization check will be done per imagestream. This will be used just for filling missing image sizes for quota purposes.
Anyway I suppose this issue and proposed solution will be superseded by #9755 (comment)