In some cases, the robot automatically generates passwords that do not meet confidentiality requirements.
The fix adds retry for auto generating passwords, and the timeout is 1 minute.
The requirement: the secret must longer than 8 chars with at least 1 uppercase letter, 1 lowercase letter and 1 number
Signed-off-by: Wang Yan <wangyan@vmware.com>
* added rbac.ResourceTagRetention to developer
Added Permissions to Developer to according to the "User Pemission by Role" Table
Signed-off-by: DarthBlair <Marcel.Bassuener@googlemail.com>
Co-authored-by: Shengwen Yu <yshengwen@vmware.com>
fix: fix cache layer issues (#16995,#16997,#16996,#17038)
1. Load config and initialize cache layer in jobservice(for GC)
2. Cache artifact by digest the key should contains repository name
3. Repository cache cleanup error when update
4. Skip save cache when request ctx in transaction
Signed-off-by: chlins <chenyuzh@vmware.com>
Fixes#16269, exclude the admin account by default
Add excludeDefaultAdmin method -- exclude default admin by option
Update authModeCanBeModified method -- the user count should be 0 without admin
Signed-off-by: stonezdj <stonezdj@gmail.com>
If the artifact has more than one signaure, it will currently copy the last one. After the fix, all accessories can be copied to the target project.
Signed-off-by: wang yan <wangyan@vmware.com>
Attach labels for replication event, list labels by artifact ID so for
event-based replication rule filter by label can work as expect.
Closes: #17014
Signed-off-by: chlins <chenyuzh@vmware.com>
Scheduling of system artifact depends on the jobservice, where gorountine is used to avoid the circular dependencies between core and jobservice.
Signed-off-by: Wang Yan <wangyan@vmware.com>
Unify the process of jobservice execution/task retrieve and update
Change regular expression in robot account
Signed-off-by: stonezdj <stonezdj@gmail.com>
Fix azurecr use ACR token failed to list tags, the root cause is the
scope action of acr token is 'metadata_read' not 'pull' when list v2
tags API.
Signed-off-by: chlins <chenyuzh@vmware.com>
fix(swagger): append scan report version 1.1 to swagger docs default value
The default value of swagger header X-Accept-Vulnerabilities should contains
scan report version 1.0 and 1.1.
Signed-off-by: chlins <chenyuzh@vmware.com>
The tag/lable filter only works on the subject manifest, and if the subject manifest is mathed, all the accessories are marked as matched.
Signed-off-by: Wang Yan <wangyan@vmware.com>
* Add date/time format setting in portal
Currently, the format used for rendering dates and times is derived from the language/locale selected by the user. The formats used in the en-US locale ("English" in Harbor's GUI) are ambiguous and hard to understand for many users.
For example, is 10/11/21 the 10th of November, 2021, the 11th of October, 2021, or even something else like the 21nd of November, 2010? Even if one does know how to interpret it in theory, such dates are essentially enciphered and must be mentally deciphered by the user every time, incurring unnecessary cognitive load.
Similarly, many users are used to the 24-hour clock rather than the 12-hour clock (AM/PM), and so on.
This PR adds a dropdown next to the existing language selector that lets the user choose between the default format for the current locale and the internationally standardized, unambiguous ISO 8601 format. For example, when viewing a list of resources, the ISO 8601 option makes points in time display as
> 2021-10-11, 13:37
instead of
> 10/11/21, 1:37 PM
thereby improving the user experience considerably for users not familiar with the US date/time format (or, in general, the default format for the locale they have selected).
The localized versions of the "Default" label are copied from `SCANNER.DEFAULT` in each locale.
Signed-off-by: Simon Alling <alling.simon@gmail.com>
* Fix indentation
Signed-off-by: Simon Alling <alling.simon@gmail.com>
* Remove redundant localStorage existence check
Signed-off-by: Simon Alling <alling.simon@gmail.com>
* Run 'npm run lint -- --fix'
Implement cache layer for resource manifest, it will read manifest
from cache instead of proxying to distribution if enabled.
Signed-off-by: chlins <chenyuzh@vmware.com>
Signed-off-by: yminer <yminer@vmmware.com>
test ut_install.sh
Signed-off-by: yminer <yminer@vmmware.com>
test ut_install.sh001
Signed-off-by: yminer <yminer@vmmware.com>
test ut_install002
Signed-off-by: yminer <yminer@vmmware.com>
use curl binary to download golangcilint instead of go get
Signed-off-by: yminer <yminer@vmmware.com>
test ut-ci make lint
Signed-off-by: yminer <yminer@vmmware.com>
check ci GO111MODULE
Signed-off-by: yminer <yminer@vmmware.com>
test ci go env
Signed-off-by: yminer <yminer@vmmware.com>
test ci goenv 002
Signed-off-by: yminer <yminer@vmmware.com>
test ci GO111MODULE=auto
Signed-off-by: yminer <yminer@vmmware.com>
ci test entire ut_install.sh
Signed-off-by: yminer <yminer@vmmware.com>
remove needless debug comment
Signed-off-by: yminer <yminer@vmmware.com>
Co-authored-by: yminer <yminer@vmmware.com>
This PR fixes all lint errors reported by TSLint (`npm run lint` in `src/portal/`).
TSLint also reports multiple warnings (see #16798), but this PR doesn't fix any of them.
Signed-off-by: Simon Alling <alling.simon@gmail.com>
* Refactor portal language code
This PR makes the following improvements:
* The language code is DRYed up by defining `supportedLangs` in terms of `LANGUAGES` (previously `languageNames`).
* The language selection dropdown code is DRYed up similarly.
* The Angular locale registration code is DRYed up similarly: the omission of a supported language is now a static type error.
The above improvements mean that it's now impossible to forget to include a supported language in any of those contexts.
Furthermore:
* The type of supported languages is replaced by a more accurate one than `string`, namely `SupportedLanguage`.
* The value acquired from localStorage will never be used unless it is in fact a supported language. (Today, the GUI breaks pretty badly and errors are spammed in the console if localStorage contains an invalid value.)
* Redundant implicit existence checks such as `localStorage &&` and `browserCultureLang &&` are removed.
* The implementation of `initLangauge` is generally simplified and clarified.
Signed-off-by: Simon Alling <alling.simon@gmail.com>
* Restore accidentally deleted date check
Signed-off-by: Simon Alling <alling.simon@gmail.com>
Implement cache layer for resource artifact and define common
cache manager and workflow. Also add cache related options to
configuration yaml.
Signed-off-by: chlins <chenyuzh@vmware.com>