6 Commits

Author SHA1 Message Date
Aaron Schlesinger
1acdf17a4a Reverting passthrough auth (#1700)
* Reverting PR 1650

https://github.com/gomods/athens/pull/1650 was a big change to the
authentication/authorization code, which we have decided to pull
out and potentially move into a separate process/project

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* removing commented, unused code

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* removing more commented, unused code

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* removing more unused code

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-03-11 11:28:15 -08:00
Marwan Sulaiman
dfb7887080 Allow Athens to Propagate Authentication to Mod Download (#1650)
* Allow Athens to Propagate Authentication to Mod Download

* update readme

* add pattern matching to auth propagation

* Propagate authentication to pre declared static host

* quote redis test

* fix flaky redis error message

* fix config tests

* fix config tests

* Update config.dev.toml

Co-authored-by: Ted Wexler <ted@stuckinacan.com>

* gofmt

Co-authored-by: Ted Wexler <ted@stuckinacan.com>
2020-07-30 17:06:53 -04:00
Marwan Sulaiman
298c6cd74d cmd/proxy/actions: pass NoSumPatterns to GoGetFetcher (#1391)
* cmd/proxy/actions: pass NoSumPatterns to GoGetFetcher

* add gosum unit tests

* upgrade appveyor to 1.13

* fix test typo

* check appveyor version

* AppVeyor has no 1.13

* use logger
2019-09-23 12:47:40 -04:00
Yi Tang
7de77889ad support goproxy for list/download command (#1304) 2019-07-15 14:07:24 -04:00
marpio
bc4e533d49 Use go mod download -json (#710)
* use go mod download -json

* annotate json, fix build

* add comment

* address review feedback
2018-10-01 20:53:17 +02:00
Aaron Schlesinger
ab9a4c0f41 Moving the fetch logic into 'pkg/module' (#291)
* add module fetch and fetchers

* Breaking module ref out of the fetcher

* disk ref in progress

* very broken go get fetcher

* refactoring ref and fixing up the disk ref

* adding a test for the disk ref

* doing test setup right

* passing version

* fixing syntax err

* removing raw format string

in favor of a function that does the same thing

* removing obsolete godoc

* removing the switch in favor of nested if statements

hopefully this is easier to read

* passing data into the format strings

* refactoring the closer

* creating and looking for files in the root

* genericFetcher => goGetFetcher

* remove the clear method on go get fetcher

the ref returned from fetch does it

* remove unnecessary call to isVgoInstalled

calls to fetch will fail if vgo is not installed

* remove unneeded dirName

* adding preliminary test for the go get fetcher

* adding a test for fetch

* executing fetch test

* adding docs and simplifying the fetcher

* declaring the storage version up front

* fixing the source path

* creating test files in a separate function

* closing files immediately

instead of aggregating them for later. whaaat was I thinking???

* passing context into storage driver

* not closing the source file

* not putting the module name in quotes anymore

* adding a warning about deleting the package

* adding go binary name

* embedding github API limit error

* check files in the success path

* passing errors up

not just messages

* doh

* using vgo for the go get fetcher tests

* not using multierror because it's unneeded

* less code 😄

* custom error

* removing unused import

* return noop refs

* adding link to issue for the TODO

* simplifying

* simplifying moar!

* using config.FmtModVer

* simplifying

* defer closing the zip

* closing the zip

* adding comment about closing the ver.Zip

* GO_BINARY_NAME => GO_BINARY_PATH

* using errors pkg

* fixing compile err

* removing redundant args

* removing requirement that caller calls Clear on fetch error

* fixing build

* fix

* adding masterminds semver

* returning better error

and checking version format

* removing unused error

* using proper semver function

* fixin compile err

* rm that shizz
2018-07-26 13:08:07 -07:00