Commit Graph

1721 Commits

Author SHA1 Message Date
Petar Maymounkov
8794928c31
add remote pinning policy for mfs (#7798)
* remote pinning service MFS policy
* update go-ipfs-config
* hardening secret sanitization in `ipfs config` commands

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-01-28 18:58:44 -05:00
Andrew Gillis
6f6f04543b
Improve error message when running key command that locks repo (#7821)
* Improve error message when running key commands that must be run when the daemon is not already running

Fixes Issue #7814

`ipfs key export` now does a PreRun check like `ipfs key rotate` was to give a better error to the user then "someone else has the lock" in the event that the daemon is running while trying to execute these offline-only commands.

While unlikely the "someone else has the lock" error can still be shown if two processes try and grab the repo lock at the same time.

This PreRun function is also exported so it can be used by `ipfs init` where it was originally copied from.

* Added more `ipfs key` command tests

When daemon is running:
- Test that import works
- Test that export fails
- Test that rotate fails
2021-01-28 15:15:49 -05:00
Adin Schmahmann
e0d484431a test: add sharness tests for remote pinning service endpoints that are not http(s) URIs 2021-01-27 19:28:58 -05:00
Adin Schmahmann
7588a6a52a
Merge pull request #7829 from ipfs/fix/pin-remote-service-ls-json
fix: remote services ls always return a list
2021-01-14 17:37:40 -05:00
Marcin Rataj
216b858f8a
test: JSON response on empty remote service ls 2021-01-14 21:07:23 +01:00
Marcin Rataj
cdad39479c test: sharness for ?uri= router
Additional tests to ensure there are no regressions, as this will be
used by browser vendors in the future.
2021-01-14 20:53:17 +01:00
Adin Schmahmann
4ccb526b94
Merge pull request #7847 from ipfs/fix/dnslink-in-subdomain-gw
feat(gw): DNSLink names on https:// subdomains
2021-01-14 14:50:04 -05:00
Marcin Rataj
09178aa717
feat(gw): support inlined DNSLink names with TLS
Problem statement and rationale for doing this can be found under
"Option C" at: https://github.com/ipfs/in-web-browsers/issues/169

TLDR is:

`https://dweb.link/ipns/my.v-long.example.com` can be loaded from a
subdomain gateway with a wildcard TLS cert if represented as a single
DNS label: `https://my-v--long-example-com.ipns.dweb.link`
2021-01-01 21:39:42 +01:00
gammazero
e777adf04d Test ls and add with escaped character 2020-12-17 19:32:03 -08:00
Petar Maymounkov
a8c7980721
add remote pinning to ipfs command (#7661)
Added support for remote pinning services

A pinning service is a service that accepts CIDs from a user in order to host the data associated with them.
The spec for these services is defined at https://github.com/ipfs/pinning-services-api-spec

Support is available via the `ipfs pin remote` CLI and the corresponding HTTP API

Co-authored-by: Petar Maymounkov <petarm@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2020-12-08 20:32:33 -05:00
Adin Schmahmann
76f3395ee6 p2p-proxy: earlier peerID validation check 2020-12-01 12:24:18 -05:00
Steven Allen
7a50636f9a fix: return an error when an unknown object type is passed
fixes #7785
2020-11-30 17:59:37 -08:00
Adin Schmahmann
499e011df9
Merge pull request #7699 from ipfs/fix/dnslink-dir-listing
fix(dnslink-gw): breadcrumbs and CID column when dir listing
2020-11-10 15:03:36 -05:00
Adin Schmahmann
0700c74bad
Merge pull request #7727 from ipfs/fix/preserver-query-on-website-redirect
fix(gw): preserve query on website redirect
2020-11-10 14:36:11 -05:00
Marcin Rataj
d1c20bdff7
fix: localhost API access via ipv6
This adds localhost ipv6 addresses to the allowlist for use in browser
context and fixes WebUI on ipv6-only deployments: http://[::1]:5001/webui

We were missing CORS/Origin tests for API port so I've added basic ones
and included localhost/127.0.0.1/::1 variants.
2020-10-20 00:46:40 +02:00
Marcin Rataj
6ffd0aa22e
fix(gw): preserve query on website redirect 2020-10-14 00:46:57 +02:00
Marcin Rataj
4deaf050d7
chore: dir-index-html 1.2.1
release notes:
https://github.com/ipfs/dir-index-html/releases/tag/1.2.1
2020-09-29 02:40:49 +02:00
Marcin Rataj
3ed46d995f
test(gw): add t0115-gateway-dir-listing.sh to sharness
This adds proper end-to-end tests for directory listing on Gateway port
that protects us against regressions oni each gw type:
- path gateway
- subdomain gateway
- dnslink website gateway

Tests cover:
- etag/unicode support
- breadcrumbs
- file name column
- hash column
2020-09-29 02:27:28 +02:00
Marcin Rataj
19ec5f4a51
feat(gateway): Content-Disposition for legacy clients
This adds ASCII-only filename for clients that do not implement RFC 5987

Closes #7648
2020-09-16 22:39:04 +02:00
Marcin Rataj
fd01acdfc0
feat(gateway): ?filename with download=true
This implements 'attachment' mode triggered then
?filename parameter is accompanied with &download=true

When Content-Disposition: attachment is detected by a modern browser
it will skip rendering and immediately open the "save as" dialog,
making this useful feature for using IPFS gateway as target of
"Download" links on various websites.

Parameter name was suggested in:
https://github.com/ipfs/go-ipfs/pull/4177#issuecomment-414870327
2020-09-16 22:15:18 +02:00
Adin Schmahmann
2ecde1a18c chore: update dht and kbucket 2020-08-25 21:13:18 -04:00
Adin Schmahmann
aedd6f0431 sharness: switch p2p dnsaddr that was supposed to have only a single address in it to use a specific example 2020-08-24 19:11:01 -04:00
Jacob Heun
edfd3c9743
test: add rotate self test 2020-08-21 20:08:24 +02:00
Marcin Rataj
887de89cac test(gateway): breadcrumb links in dir listing
This adds subdomain tests for breadcrumbs added in:
https://github.com/ipfs/go-ipfs/pull/7536

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2020-08-19 20:31:23 -04:00
Kevin Neaton
2feff33235 test: update gateway tests for dir-index-html v1.1.0 2020-08-19 20:31:23 -04:00
Adin Schmahmann
2d0cca800c
Merge pull request #7579 from ipfs/petar/ed25519-default
use ed25519 keys by default
2020-08-19 19:19:39 -04:00
Petar Maymounkov
ece0cda10d switch ipfs init default key 2020-08-19 08:31:44 -07:00
Adin Schmahmann
0c57e9dcf8
Merge pull request #7319 from MichaelMure/wildcard-gateways
feat: wildcard support for public gateways
2020-08-19 11:02:28 -04:00
Adin Schmahmann
40738e4fec
Merge pull request #7598 from ipfs/chore/bump-graphsync-dep
Upgrade graphsync deps
2020-08-18 19:53:52 -04:00
Petar Maymounkov
b4ad66eda4 add --ipns-base to publish and subs commands
add sharness tests for --ipns-base in name publish and subs commands
2020-08-17 21:43:02 -07:00
Petar Maymounkov
3e25355eeb fix keystore sharness default case 2020-08-17 21:43:01 -07:00
Petar Maymounkov
2b013a1ac5 use standard multibase format labels 2020-08-17 21:43:01 -07:00
Petar Maymounkov
23a26c05d3 rename -f to --ipns-base 2020-08-17 21:43:01 -07:00
Petar Maymounkov
80e859ef6f add format flag to key rename and remove, defaulting to b36cid; update sharness 2020-08-17 21:43:01 -07:00
Petar Maymounkov
a7629a27c0 fix rotate sharness 2020-08-17 21:43:01 -07:00
Petar Maymounkov
3cbe111b2d use b36 keys by default for keys and IPNS 2020-08-17 21:43:01 -07:00
Adin Schmahmann
8ae5aa56d1
add ipfs dag stat command (#7553)
* commands: add ipfs dag stat command
* sharness: add ipfs dag stat tests
2020-08-17 14:29:36 -04:00
Adin Schmahmann
992e4a71ca
Merge pull request #7599 from ipfs/feat/move-key-rotate
Move key rotation command to ipfs key rotate
2020-08-17 13:14:03 -04:00
Adin Schmahmann
08913c70ad feat: disable secio by default 2020-08-17 08:16:54 -04:00
Adin Schmahmann
eb66461333 switch ipfs key rotate flags to use the same ones as ipfs key gen 2020-08-17 07:26:47 -04:00
Adin Schmahmann
0f658484d1 move key rotation command to ipfs key rotate 2020-08-17 07:26:47 -04:00
Peter Rabbitson
90a573354a Upgrade graphsync deps 2020-08-17 12:23:59 +02:00
Steven Allen
c07b6fb1d1 feat: nice errors when failing to load plugins
partially fixes #7305
2020-08-08 22:53:18 -04:00
Marcin Rataj
2ff6f1a80d
test(gateway): IPNS cleanup and implicit defaults fix
This ensures implicit defaults are always present, even when
Gateway.PublicGateways is defined in the config.

User still can disable them, but needs to do it per hostname.

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2020-08-06 14:00:16 +02:00
Adin Schmahmann
dff0c47050 improve keystore sharness tests 2020-08-04 11:28:40 -04:00
Petar Maymounkov
e384b5964a IPNS format keys in b36cid 2020-08-04 00:18:29 -04:00
Adin Schmahmann
dfb8141d2f
Merge pull request #7546 from rendaw/master
Key import and export cli commands
2020-08-03 17:51:04 -04:00
Adin Schmahmann
fab3a3578d ipfs key export output keys with .key extension by default 2020-08-03 17:28:55 -04:00
Adin Schmahmann
7f15be2ae5 switch ipfs key import/export to use files instead of strings 2020-08-03 16:27:12 -04:00
rendaw
356ca3aefa
Remove export option from generate 2020-08-01 10:45:38 +09:00