[
https://issues.apache.org/jira/browse/OAK-7570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16526163#comment-16526163
]
Michael Dürig commented on OAK-7570:
------------------------------------
{quote}2) What do you see as the benefit of this approach?
{quote}
Separation of concerns and integrity of concept: the e.g. {{SegmentNodeStore}}
is conceptually not a {{HttpBlobProvider}}. Further the proposed approach leads
to unnecessary tight coupling.
{quote}3) Unfortunately, the {{ValueFactoryImpl}} has no access to the
{{SessionImpl}} needed for the permission check.
{quote}
I missed the permission check part so far. However there is two thing I wonder:
# Why do we need a permission check at all for creating a binary? This is not
consistent with {{javax.jcr.ValueFactory#createBinary()}} where everyone with
access to a session can create a binary. The permission check takes place only
later when the binary is attached to a property.
# While the current patch checks access to the path during
{{initiateHttpUpload}}, nothing seem to prevent users to later attach the
binary to any other property.
{quote}it seemed nicer for the API client to have this as an extension
interface on the Session (easier to get to)
{quote}
There is just a single additional call to get a value factory from a session.
{quote}and to place getHttpDownloadURL() there as well (less new API
interfaces), which is something that would not fit into the ValueFactory,
because it does not create a new Value.
{quote}
To my eyes {{HttpBlobProvider}} is a factory for a value. The fact that
creating a binary is a two step process does not matter. The only bit that does
not fit in is the \{{getHttpDownloadURL}} method. As proposed earlier, I would
move this to an extension interface on {{Binary}}, separating read and write
concerns.
> [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)