How to handle authenticated URLs? #8
Replies: 2 comments 10 replies
-
|
Great question. This definitely depends on your CI provider and where your artifacts are hosted. You may have noticed that Tophat suggests installing the Google Cloud SDK. This is because Tophat supports unauthenticated Google Cloud Storage URLs under the assumption that you have logged in to the CLI using When you say your CI is hosted locally, does this mean the artifacts produced in CI are also hosted locally? You could potentially use signed (authenticated) URLs (with appropriate expiration for security) and then provide Tophat with those signed URLs. Not sure if that's possible with your infrastructure, however. |
Beta Was this translation helpful? Give feedback.
-
|
Wanted to provide a bit of an update here to mention that there are some big changes that will be shipping with Tophat 2 very soon that I believe should address this question. Tophat will have an extension mechanism. In the current iteration, extensions will be responsible for handling the download process (but not unpacking) of artifacts. Extensions can register artifact providers which take care of the download process. Out of the box, Tophat ships with a basic HTTP artifact provider (default behaviour for unauthenticated endpoints), a shell script artifact provider (allows you to write a shell script to fetch the artifact however you want), and a set of Bitrise providers for those who use Bitrise. For custom integrations you'll now have the option to either use a shell script, or write your own Swift-based Tophat extension using the TophatKit SDK (which you can deploy in a private macOS app or ship directly to this repo if you want the world to have it). This means that you can now handle the authentication of protected resources yourself. There is some new API documentation in the README, worth a look for when the upcoming release ships! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Our CI is locally hosted and accessible by VPN, but still requires authentication. If I click to download a zip file in my browser it works (because I have a session cookie), but Tophat won't have this when it goes to download.
How can we utilize Tophat in this scenario?
Beta Was this translation helpful? Give feedback.
All reactions