1
0
mirror of https://github.com/minio/mc.git synced 2025-11-29 19:43:09 +03:00
Commit Graph

261 Commits

Author SHA1 Message Date
Harshavardhana
bb4ff4951a when --no-list is specified avoid every List() call (#5082) 2024-11-17 11:35:25 -08:00
Klaus Post
6ac18619cf Only warn if less than 28 days to cert expires (#5077)
Fixes #5076 as much as reasonable.
2024-11-05 03:29:45 -08:00
Klaus Post
be874766a7 Add --checksum param to pipe, put, cp, mirror (#5043)
Add checksums to pipe, cp, mirror commands.

> Add checksum to uploaded object. Values: MD5, CRC32, CRC32C, SHA1 or SHA256. Requires server trailing headers support like AWS, MinIO and possibly others.

`--md5` is hidden, but still applied.

Uploads to buckets with object locking will still use MD5.

Bonus: `mc stat` shows checksum information.
2024-09-24 08:25:16 -07:00
Harshavardhana
2e10255b6d allow cat to take part by part numbers (#5026) 2024-08-26 01:48:58 -07:00
Mark Theunissen
efa1b396f2 Add commands for managing Bucket CORS (#5019) 2024-08-22 08:46:05 -07:00
jiuker
690f3f8bb3 fix: Use TLS for STS endpoint when STS endpoint uses https scheme. (#5022) 2024-08-17 15:15:59 -07:00
Harshavardhana
32b7b72193 conditionally disallow list() when object does not exist (#5016)
allow users to avoid list() call when an object does not
exist when following flags are used with `mc stat`

```
--no-list (HEAD the latest version)
--version-id <vid>
```

Also avoid superflous url2Stat() calls while processing
the args, there is no real reason to do that.
2024-08-12 01:52:27 -07:00
Andreas Auernhammer
58f15fca83 add global --resolve HOST[:PORT]=IP flag (#5013)
add global `--resolve HOST[:PORT]:IP` flag

This commit adds support for custom DNS overwrites via one or multiple
`--resolve` flags. It allows `mc` users to define custom DNS mappings
from a HOST (and optional port) to an IP address.

For example:
```
mc --resolve foo.com:9000=10.1.2.3 ls myminio/mybucket
```
The `--resolve` syntax is taken from cURL. Ref. `curl --help dns`

Use cases:

  1. DNS overwrites. If there are no DNS resolvers available, e.g.
     due to a temp. outage, this allows `mc` to connect to a defined
     alias as long as the IP of the one or multiple cluster nodes are
     known. It also allows `mc` to overwrite the current DNS responses.
     This is useful for various tests in dev and staging environments.
  2. TLS certificate verification. Often TLS certificates are issued
     for some DNS names (via SAN) but not for IP addresses. IP addresses
     are usually not static and might change anytime. Accessing a MinIO
     cluster that serves a certificate containing only DNS SANs via an
     IP address results in a TLS certificate verification error - even
     if the certificate is issued by a trusted CA. The current workaround
     is the `--insecure` flag which disables TLS certification completely.

Example for TLS verification:

```
$ mc alias set 'myminio' 'https://192.168.188.118:9000' 'minioadmin' 'minioadmin'
mc: <ERROR> Unable to initialize new alias from the provided credentials.
Get "https://192.168.188.118:9000": tls: failed to verify certificate:
x509: cannot validate certificate for 192.168.188.118 because it doesn't contain any IP SANs.
```

```
mc alias set --resolve foo.com:9000=192.168.188.118 'myminio' 'https://foo.com:9000' 'minioadmin' 'minioadmin'
Added `myminio` successfully.
```

Signed-off-by: Andreas Auernhammer <github@aead.dev>
2024-08-08 17:46:03 -07:00
Anis Eleuch
ded36374e8 Show a warning when the server certificate duration is expiring soon (#4989)
When 90% of the validity time of a server is elapsed, print a warning
reminding the user to change the certificate.
2024-07-18 09:08:07 -07:00
Harshavardhana
8876275c07 list versions including DEL marker when figuring out Stat() (#4951)
this is needed to avoid an inconsistent behavior when an
object exists v/s DEL marker or FreeVersion exists.
2024-06-19 22:57:53 -07:00
Harshavardhana
a289dae750 fix: support 'mc put --if-not-exists' (#4963)
Also allow 'mc get --version-id'
2024-06-18 14:15:26 -07:00
jiuker
3774027cea fix: avoid HeadObject call for mc get (#4947) 2024-05-31 07:53:51 -07:00
Aditya Manthramurthy
d4b7b00d73 Bump up minio/pkg to v3 (#4940) 2024-05-23 00:59:47 -07:00
Harshavardhana
b317d0d63d fix: honor S3v2 if configured (#4917)
fixes #4915

A regression was introduced in #4755, we hardly test
with v2 anymore so this has never been covered.
2024-05-03 04:17:42 -07:00
Sveinn
fe58afcd39 Large MC Update (new encryption flags, functional test suite, removal of session code, minor cleanup, vuln. updates ) (#4882) 2024-04-15 08:10:25 -07:00
Harshavardhana
98af07b69c bring back the original progress bar (#4866)
also cleanup 'mc put/get' behavior
2024-03-02 16:13:08 -08:00
jiuker
1e69c2aadd feat: add put action (#4839) 2024-02-19 22:36:31 -08:00
Harshavardhana
f5f7147b9e do not auto-decompress objects with content-encoding (#4777)
fixes #4769
2023-12-01 18:03:28 -08:00
Harshavardhana
2178568417 make STS support for 'mc' alias specific (#4771)
currently STS specific behavior is global,
`mc` however supports multiple aliases - we
need to make sure that `mc` treats this ENV
specific to an alias.
2023-11-26 01:35:13 -08:00
Harshavardhana
4724c024c6 support missing role-arn and role-session-name (#4763) 2023-11-15 14:45:58 -08:00
Pedro Juarez
6c9cdc27bc Refactor methods that initialize client to reuse code blocks (#4755) 2023-11-15 13:20:52 -08:00
Pedro Juarez
b1d4341fcb add STS support for mc admin command (#4754) 2023-11-11 23:08:33 -08:00
Daniel Valdivia
011c61b254 Add support for STS credentials (#4744) 2023-11-05 20:19:23 -08:00
Aditya Manthramurthy
e2056fb057 Update to minio/pkg v2 (#4674) 2023-09-02 14:28:03 -07:00
Poorna
5a5a9973c3 Change replicate status metrics to show additional info (#4582)
in `mc replicate status` for bucket replication
and `mc admin replicate status` for site replication.
2023-08-30 01:02:26 -07:00
Harshavardhana
9da0b405db support all scanner events to be reported for excessive versions (#4672) 2023-08-29 15:55:06 -07:00
Harshavardhana
1fbd97aa04 run gofumpt -extra on all source files (#4634) 2023-07-17 13:10:20 -07:00
Krishnan Parthasarathi
68a3d5adec Add updatedAt for ilm-rule-ls (#4579) 2023-05-26 09:37:48 -07:00
Anis Eleuch
5a0d5116f4 mirror: Fix removal of FS target without a trailing slash (#4560) 2023-05-04 11:10:16 -07:00
Anis Eleuch
50f11d8248 stat: fix printing bucket usage info (#4542) 2023-04-10 09:32:41 -07:00
Klaus Post
36aa65b791 Add metadata and tags to mc find (#4531) 2023-04-08 09:43:27 -07:00
Anis Eleuch
81453d7c8f stat: Fix output when stat a prefix which has other prefixes (#4501) 2023-03-23 13:03:04 -07:00
Harshavardhana
8d6afee8fc honor context cancellation on long-running lists (#4519) 2023-03-23 12:44:45 -07:00
Harshavardhana
252421354c update functional tests for admin_users with 'policy commands' (#4508) 2023-03-19 20:49:16 -07:00
Harshavardhana
fbef5dd7f0 support concurrent uploads for 'mc pipe' (#4435) 2023-01-06 12:17:45 -08:00
Anis Elleuch
62d07d5ea1 Stat: Do not append a slash when --rewind is specified (#4396) 2022-12-09 02:34:53 -08:00
Harshavardhana
dbc1f6ada0 add support for upload/download limits (#4388) 2022-12-06 14:39:16 -08:00
Klaus Post
52a931bfa7 Add staticcheck to CI (#4386) 2022-12-05 08:32:04 -08:00
Vladimir Garvardt
9fb024f8ec Use NewArnFromString when parsing user-provided ARN string (#4378) 2022-12-01 07:55:07 -08:00
Anis Elleuch
89b53a7e52 ls: Fix listing versions when the system clock is off (#4370) 2022-11-15 07:55:05 -08:00
adfost
fd7142e223 update license headers to 2022 (#4360) 2022-11-14 18:38:39 -08:00
Anis Elleuch
b5ee028536 fix: stat command with a directory marker (#4341) 2022-11-01 14:09:57 -07:00
Taran Pelkey
68a36788aa Add od command (#4180) 2022-08-22 22:02:23 -07:00
Anis Elleuch
4e42a9e3eb rb: Better error message when the user passes an object name (#4183)
The new error message is:
```
$ mc rb --force play/testbucket/dir/
mc: <ERROR> Failed to remove `play/testbucket/dir/`. Bucket name `testbucket/dir/` not valid.
```
2022-08-03 08:43:41 -07:00
Anis Elleuch
624e3c1606 Remove isURLPrefixExists() call (#4173)
isURLPrefixExists() is used after url2Stat() function to check if the
given aliased URL corresponds to an existing prefix in the server. However,
 url2Stat() is already doing that and returns valid information for
those prefixes.

Removing isURLPrefixExists() all together.
2022-07-29 10:43:20 -07:00
Harshavardhana
c7570bd54a introduce net.Conn deadlines to avoid hung connections (#4164)
fixes #4133
2022-07-27 08:21:05 -07:00
Klaus Post
cb7f9b6db2 Add mc cat --tail and --offset (#4149)
Allow range requests for cat operations, either specifying tail or an absolute offset.

If tail is longer then fail, the entire file is listed.
2022-07-18 21:22:10 -07:00
Harshavardhana
6e2ed46cb4 add hidden force-delete option (#4097) 2022-05-30 12:51:43 -07:00
Krishnan Parthasarathi
b5a0640899 Prefix version suspension (#4064) 2022-05-08 18:15:17 -07:00
Anis Elleuch
19952de324 Fix client-s3 Stat() for prefix with parallel lower prefixes (#4069)
client-s3.Stat() does not properly detect a prefix when there is another
lower one,

e.g: Stat() of 'dir/' fails when there is 'dir-name/' in the same parent
prefix.
2022-04-28 12:50:01 -07:00