* Display a warning log message if the validation response fails with a valid reason
* provide a reason and description for failed validation
* added unknown to description
* Allow a successful response to carry a message
* tidy up
* formatting
* Simplified the message response
* updated based on latest comments
* no need to export struct
* suggested method rename
Co-authored-by: Marwan Sulaiman <marwan.sameer@gmail.com>
* extend filtering logic and configuration to include version lists
Module filtering is very useful, but many deployments will need to
satisfy even more granular constrainsts. Enterprises may need
approved lists specific down to the minor (or patch) version element.
Version filtering logic is similar to the module filtering, in that
it's a prefix match of the version requested against each entry in the
version filter list.
Closes#1045
* include version filtering in documentation with example
* allow filtering when version is missing
Endpoints that do not specify a version, such as "@v/list", only need
to be filtered by module rules.
* refactoring code to improve HTTP status code
* refactoring code to improve HTTP status code
* refactoring code to improve HTTP status code
* refactoring code to improve HTTP status code
* File permissions on config files allow more restrictive setting
* Make the tests a bit more readable
* Bring back the tests dude
* Update error message
* remove else
* Add more test cases
* Change Lstat to Stat
* Add note for umask
* Make sure the permissions are 0600 or lower
* Update config file
* Do not check for windows
* Fix CI errors
* Fix CI test
* Remove inefficient assignment of variable cxt in pkg/storage/fs
* Remove inefficient assignment of variable cxt in pkg/storage/minio
* Remove inefficient assignment of variable cxt in pkg/storage/mongo
* Fix commonly misspelled English words successfully and accessible
* Remove inefficient assignment of variable cxt in pkg/download
* Remove inefficient assignment of variable cxt in pkg/module
* Add missing error checks in a few unit-test files
* Revert removal of inefficient assignment of variable cxt
The variable, although is not being used, it maintains the readability
in the functions where it’s being assigned. The removal of `cxt` in
these files may introduce errors when a new function taking these
values is called. Two other contributors agree that it’s easy to miss
this detail when passing the variable to other functions and the traces
are not being recorded.
* Modify unit-test error reporting for the config package
* Modify config test to exit when ioutil.TempFile or os.Chmod fail
* add new log context middleware to store log entries in the context
* replace LogEntryMiddleware and add NoOpLogger
* fix failing test
* move middleware to top level
* actually move middleware to top level
* When the filter file is missing throw a fatal
* Ignore path when file is not specified
* Fix build failure on ci
* Remove logs
* Fix propagate and handle errors
* Fix build error
* Actually check filter file
* Check for errors in the test suite as well
* Improve test coverage
* Add more tests
* Simplify NewFilter function
* Address review comments
* Upgrade buffalo
* Switch to go modules everywhere
* Fixes from buffalo fix
* Add missing modules from module list
* Update vendored modules in /vendor
* Stop using vendor directory for tests
* Check go.mod and go.sum files on verify
* Upgrade Buffalo from v0.13.0 to v0.13.1
* Fix test for new Buffalo
Allow for new Buffalo code
* Add test for endpoint with trailing slash
* Remove nolonger used moniker package
Usage was removed in 97d8013
* Remove reference to Zeus
Use name Proxy for now.
* Remove Olympus code
See github issue #777
* Remove Olympus related vendor modules
* Mention Olympus removal in docs
* Add note about no registries existing
* Remove eventlog
* Update docs for Olympus removal
* switch proxy to config file
pull in single flight changes
* changes for single-flight
* intermediate stage. All tests passing. pkg still has env refs
* remove all env references
* delete config/env entirely
* fix failing tests
* create the config.toml file as part of dev setup
* create config file only if it doesn't exist
* update Dockerfiles to use config file
* move composing elements to the top
* verbose parameter naming
* newline
* add flag for config file path
* update docs with config file flag
* remove unnecessary nil check
* use filepath.join
* rename redis port to address
* fix path.join
* fix issues after merge
* add vendor dir
* Initial chanages for observability
* Fix some panics to start testing
* Export tracing properly
* First example of child spans using opencensus
* Add spans to download protocol
* Add url to traces
* Remove opentracing
* Remove gopkg.* files
* Start deprecating opentracing
* Resolve stupid build errors
* Use observability package
* Fix test errors
* Convert buffalo spans to observercontext
* change package name
* defer flush to the end of the app execution
* Change op names to the correct package
* Rename pkg/observability to pkg/observ
* Show traces for the package
* Keep tracing in the earlier way
* Add info from request headers
* Remove whitespace
* Move exporter url to env var
* Add to env file for documentation
* Remove opentracing stuff
* Use stdlib
* Shorten service name
* Add a service name to olympus as well
* Add test to test if there is a recursion or not
* Add Ops Suite
* Move around code
* Make sure the service is not instantiated if the exporter is not found
* The proxy middleware calls an hook if set to check if the module needs
to be filtered
* Fixed error handling
* Added a middleware func that passes the log entry down to other
middlewares
* Split the filter middleware in two
* Moved validation middleware in its own file
* Renamed filter to middleware, all the middleware stuff in a single file
* Moved default hook to empty string
* Split tests of filter middleware from validation middleware
* Installed the validation middleware only if the hook is set
* Moved filter test to middleware test
* Fixed gofmt issue caused by manual merge
* Fixed wrong logrus import
* Removed logger from filter middleware
* Moved middleware functions to own package
* Removed unused argument, fixed errors
* Fixed gofmt errors
* Made middleware func private
* Changed debuglevel from string to enum
* Added comments to now public functions
* Changed module alias to a shorter one
* Removed white space
* Split middleware in separate files, injected the hook as param
* Removed commented code