[ 
https://issues.apache.org/jira/browse/OAK-7570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16528648#comment-16528648
 ] 

Michael Dürig commented on OAK-7570:
------------------------------------

{quote}Every NodeStore is a "BlobProvider" (if that interface would exist, 
referring to the createBlob()/getBlob() methods on NodeStore).
{quote}
My comment was mostly geared towards the HTTP part. Adding a pair of such 
methods per implementation does certainly pollute these APIs and create 
undesirable strong coupling.
{quote}> Nothing seem to prevent users to later attach the binary to any other 
property.

Yes, but that is actually no problem. There will be another check later (the 
normal one). We only want to prevent a user who cannot write a binary 
_anywhere_ from being able to upload in the first place (e.g. anonymous). There 
is no other way to check that permission than to ask for the path - at least as 
far as we know. Recommendations welcome.
{quote}
This is not what the JavaDoc of {{HttpBinaryProvider#initiateHttpUpload()}} 
implies though.

Also using an arbitrary property that can be chosen by the caller as a proxy 
for access control to the blob store doesn't seem right to me. AFAIK Oak's 
access control model is powerful enough to address this by adding proper 
permission checks. [~anchela], [~stillalex], could you please help sorting this 
aspect out?
{quote}I argue that intuitiveness for client code is more important here, as 
well as saving on new API interfaces
{quote}
Intuitiveness implies aligning with the overall API design (i.e. integrity of 
concept). JCR uses the {{ValueFactory}} for creating values and {{Value}} and 
{{Binary}} for reading values. The way {{HttpBinaryProvider}} decorates 
{{SessionImpl}} is not well aligned with that concept and therefore not 
intuitive wrt. JCR.

 

> [DirectBinaryAccess][DISCUSS] Client access via DataStoreBlobStore directly
> ---------------------------------------------------------------------------
>
>                 Key: OAK-7570
>                 URL: https://issues.apache.org/jira/browse/OAK-7570
>             Project: Jackrabbit Oak
>          Issue Type: Technical task
>          Components: blob-plugins
>            Reporter: Matt Ryan
>            Assignee: Matt Ryan
>            Priority: Major
>
> Open discussion related to OAK-7569:
> The [original pull request|https://github.com/apache/jackrabbit-oak/pull/88] 
> proposes changes to oak-api, oak-segment-tar, oak-store-document, oak-core, 
> and oak-jcr as well as oak-blob-plugins, oak-blob-cloud, and oak-blob-azure.  
> Would it be possible / better to keep the changes local to the oak-blob-* 
> bundles and avoid making changes throughout the stack?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to