Wang Yan
b9228096dc
enable robot to support create project ( #15461 )
...
1, for admin only, the system level robot should contains the project creation access.
2, for not admin only, the system level robot can create project.
3, for the project that created by system level robot, use the admin ID as the ownerID.
No path for project level robot to create project.
Signed-off-by: wang yan <wangyan@vmware.com>
2021-08-24 09:34:02 +08:00
Steven Zou
f3a875abd7
Merge pull request #15344 from bitsf/replication_policy_exclude
...
feat(replication) add exclude decoration in policy
2021-08-19 14:26:17 +08:00
Daniel Jiang
cdb13f5191
Merge pull request #15291 from kschu91/bugfix/15290
...
if username is not available in remote, fall back to username from token
2021-08-17 16:58:46 +08:00
Wang Yan
14f7274989
support robot to list project ( #15431 )
...
1, add permission check for API of List Projects
2, add permission check for API of List Repositories
3, use the self defined query to handle both names and public query
Signed-off-by: wang yan <wangyan@vmware.com>
2021-08-17 16:35:36 +08:00
Ziming Zhang
62808bf014
feat(replication) refactor replication filter Validate()
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-08-17 14:19:14 +08:00
Ziming Zhang
698c336421
feat(replication) add exclude decoration in policy
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-08-17 14:19:13 +08:00
stonezdj
409039b502
Support IPv6 when connecting to LDAP server
...
Use net.SplitHostPort instead of strings.Split
Fixes #15354
Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-08-04 12:54:44 +08:00
Wang Yan
f7b1610476
replace jwt model ( #15367 )
...
update the jwt model to github.com/golang-jwt/jwt
Starting from v3.2.1, the import path has changed from github.com/dgrijalva/jwt-go to github.com/golang-jwt/jwt.
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-07-29 11:08:10 +08:00
Shengwen Yu
766e953325
fix: update adapter ut (mock http requests)
...
Closes : #15318
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2021-07-22 19:45:36 +08:00
Daniel Jiang
e46e9631fa
Merge pull request #15303 from reasonerjt/fix-15241
...
Remediate the empty subiss problem
2021-07-16 13:34:40 +08:00
Daniel Jiang
3e983b1747
Merge pull request #15242 from kschu91/bugfix/15241
...
Fix refreshing oidc access token breaks users subiss in database
2021-07-16 10:58:31 +08:00
Daniel Jiang
422894a0f5
Remediate the empty subiss problem
...
This commit include 2 changes to mitigate and remediate the problem
described in #15241
1. When the token is to be updated in the "oidc_user" table, make sure
only the column "token" will be udpated.
2. Restore the subiss column for the record that has this column cleared
by mistake, by decoding the persisted token.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-07-16 00:07:47 +08:00
stonezdj(Daojun Zhang)
2fa530eefa
Merge pull request #15247 from stonezdj/21jun30_remove_auth_user
...
Delete users under auth_mode other than db_auth
2021-07-14 13:25:43 +08:00
stonezdj
c163bc8317
Delete users under auth_mode other than db_auth
...
The following information should cleanup before delete user:
Delete project member of this user.
Delete oidc_user when auth_mode is oidc_auth.
Fixes #8424
It also removes the deleted user from project member and the deleted condition in the project member query for consistency
Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-07-12 11:31:40 +08:00
Alexis L
2ce814329b
Merge branch 'goharbor:master' into fix-basedn-empty
2021-07-09 22:32:35 +02:00
Alexis
d6283ee913
Add SearchDN error, mark field as required in UI
...
Signed-off-by: Alexis <60alexis@gmail.com>
2021-07-09 22:30:52 +02:00
Kevin Schu
03b7b01f77
reverted unintentional committed change
...
Signed-off-by: Kevin Schu <kevin.schu@aoe.com>
2021-07-08 15:43:14 +02:00
Kevin Schu
0679f4701e
if username is not available in remote, fall back to username from token
...
Signed-off-by: Kevin Schu <kevin.schu@aoe.com>
2021-07-08 15:36:18 +02:00
elihe
426f7bc7bc
Fix commentline typos in src/pkg/repository/model/model.go
...
Signed-off-by: elihe <elihe@tencent.com>
2021-07-02 10:12:15 +08:00
Kevin Schu
4147fbeba0
subiss needs to be part of selected fields, otherwise this attribute would be empty and will cause issues when working with the user object later on.
...
Signed-off-by: Kevin Schu <kevin.schu@aoe.com>
2021-07-01 15:12:28 +02:00
Wang Yan
1abe978e87
refactor job log
...
Move job service logger to new program model
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-06-29 13:37:45 +08:00
Wang Yan
8a0cd99473
fixes 13976 ( #15047 )
...
Fixes #13976 for the quota exceed case, gc will print the untagged blobs for dry-run
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-06-04 15:56:53 +08:00
Jiaolin Yang
a2992327be
Merge pull request #14919 from yunkunrao/master
...
Fix dragonfly preheat error.
2021-06-03 13:36:15 +08:00
yunkunrao
af814a2af2
Code clean
...
Signed-off-by: yunkunrao <yunkunrao@gmail.com>
2021-06-01 23:13:03 +08:00
Wenkai Yin(尹文开)
6e649ac39f
Merge pull request #15014 from heww/move-scan-report-to-job
...
refactor: convert scan report in scan job
2021-05-31 15:55:31 +08:00
Wenkai Yin(尹文开)
f0e1ba4e1b
Merge pull request #15005 from ywk253100/210528_ns
...
Declare the capability of supported repository path component for registries
2021-05-31 15:53:40 +08:00
He Weiwei
f6a1c31f9f
refactor: convert scan report in scan job
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-05-29 12:19:36 +00:00
He Weiwei
c7a4af3170
test: mock the API requests for the huawei registry ( #15009 )
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-05-28 17:09:48 +08:00
Wenkai Yin
741793a553
Declare the capability of supported repository path component for registries
...
Declare the capability of supported repository path component for registries
fixes #14981
fixes #14980
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-05-28 10:42:16 +08:00
Ziming Zhang
77b44a62e7
fix aws adapter url
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-05-27 23:29:12 +08:00
yunkunrao
82fd606f8f
Update Unit Test.
...
Signed-off-by: yunkunrao <yunkunrao@gmail.com>
2021-05-27 18:50:47 +08:00
Wang Yan
42a9d0d905
remove common project code ( #14939 )
...
move project model from common to pkg
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-05-25 11:01:19 +08:00
fanjiankong
306e519dbe
Fix tencentcr adapter.
...
1. Limit API qps for the adapter.
2. Allow set qps via env.
3. Fix Tencnet SDK pagenation.
4. Fix resource filter.
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2021-05-24 10:33:49 +08:00
He Weiwei
a1ac9b98df
fix: delete robots by project id using raw sql ( #14951 )
...
QuerySeter.Delete will call two queies in the orm of beego. First it
will query all primary keys of the model by the QuerySeter, and then the
orm will delete the models using the IN statement of these primary keys.
This will be failed in the postgres when the records more than 65535.
This commit changes to use the raw query to delete the robots of the
project.
Closes #14678
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-05-24 10:31:48 +08:00
yunkunrao
fa8a0d09d6
Fix dragonfly preheat error.
...
Signed-off-by: yunkunrao <yunkunrao@gmail.com>
2021-05-23 17:50:54 +08:00
Daniel Jiang
dee6064e60
Merge pull request #14926 from reasonerjt/rm-common-dao-oidc-user-onboard
...
Remove the onboard and update funcs for OIDC user from common/dao
2021-05-20 19:34:59 +08:00
Daniel Jiang
66766a8f69
Remove the onboard and update funcs for OIDC user from common/dao
...
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-05-20 16:23:07 +08:00
ChenYu Zhang
a50f782beb
fix: change sql to improve the performance of catalog api ( #14820 )
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2021-05-20 15:52:53 +08:00
Daniel Jiang
8600b06975
Merge pull request #14925 from ywk253100/210520_perf
...
Improve the performance of artifact related APIs
2021-05-20 14:10:45 +08:00
Wenkai Yin(尹文开)
0fe551274d
Merge pull request #14921 from ywk253100/210519_db
...
Clean up tech debt codes
2021-05-20 13:44:10 +08:00
Wenkai Yin(尹文开)
36d76d8704
Merge pull request #14912 from ywk253100/210518_bug
...
Truncate the string when deletinng the resources when the length exceeds the limit
2021-05-20 12:09:36 +08:00
Wenkai Yin
998e392bb4
Clean up tech debt codes
...
Clean up tech debt codes
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-05-20 11:47:46 +08:00
Wenkai Yin
dc059a9a8f
Improve the performance of artifact related APIs
...
Improve the performance of artifact related APIs by adding indexes and refactoring sql logic
Closes #13890 #14813 #14814
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-05-20 11:25:43 +08:00
Wenkai Yin(尹文开)
08ed886936
Merge pull request #14914 from ywk253100/210518_registry
...
Update the field name of registry model
2021-05-19 17:20:12 +08:00
Daniel Jiang
294ee52d7a
Merge pull request #14900 from reasonerjt/rm-common-dao-getuser-onboard
...
Remove GetUser and Onboard from common/dao
2021-05-19 11:21:00 +08:00
Wenkai Yin
315f490d3c
Update the field name of registry model
...
Update the field name of registry mode
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-05-18 17:26:20 +08:00
Wenkai Yin
5ebc8b4fdd
Truncate the string when deletinng the resources when the length exceeds the limit
...
Truncate the string when deletinng the resources when the length exceeds the limit
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-05-18 17:17:41 +08:00
Daniel Jiang
952644e23f
Remove GetUser and Onboard from common/dao
...
Replaced by funcs in src/pkg/user and src/controller/user
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-05-18 15:28:41 +08:00
He Weiwei
0c315d8aee
refactor: remove allowlist in GetSummary of scan controller ( #14836 )
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-05-18 14:01:59 +08:00
Vadim Bauer
1a3335edc5
Provide information about missing RBAC permissions in debug mode. ( #14906 )
...
Signed-off-by: Vadim Bauer <vb@container-registry.com>
Co-authored-by: Vadim Bauer <vb@container-registry.com>
2021-05-18 10:02:34 +08:00