Ramkumar Chinchani
763287873e
fix(config): make all extension config consistent ( #888 )
...
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-10-21 15:33:54 +03:00
Andrei Aaron
38b00e3507
chore(lint): gci to separate zot from other imports ( #870 )
...
Signed-off-by: Andrei Aaron <andaaron@cisco.com >
2022-10-20 09:39:20 -07:00
peusebiu
76714d53f8
fix(tests): consolidate routes tests ( #892 )
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-10-19 09:26:46 -07:00
peusebiu
91dd5496fc
chore: rename search route prefix ( #887 )
...
* chore: rename search route prefix
* chore: use builtin time.Duration.Truncate() on latencies
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-10-18 20:46:06 -07:00
Catalin Hofnar
caf88ddb1e
refactor(tests): remove hardcoded digests ( #871 )
...
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com >
2022-10-18 20:43:56 -07:00
Catalin Hofnar
f3b1913fbd
build: add commit hash to Config at build for proper discovery readme ( #854 )
...
* build: add commit hash to Config at build for proper discovery readme link
* fix: use tag instead of commit hash, add to release build
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com >
2022-10-11 09:01:59 -07:00
Andrei Aaron
98854337ff
build(tags): remove redundant build tag ui_base ( #857 )
...
It was not used for UI, it had become a CLI dependency
with the same functionality as search
Signed-off-by: Andrei Aaron <andaaron@cisco.com >
2022-10-10 15:05:55 +03:00
Catalin Hofnar
ffc9929c1a
feat(GraphQL): playground, served by zot in specific binary ( #753 )
...
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com >
2022-10-05 12:56:41 -07:00
Nicol
33a431ef43
Update go version to 1.19 ( #829 )
...
* ci: Update go version to 1.19
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
* ci: Fix lint issues
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
* ci: Added needprivileges to lint, made needprivileges pass lint
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com >
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com >
Co-authored-by: Catalin Hofnar <catalin.hofnar@gmail.com >
2022-10-05 13:21:14 +03:00
Catalin Hofnar
bd9e6fc7e3
Removed swagger requirement from binary-minimal and binary ( #838 )
...
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com >
2022-10-03 09:53:44 -07:00
peusebiu
8237f8d20a
storage: Move common code in helper functions, closes #730 ( #820 )
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-09-30 10:35:16 -07:00
Andrei Aaron
e0d808b196
Include image vulnerability information in ImageSummary ( #798 )
...
Return this data as part of GlobalSearch and RepoListWithNewestImage
query results.
This commit also includes refactoring of the CVE scanning logic in
order to better encapsulate trivy specific logic, remove CVE scanning
logic from the graphql resolver.
Signed-off-by: Andrei Aaron <andaaron@cisco.com >
2022-09-28 11:39:54 -07:00
Andreea Lupu
f686ab6bf6
initial design for task scheduler ( #700 )
...
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com >
2022-09-22 22:27:56 -07:00
Ramkumar Chinchani
90c8390c29
routes: support resumable pull
...
Some embedded clients use the "Range" header for blob pulls in order to
resume downloads.
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-09-15 15:51:47 -07:00
Ramkumar Chinchani
f3faae0e09
report listening port when chosen by kernel ( #770 )
...
Based off of the PR by @thesayyn
https://github.com/project-zot/zot/pull/720
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-09-09 08:41:13 +03:00
slab713
8ffb053cec
Replaced deprecated io/ioutil functions ( #768 )
...
Signed-off-by: slab713 <109306207+slab713@users.noreply.github.com >
2022-09-02 15:56:02 +03:00
Shivam Mishra
6c293719e3
storage: different subpaths can point to same root directory
...
currently different subpaths can only point to same root directory only
when one or both of the storage config does not enable dedupe
different subpath should be able to point to same root directory and in
that case their storage config should be same i.e GC,Dedupe, GC delay
and GC interval
Signed-off-by: Shivam Mishra <shimish2@cisco.com >
2022-08-31 15:43:43 -07:00
Alex Stan
49e8167dbe
graphql: Apply authorization on /_search endpoint
...
- AccessControlContext now resides in a separate package from where it can be imported,
along with the contextKey that will be used to set and retrieve this context value.
- AccessControlContext has a new field called Username, that will be of use for future
implementations in graphQL resolvers.
- GlobalSearch resolver now uses this context to filter repos available to the logged user.
- moved logic for uploading images in tests so that it can be used in every package
- tests were added for multiple request scenarios, when zot-server requires authz
on specific repos
- added tests with injected errors for extended coverage
- added tests for status code error injection utilities
Closes https://github.com/project-zot/zot/issues/615
Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro >
2022-08-26 21:31:26 +03:00
Nicol Draghici
5450139ba1
Get identity when using TLS certificates
...
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
2022-08-26 19:52:51 +03:00
Ramkumar Chinchani
2ff8e8b7d2
fix dependabot alerts
...
https://github.com/project-zot/zot/pull/737
https://github.com/project-zot/zot/pull/738
https://github.com/project-zot/zot/pull/739
https://github.com/project-zot/zot/pull/740
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-08-23 09:38:30 -07:00
Ramkumar Chinchani
5c01c4eab4
support OCI image index at manifest endpoint ( #638 )
...
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-08-20 11:18:48 +03:00
Andrei Aaron
bd9ad998cd
Fix file handlers not being closed after calls to ImageStore.GetBlob
...
This is to fixes hitting the FD limit when reading blobs from the disk in the graphql API
Signed-off-by: Andrei Aaron <andaaron@cisco.com >
2022-08-19 09:22:13 -07:00
Catalin Hofnar
74630ed3a0
Added content-type to Access-Control-Allow-Headers needed for playground preflight
...
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com >
2022-08-16 22:47:24 +03:00
Ramkumar Chinchani
4b8e288cd3
fix dependabot alerts
...
https://github.com/project-zot/zot/pull/712
https://github.com/project-zot/zot/pull/714
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-08-13 00:02:36 -07:00
Nicol Draghici
a702a2377e
Remove AllowReadOnly and ReadOnly
...
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
Remove check and set header every time
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
2022-08-10 14:27:21 -07:00
Bogdan BIVOLARU
0f386f0c89
Remove from Response header Range the 'bytes' string
...
Conformance spec requires responding to PATCH requests with
response header 'Content-Range' and value <range>
Signed-off-by: Bogdan BIVOLARU <104334+bogdanbiv@users.noreply.github.com >
2022-08-03 19:46:18 +03:00
Bogdan BIVOLARU
f92e584301
Fix 'InvalidManifestErr' to have a response.body
...
Signed-off-by: Bogdan BIVOLARU <104334+bogdanbiv@users.noreply.github.com >
2022-08-03 19:46:18 +03:00
Lisca Ana-Roberta
87fc941b3c
image level lint: enforce manifest mandatory annotations
...
closes #536
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
2022-07-27 11:48:04 +03:00
Laurentiu Niculae
7e3d063319
freeform querry api
...
Signed-off-by: Laurentiu Niculae <themelopeus@gmail.com >
2022-07-20 10:03:11 -07:00
Alex Stan
ada21ed842
Manage builds with different combinations of extensions
...
Files were added to be built whether an extension is on or off.
New build tags were added for each extension, while minimal and extended disappeared.
added custom binary naming depending on extensions used and changed references from binary to binary-extended
added automated blackbox tests for sync, search, scrub, metrics
added contributor guidelines
Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro >
2022-06-30 09:53:52 -07:00
Shivam Mishra
620bc7c517
routes: strip query parameter from request URL
...
reuqest url also contains query parameter due to this in some scenarios
location header is setting up incorrectly, strip query parameter from
request url to correctly setup location header.
Closes #573 #575
Signed-off-by: Shivam Mishra <shimish2@cisco.com >
2022-06-08 22:50:37 -07:00
Andreea-Lupu
081ba0b2f2
fix periodic background tasks - gc and scrub
...
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com >
2022-06-02 08:58:02 -07:00
Lisca Ana-Roberta
62775cc095
fixed failed tests for all skopeo versions
...
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
skopeo verifications
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
skopeo verifications modified makefile
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
modified how to get digest and fixed makefile
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
fixed failed tests for all skopeo versions
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
echo skopeo version
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
skopeo verifications
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
skopeo verifications modified makefile
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
modified how to get digest and fixed makefile
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
skopeo failed tests fixed
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
changed function name
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
fixed lost modifications
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
fixed code coverage and dead code
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
2022-05-27 08:19:07 -07:00
Shivam Mishra
0dd00e7883
fix extension endpoints
...
Signed-off-by: Shivam Mishra <shimish2@cisco.com >
2022-05-25 13:46:43 -07:00
Ramkumar Chinchani
6b841809e3
fix CVE-2022-29173/GHSA-66x3-6cw3-v5gj
...
https://github.com/project-zot/zot/security/dependabot/16
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-05-25 11:34:24 -07:00
Shivam Mishra
dcdeb935fd
use zot as an extension name, ext as a component and search as a module
...
add endpoints field in ext discover api
distribution spec extension discover api has endpoints field required.
https://github.com/opencontainers/distribution-spec/blob/main/extensions/_oci.md#extensions-property-descriptions
Signed-off-by: Shivam Mishra <shimish2@cisco.com >
2022-05-24 19:12:40 -07:00
Petu Eusebiu
5e22acbbc4
s3: added logic for deduping blobs
...
Because s3 doesn't support hard links we store duplicated blobs
as empty files. When the original blob is deleted its content is
moved to the the next duplicated blob and so on.
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-05-24 17:00:10 -07:00
Shivam Mishra
36c9631000
ext: use distribution spec route prefix for extension api
...
Following the spec defined here https://github.com/opencontainers/distribution-spec/tree/main/extensions
Signed-off-by: Shivam Mishra <shimish2@cisco.com >
2022-05-22 16:35:16 -07:00
laurentiuNiculae
7d8af50aec
mocked tests for routes
...
Signed-off-by: laurentiuNiculae <themelopeus@gmail.com >
2022-05-20 13:27:09 -07:00
Petu Eusebiu
7c3a8f9d07
Report unknown keys when parsing configuration files
...
Report missing mandatory ldap keys
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-05-16 14:13:31 -07:00
laurentiuNiculae
bb95af5b4d
default policy only authorization
...
unit tests for manifest integrity when updating
Signed-off-by: laurentiuNiculae <themelopeus@gmail.com >
2022-05-03 11:46:55 -07:00
Alex Stan
d325c8b5f4
Fix problems signaled by new linter version v1.45.2
...
PR (linter: upgrade linter version #405 ) triggered lint job which failed
with many errors generated by various linters. Configurations were added to
golangcilint.yaml and several refactorings were made in order to improve the
results of the linter.
maintidx linter disabled
Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro >
2022-04-27 09:55:44 -07:00
Andreea-Lupu
5e35dfa28f
make gc periodic
...
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com >
2022-04-18 10:25:29 -07:00
Petu Eusebiu
4e20ab8a5d
go.mod: update dependencies
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-04-15 10:31:37 -07:00
Andreea-Lupu
9454c77be2
make scrub inline and periodic
...
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com >
2022-04-01 13:38:24 -07:00
Alexei Dodon
ad519e2d3e
Leave zot repositories in a consistent state after zot hits fd limit closes #359
...
Signed-off-by: Alexei Dodon <adodon@cisco.com >
2022-03-31 13:25:15 -07:00
Petu Eusebiu
be910cf01c
lint: Move out config reloader context from controller struct
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-03-24 10:50:01 -07:00
Petu Eusebiu
353b0c6034
Move api constants in separate 'constants' package to avoid circular imports
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-03-24 10:50:01 -07:00
Petu Eusebiu
6d04ab3cdc
sync: support reloading sync config when the config file changes
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-03-18 11:24:11 -07:00
laurentiuNiculae
63d94d4ac5
Update dist-spec version automatically
...
Warning if config has wrong dist-spec version
Signed-off-by: laurentiuNiculae <themelopeus@gmail.com >
2022-03-14 10:24:03 -07:00