Compare commits

...

6 Commits

Author SHA1 Message Date
Cesar N
6625d54d67 Release v1.3.0 (#3313) 2024-04-24 18:15:13 -07:00
Cesar N
ee6d1ed586 Upgrade superagent package to fix vulnerability (#3314) 2024-04-24 17:27:42 -07:00
Cesar N
6de1d88e11 Use url-safe base64 encoding for download-shared-object api (#3305) 2024-04-23 08:36:30 -07:00
jinapurapu
de19b6f17b Make prefix field optional for adding tier (#3301) 2024-04-18 23:51:13 -06:00
jinapurapu
226a90be1d Adds ExpireDeleteMarker status to bucketLifecycleRule UI display (#3302) 2024-04-18 18:36:00 -06:00
Prakash Senthil Vel
6cfb6ff06a add user agent in admin client to display console in audit logs (#3297) 2024-04-17 10:49:15 -06:00
19 changed files with 88 additions and 69 deletions

View File

@@ -2,6 +2,19 @@
# Changelog
## Release v1.3.0
Features:
- Adds ExpireDeleteMarker status to BucketLifecycleRule UI
Bug Fix:
- Fixed vulnerability
- Used URL-safe base64 enconding for Share API
- Made Prefix field optional when Adding Tier
- Added Console user agent in MinIO Admin Client
## Release v1.2.0
Features:
@@ -64,7 +77,7 @@ Deprecated:
Features:
- Updated tines on menus & pages
- Updated tines on menus & pages
Bug Fix:

View File

@@ -27,6 +27,8 @@ import (
"strings"
"time"
"github.com/minio/console/pkg"
"github.com/minio/console/pkg/utils"
"github.com/minio/console/models"
@@ -449,6 +451,7 @@ func NewMinioAdminClient(ctx context.Context, sessionClaims *models.Principal) (
if err != nil {
return nil, err
}
adminClient.SetAppInfo(globalAppName, pkg.Version)
return adminClient, nil
}
@@ -464,6 +467,7 @@ func newAdminFromClaims(claims *models.Principal, clientIP string) (*madmin.Admi
if err != nil {
return nil, err
}
adminClient.SetAppInfo(globalAppName, pkg.Version)
adminClient.SetCustomTransport(GetConsoleHTTPClient(getMinIOServer(), clientIP).Transport)
return adminClient, nil
}
@@ -477,7 +481,7 @@ func newAdminFromCreds(accessKey, secretKey, endpoint string, tlsEnabled bool) (
if err != nil {
return nil, err
}
minioClient.SetAppInfo(globalAppName, pkg.Version)
return minioClient, nil
}

View File

@@ -1100,7 +1100,7 @@ func getShareObjectURL(ctx context.Context, client MCClient, r *http.Request, ve
return nil, pErr.Cause
}
encodedMinIOURL := b64.StdEncoding.EncodeToString([]byte(minioURL))
encodedMinIOURL := b64.URLEncoding.EncodeToString([]byte(minioURL))
requestURL := getRequestURLWithScheme(r)
objURL := fmt.Sprintf("%s/api/v1/download-shared-object/%s", requestURL, encodedMinIOURL)
return &objURL, nil

View File

@@ -927,7 +927,7 @@ func Test_shareObject(t *testing.T) {
expected string
}{
{
test: "Get share object url",
test: "return sharefunc url base64 encoded with host name",
args: args{
r: &http.Request{
TLS: nil,
@@ -944,7 +944,7 @@ func Test_shareObject(t *testing.T) {
expected: "http://localhost:9090/api/v1/download-shared-object/aHR0cDovL3NvbWV1cmw=",
},
{
test: "URL with TLS uses https scheme",
test: "return https scheme if url uses TLS",
args: args{
r: &http.Request{
TLS: &tls.ConnectionState{},
@@ -961,7 +961,7 @@ func Test_shareObject(t *testing.T) {
expected: "https://localhost:9090/api/v1/download-shared-object/aHR0cDovL3NvbWV1cmw=",
},
{
test: "handle invalid expire duration",
test: "returns invalid expire duration if expiration is invalid",
args: args{
r: &http.Request{
TLS: nil,
@@ -976,7 +976,7 @@ func Test_shareObject(t *testing.T) {
wantError: errors.New("time: invalid duration \"invalid\""),
},
{
test: "handle empty expire duration",
test: "add default expiration if expiration is empty",
args: args{
r: &http.Request{
TLS: nil,
@@ -992,7 +992,7 @@ func Test_shareObject(t *testing.T) {
expected: "http://localhost:9090/api/v1/download-shared-object/aHR0cDovL3NvbWV1cmw=",
},
{
test: "handle error on share func",
test: "return error if sharefunc returns error",
args: args{
r: &http.Request{
TLS: nil,
@@ -1006,6 +1006,23 @@ func Test_shareObject(t *testing.T) {
},
wantError: errors.New("probe error"),
},
{
test: "return shareFunc url base64 encoded url-safe",
args: args{
r: &http.Request{
TLS: nil,
Host: "localhost:9090",
},
versionID: "2121434",
expires: "3h",
shareFunc: func(_ context.Context, _ string, _ time.Duration) (string, *probe.Error) {
// https://127.0.0.1:9000/cestest/Audio%20icon.svg?X-Amz-Algorithm=AWS4-HMAC-SHA256 using StdEncoding adds an extra `/` making it not url safe
return "https://127.0.0.1:9000/cestest/Audio%20icon.svg?X-Amz-Algorithm=AWS4-HMAC-SHA256", nil
},
},
wantError: nil,
expected: "http://localhost:9090/api/v1/download-shared-object/aHR0cHM6Ly8xMjcuMC4wLjE6OTAwMC9jZXN0ZXN0L0F1ZGlvJTIwaWNvbi5zdmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTY=",
},
}
for _, tt := range tests {

View File

@@ -1,7 +1,7 @@
{
"files": {
"main.css": "./static/css/main.e60e4760.css",
"main.js": "./static/js/main.6d775e33.js",
"main.js": "./static/js/main.cbc16c2b.js",
"static/js/5301.2c626a41.chunk.js": "./static/js/5301.2c626a41.chunk.js",
"static/js/9361.3fc638a6.chunk.js": "./static/js/9361.3fc638a6.chunk.js",
"static/js/843.8502a4fd.chunk.js": "./static/js/843.8502a4fd.chunk.js",
@@ -12,7 +12,7 @@
"static/js/2033.a09fb9da.chunk.js": "./static/js/2033.a09fb9da.chunk.js",
"static/js/8821.44b4fe0f.chunk.js": "./static/js/8821.44b4fe0f.chunk.js",
"static/js/9987.15024980.chunk.js": "./static/js/9987.15024980.chunk.js",
"static/js/689.d9f80e6e.chunk.js": "./static/js/689.d9f80e6e.chunk.js",
"static/js/689.5e705237.chunk.js": "./static/js/689.5e705237.chunk.js",
"static/js/6164.993b302b.chunk.js": "./static/js/6164.993b302b.chunk.js",
"static/js/2372.aaeaeefa.chunk.js": "./static/js/2372.aaeaeefa.chunk.js",
"static/js/1324.beff0285.chunk.js": "./static/js/1324.beff0285.chunk.js",
@@ -72,7 +72,7 @@
"static/js/12.ab9b7ed0.chunk.js": "./static/js/12.ab9b7ed0.chunk.js",
"static/js/8010.8ce54818.chunk.js": "./static/js/8010.8ce54818.chunk.js",
"static/js/2689.5e76c1cd.chunk.js": "./static/js/2689.5e76c1cd.chunk.js",
"static/js/872.aa8f9f90.chunk.js": "./static/js/872.aa8f9f90.chunk.js",
"static/js/872.6f58df17.chunk.js": "./static/js/872.6f58df17.chunk.js",
"static/js/4676.578844c1.chunk.js": "./static/js/4676.578844c1.chunk.js",
"static/js/8825.e5adf924.chunk.js": "./static/js/8825.e5adf924.chunk.js",
"static/js/614.f6cdf349.chunk.js": "./static/js/614.f6cdf349.chunk.js",
@@ -119,7 +119,7 @@
"static/media/placeholderimage.png": "./static/media/placeholderimage.077ea48bd1ef1f4a883f.png",
"index.html": "./index.html",
"main.e60e4760.css.map": "./static/css/main.e60e4760.css.map",
"main.6d775e33.js.map": "./static/js/main.6d775e33.js.map",
"main.cbc16c2b.js.map": "./static/js/main.cbc16c2b.js.map",
"5301.2c626a41.chunk.js.map": "./static/js/5301.2c626a41.chunk.js.map",
"9361.3fc638a6.chunk.js.map": "./static/js/9361.3fc638a6.chunk.js.map",
"843.8502a4fd.chunk.js.map": "./static/js/843.8502a4fd.chunk.js.map",
@@ -130,7 +130,7 @@
"2033.a09fb9da.chunk.js.map": "./static/js/2033.a09fb9da.chunk.js.map",
"8821.44b4fe0f.chunk.js.map": "./static/js/8821.44b4fe0f.chunk.js.map",
"9987.15024980.chunk.js.map": "./static/js/9987.15024980.chunk.js.map",
"689.d9f80e6e.chunk.js.map": "./static/js/689.d9f80e6e.chunk.js.map",
"689.5e705237.chunk.js.map": "./static/js/689.5e705237.chunk.js.map",
"6164.993b302b.chunk.js.map": "./static/js/6164.993b302b.chunk.js.map",
"2372.aaeaeefa.chunk.js.map": "./static/js/2372.aaeaeefa.chunk.js.map",
"1324.beff0285.chunk.js.map": "./static/js/1324.beff0285.chunk.js.map",
@@ -190,7 +190,7 @@
"12.ab9b7ed0.chunk.js.map": "./static/js/12.ab9b7ed0.chunk.js.map",
"8010.8ce54818.chunk.js.map": "./static/js/8010.8ce54818.chunk.js.map",
"2689.5e76c1cd.chunk.js.map": "./static/js/2689.5e76c1cd.chunk.js.map",
"872.aa8f9f90.chunk.js.map": "./static/js/872.aa8f9f90.chunk.js.map",
"872.6f58df17.chunk.js.map": "./static/js/872.6f58df17.chunk.js.map",
"4676.578844c1.chunk.js.map": "./static/js/4676.578844c1.chunk.js.map",
"8825.e5adf924.chunk.js.map": "./static/js/8825.e5adf924.chunk.js.map",
"614.f6cdf349.chunk.js.map": "./static/js/614.f6cdf349.chunk.js.map",
@@ -217,6 +217,6 @@
},
"entrypoints": [
"static/css/main.e60e4760.css",
"static/js/main.6d775e33.js"
"static/js/main.cbc16c2b.js"
]
}

View File

@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="/"/><meta content="width=device-width,initial-scale=1" name="viewport"/><meta content="#081C42" media="(prefers-color-scheme: light)" name="theme-color"/><meta content="#081C42" media="(prefers-color-scheme: dark)" name="theme-color"/><meta content="MinIO Console" name="description"/><meta name="minio-license" content="agpl"/><link href="./styles/root-styles.css" rel="stylesheet"/><link href="./apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180"/><link href="./favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/><link href="./favicon-96x96.png" rel="icon" sizes="96x96" type="image/png"/><link href="./favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/><link href="./manifest.json" rel="manifest"/><link color="#3a4e54" href="./safari-pinned-tab.svg" rel="mask-icon"/><title>MinIO Console</title><script defer="defer" src="./static/js/main.6d775e33.js"></script><link href="./static/css/main.e60e4760.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="preload"><img src="./images/background.svg"/> <img src="./images/background-wave-orig2.svg"/></div><div id="loader-block"><img src="./Loader.svg"/></div></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="/"/><meta content="width=device-width,initial-scale=1" name="viewport"/><meta content="#081C42" media="(prefers-color-scheme: light)" name="theme-color"/><meta content="#081C42" media="(prefers-color-scheme: dark)" name="theme-color"/><meta content="MinIO Console" name="description"/><meta name="minio-license" content="agpl"/><link href="./styles/root-styles.css" rel="stylesheet"/><link href="./apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180"/><link href="./favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/><link href="./favicon-96x96.png" rel="icon" sizes="96x96" type="image/png"/><link href="./favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/><link href="./manifest.json" rel="manifest"/><link color="#3a4e54" href="./safari-pinned-tab.svg" rel="mask-icon"/><title>MinIO Console</title><script defer="defer" src="./static/js/main.cbc16c2b.js"></script><link href="./static/css/main.e60e4760.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="preload"><img src="./images/background.svg"/> <img src="./images/background-wave-orig2.svg"/></div><div id="loader-block"><img src="./Loader.svg"/></div></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -27,7 +27,7 @@
"react-window-infinite-loader": "^1.0.9",
"recharts": "^2.12.4",
"styled-components": "5.3.11",
"superagent": "^8.0.8",
"superagent": "^9.0.1",
"tinycolor2": "^1.6.0"
},
"scripts": {

View File

@@ -188,6 +188,21 @@ const BucketLifecyclePanel = () => {
}
},
},
{
label: "Expire Delete Marker",
elementKey: "expire_delete_marker",
renderFunction: (el: LifeCycleItem) => {
if (!el) {
return <Fragment />;
}
if (el.expiration && el.expiration.delete_marker !== undefined) {
return <span>{el.expiration.delete_marker ? "true" : "false"}</span>;
} else {
return <Fragment />;
}
},
renderFullObject: true,
},
{
label: "Tier",
elementKey: "storage_class",

View File

@@ -202,9 +202,6 @@ const AddTierConfiguration = () => {
if (bucket === "") {
valid = false;
}
if (prefix === "") {
valid = false;
}
if (region === "" && type !== "minio") {
valid = false;
}
@@ -445,7 +442,6 @@ const AddTierConfiguration = () => {
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
setPrefix(e.target.value);
}}
required
/>
<RegionSelectWrapper
onChange={(value) => {

View File

@@ -5890,15 +5890,14 @@ form-data@^4.0.0:
combined-stream "^1.0.8"
mime-types "^2.1.12"
formidable@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/formidable/-/formidable-2.1.2.tgz#fa973a2bec150e4ce7cac15589d7a25fc30ebd89"
integrity sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==
formidable@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/formidable/-/formidable-3.5.1.tgz#9360a23a656f261207868b1484624c4c8d06ee1a"
integrity sha512-WJWKelbRHN41m5dumb0/k8TeAx7Id/y3a+Z7QfhxP/htI9Js5zYaEDtG8uMgG0vM0lOlqnmjE99/kfpOYi/0Og==
dependencies:
dezalgo "^1.0.4"
hexoid "^1.0.0"
once "^1.4.0"
qs "^6.11.0"
forwarded@0.2.0:
version "0.2.0"
@@ -11399,16 +11398,7 @@ string-natural-compare@^3.0.1:
resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4"
integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"
"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -11503,14 +11493,7 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -11610,17 +11593,17 @@ sucrase@^3.32.0:
pirates "^4.0.1"
ts-interface-checker "^0.1.9"
superagent@^8.0.8:
version "8.1.2"
resolved "https://registry.yarnpkg.com/superagent/-/superagent-8.1.2.tgz#03cb7da3ec8b32472c9d20f6c2a57c7f3765f30b"
integrity sha512-6WTxW1EB6yCxV5VFOIPQruWGHqc3yI7hEmZK6h+pyk69Lk/Ut7rLUY6W/ONF2MjBuGjvmMiIpsrVJ2vjrHlslA==
superagent@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/superagent/-/superagent-9.0.1.tgz#660773036c03728a1a88649a5d7e15d89b1d6961"
integrity sha512-CcRSdb/P2oUVaEpQ87w9Obsl+E9FruRd6b2b7LdiBtJoyMr2DQt7a89anAfiX/EL59j9b2CbRFvf2S91DhuCww==
dependencies:
component-emitter "^1.3.0"
cookiejar "^2.1.4"
debug "^4.3.4"
fast-safe-stringify "^2.1.1"
form-data "^4.0.0"
formidable "^2.1.2"
formidable "^3.5.1"
methods "^1.1.2"
mime "2.6.0"
qs "^6.11.0"
@@ -13260,7 +13243,7 @@ workbox-window@6.6.1:
"@types/trusted-types" "^2.0.2"
workbox-core "6.6.1"
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -13278,15 +13261,6 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"
wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"
wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"