manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Benedetti <abenede...@apache.org>
Subject Re: [Repository Connector] In Job Repository Config modification
Date Thu, 09 Apr 2015 11:31:26 GMT
Of course Karl!
This is the problem :
Developing a Repo connector similar to Dropbox ( Box connector) .
Authentication in Box is based on OAuth2.
In details after a process to grant access to your application you get 2
parameters for you Repository Connector :
Access Token and Refresh Token [1]

To instantiate a BoxAPIConnection you need a Client_id,Client_secret ( 2
not mutable) and an Access Token and a Refresh Token (2 mutable) .
The access token expires in 1 hour, the Refresh Token can be used to get a
new Access Token, when this happens a new Access Token is produced ( 1h), a
new Refresh Token is created and the old Refresh Token invalidated.

Assuming the BoxAPIConnection object is managing properly the refreshment,
the Job will work until the BoxAPIConnection is living.
When a Job finishes ( or Manifold stop and restart) a new Job will start
with the old configured Access Token and Refresh Token ( that are not valid
anymore ).

Unfortunately we can not set for the connector the only 2 not mutable
params, as it is required user interaction to produce them so we need to
configure all the 4 values.
We can consider the Access Token and the Refresh Token produced by a human
user or an external application and sent to ManifoldCF.
Using the current approach ManifoldCF should be able to update the values
he has to be consistent with the updated values in BoxAPIConnection.

A bigger problem comes when both a RepoConnector and an Authority Connector
are in place , but for this other complicate scenario I will wait until I
have a clear situation from Box itself regarding their approaches.

[1] https://developers.box.com/oauth/



2015-04-09 11:53 GMT+01:00 Karl Wright <daddywri@gmail.com>:

> Hi Alessandro,
>
> It would be great if you could describe the customer problem from a bit
> higher level, to see if there's a better design we could come up with.
> What you have described is quite difficult to do with MCF due to the
> multi-threaded and highly-cached nature of it.
>
> Thanks,
> Karl
>
>
> On Thu, Apr 9, 2015 at 5:55 AM, Alessandro Benedetti <
> abenedetti@apache.org>
> wrote:
>
> > Hi guys,
> > I have one question :
> > *ManifoldCF Version* : 1.8
> >
> > Developing a custom Repository Connector I have the need of updating the
> > Repository Connector config based on a Custom Listener of events of a
> > custom Publisher .
> >
> > This listener will react to the publisher events during a Job execution (
> > i.e. can happen during the addSeeds or the processDocuments) .
> > The listener will need to change the repository config accordingly and
> save
> > them in the database.
> > The main reason for this is that we need to store in the DB the status of
> > the publisher, because a new Job will need to use the updated Repo
> > Connectors config ( changed by others jobs) .
> > To simplify the problem let's assume we do not have concurrency problems
> > right now.
> > In the future we will need to  implement a solution that will be thread
> > safe.
> >
> > Cheers
> >
> >
> > --
> > --------------------------
> >
> > Benedetti Alessandro
> > Visiting card : http://about.me/alessandro_benedetti
> >
> > "Tyger, tyger burning bright
> > In the forests of the night,
> > What immortal hand or eye
> > Could frame thy fearful symmetry?"
> >
> > William Blake - Songs of Experience -1794 England
> >
>



-- 
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message