[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: API to manage cached information

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-01-05 23:57:47 CET

On Fri, 05 Jan 2007, Mark Phippard wrote:

> On 1/5/07, Daniel Rall <dlr@collab.net> wrote:
> >
> >On Fri, 05 Jan 2007, Mark Phippard wrote:
> >
> >> Does Subversion have any API for managing the information it caches in
> >the
> >> runtime configuration area? For example, suppose I have cached guest
> >> credentials for some repository, like (http://svn.collab.net/repos/svn).
> >> Now I get commit rights and want to supply new credentials. Is there an
> >API
> >> that could delete the cached credentials for that repository? If so,
> >could
> >> that API be exposed to JavaHL? If not, would creating an API like this
> >ever
> >> be considered? It seems like GUI clients would all benefit from having
> >such
> >> an API.
> >
> >I don't believe that there's an explicit API as such. With the
> >command-line client, you can provide alternate credentials which
> >correspond to a cached username. If the credentials are used
> >successfully, I *think* they over-write whatever was cached.
> >
> >How were you thinking that an API would look?
>
> My main requirement is to be able to clear cached credentials for a specific
> repository. A method that accepted a URL and then cleared any credentials
> that were cached for that URL would be all I would need. Perhaps also an
> option to clear any saved certificates for the URL as well?

This behavior could be accomplished today by reaching into the
Subversion config area and wiping portions of the auth cache.
However, formalizing this behavior into an API sounds reasonable to
me. What would the JavaHL API look like?

> I could potentially see wanting to provide a new username and password to
> update in the cache. I could also potentially see wanting to get a list of
> the cache. Of course this would just be the repository URL's, not the
> actual credentials.

An API setter for the auth cache which DTRT with null values could
handle both requirements.

> Right now that neither of these are a requirement for me or Subclipse. Just
> clearing the existing credentials is all we need. This request actually
> comes up to us a lot and it complicates things further for us that SVNKit
> uses its own mechanism for caching credentials. So not only do we allow the
> user to click a button to provide new credentials, but we also have to give
> a complicated answer as to how to do it manually.

  • application/pgp-signature attachment: stored
Received on Fri Jan 5 23:57:40 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.