Closed Bug 1548108 Opened 7 years ago Closed 6 years ago

taskcluster-client-go: *_SignedURL methods don't work transparently with taskcluster-proxy

Categories

(Taskcluster :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: pmoore, Unassigned)

Details

It was intended that taskcluster-client-go would be able to work talking directly to taskcluster services with a client ID and access token, or via taskcluster-proxy.

This works for methods that make API calls, but does not (currently) work for methods that return signed urls (methods named *_SignedURL).

Note, taskcluster-proxy has the facility to provide signed urls already, but it currently isn't being harnessed by taskcluster-client-go.

We'll need to think about the best way to determine in the client if we are behind the proxy or not. At the moment it isn't configured explicitly, we only configure a rootURL to either an actual rootURL, or to a rootURL for the proxy. We may wish to reconsider this, or we may wish to just assume that if no client ID / access token is provided, that we are talking to a taskcluster proxy (rather than a taskcluster instance with auth disabled, which has never actually existed).

If the client can determine it is behind a proxy, it can call the bewit endpoint of the taskcluster-proxy to retrieve signed urls, instead of signing the urls itself.

Using the presence or absence of a clientId for this won't work -- there are lots of uses of a client library in cases where credentials aren't necessary. Auth need not be disabled.

Typically it has been up to the caller to not try to generate signed URLs using clients configured to talk to a proxy, and this hasn't caused any issues. In the rare cases where we want to generate a signed URL, we just use the /bewit endpoint directly.

In keeping with efforts to make all clients act the same way, if we want to make the client automatically fetch signed URLs from the proxy, we will need to do so in all clients, using similar designs.

So, this is potentially a good bit of work. What's the concern that brings up the issue now? Would this be ahead of, or behind the ongoing work on go/java client generation?

Component: UI and Tools → General

(In reply to Dustin J. Mitchell [:dustin] pronoun: he from comment #1)

Using the presence or absence of a clientId for this won't work -- there are lots of uses of a client library in cases where credentials aren't necessary. Auth need not be disabled.

Agreed.

Typically it has been up to the caller to not try to generate signed URLs using clients configured to talk to a proxy, and this hasn't caused any issues. In the rare cases where we want to generate a signed URL, we just use the /bewit endpoint directly.

Indeed, we do currently need separate code paths for when using the proxy and when not using the proxy, rather than being able to transparently request a signed URL from the client, and the client to take the appropriate actions to return the requested signed URL. If the clients had a better proxy integration, this wouldn't be necessary, and would mean the same code could be executed when run locally by a developer, or when run in automation. This has been a long-standing goal, which is now achieved by the generated API call methods, but not yet by the generated signed URL methods.

In keeping with efforts to make all clients act the same way, if we want to make the client automatically fetch signed URLs from the proxy, we will need to do so in all clients, using similar designs.

Indeed, it would be preferable for the clients to be aligned on features.

So, this is potentially a good bit of work.

I agree this is a considerable piece of work.

What's the concern that brings up the issue now?

I ran some code in automation that unexpectedly failed when running behind a proxy, but worked when talking directly with taskcluster services.

Would this be ahead of, or behind the ongoing work on go/java client generation?

The current priorities I have from most important to least important are:

I think it would make most sense to tackle this at the same time as the client harmonisation work, so that the first versions of the client generators we release already have this feature/fix.

Yes,(In reply to Pete Moore [:pmoore][:pete] from comment #2)

I think it would make most sense to tackle this at the same time as the client harmonisation work, so that the first versions of the client generators we release already have this feature/fix.

This is pretty far down the priority list right now.

(In reply to Chris Cooper [:coop] pronoun: he from comment #3)

This is pretty far down the priority list right now.

This happened eventually, although not in the originally intended way.

I'm going to WONTFIX this until we have users complaining about it.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.