Commit Graph

916 Commits

Author SHA1 Message Date
Fang
b54dc7cd34
eyre, zuse: expire channels with their sessions
Associates channels with the authentication sessions that opened them,
and deletes the channel when its associated session expires.

Also updates the debug dashboard to display channel counts per session.
2020-06-05 00:22:39 +02:00
Fang
68491420d2
eyre: refactor %delete to reuse timeout logic
Turns +on-channel-timeout into +discard-channel, which cleans up the
entirety of the channel, based on its current state. This allows us to
simplify the %delete channel request into a simple function call.
2020-06-05 00:20:06 +02:00
Liam Fitzgerald
b553d57c29 eyre: 303 redirect on successful login
Changes the HTTP status code of the redirect that occurs upon a
successful login from 307 to 303. 307 preserves the method of the
original request, so the redirected request is a POST. With the new SPA,
this causes a 404 as app/file-server validates the method of the
request, something that did not happen in earlier versions of landscape.
303 instead changes the method to always produce a GET request.
2020-06-04 15:09:00 +10:00
Fang
a66cfc31da
eyre: fake duct for on-load logout binding
Empty duct is considered not good.
2020-06-03 14:29:13 +02:00
Fang
6e3284feac
eyre: use 303 to redirect to login post-logout
This ensures the client sends a GET request, which is more appropriate.
2020-06-03 14:28:30 +02:00
Ted Blackman
3834860410 clay: state adapter, still needs :goad 2020-06-03 03:00:45 -04:00
Philip Monk
8b78f04dd3
Merge remote-tracking branch 'origin/master' into ford-fusion 2020-06-02 21:50:20 -07:00
Fang
4d93349402
eyre: provide logout endpoint
Set up, by default, on /~/logout.

Sending a POST request to this expires the current session and redirects
to the login page. If the "all" key is set in the request body, expires
all open sessions.
2020-06-03 01:40:32 +02:00
Philip Monk
818d2231f6
ames: remove jumbo packets 2020-06-02 14:13:28 -07:00
Philip Monk
84b8a67e47
clay: handle reefs for non-home desks
We build a reef for each desk but use the compiler from our kernel.  At
some point we should use the compiler from the desk, but then we need to
validate any results we get from it.
2020-06-01 20:52:20 -07:00
Fang
574b05a88a
Merge pull request #2959 from urbit/m/eyre-cookies
eyre: augmented cookie handling
2020-06-01 22:11:57 +02:00
Ted Blackman
b191636276 clay: WIP reef building 2020-06-01 12:56:21 -04:00
Fang
750ff6e5e1
eyre: respect "forwarded" header from localhost
For request transparency, HTTP proxies may set the Forwarded header to
specify who the original requester is.

For requests from localhost only, we make Eyre respect the Forwarded
header, and adjust the handled ip address accordingly.

Note that we do not support X-Forwarded or other non-standard variants.
The header remains in the request, so server applications can handle
them as desired.

Fixes #2723.
2020-05-31 17:45:22 +02:00
Fang
a87000149d
zuse: add parsers for http header field values
Multi-value format as used by some headers.

Also updates pill with recent zuse changes.
2020-05-31 17:45:20 +02:00
Fang
b1daaec7bf
zuse: add parsers for ip addresses
Parses into +address:eyre.
2020-05-31 17:45:18 +02:00
Fang
63c26151a3
eyre: extend session duration on-use
When sending a response to an authenticated request, update the session
to last for +session-timeout again, and send an updated cookie to match.

Assuming the user makes an actual HTTP request at least once a week,
this will make sure they don't get logged out automatically. Simply
keeping a channel open, unfortunately, doesn't count.
2020-05-30 02:29:20 +02:00
Fang
a51d93326a
eyre: clean up old +load code
Removes pre-breach state adapter logic and touches up code style.
2020-05-29 15:33:22 +02:00
Fang
00e3159287
eyre: clear expired sessions/cookies from state
Instead of setting a timer for every session, we set a single expiry
timer when the first session is created. On the subsequent wake event,
we clear all cookies that have expired at that time, then set a timer
for when the next session expires.

This approach gives us flexibility wrt sessions going forward, allowing
extending or early deleting of sessions without having to care about the
related timers.

Note that in +load, we clear all existing sessions. We would start the
expiry timer flow there, but can't. Forcing the user to login again
post-ota once isn't the end of the world.
2020-05-29 15:28:44 +02:00
Philip Monk
18e396cf53
release: urbit-os-v1.0.20
Previous urbit-os-v1.0.20 was not released
2020-05-28 18:43:20 -07:00
Philip Monk
d49e8adc08
Merge remote-tracking branch 'origin/philip/behn-fix' into release/hotfix
behn: fix +unset-timer
2020-05-28 18:37:39 -07:00
Philip Monk
3ab618e234
behn: fix +unset-timer
It was throwing away timers sometimes if you cancelled a timer at the
same date as other timers.
2020-05-28 17:09:25 -07:00
Philip Monk
0cfee46fa8
jael: send breach notifications in order
See #2952 for details
2020-05-28 15:24:19 -07:00
Philip Monk
1be5411c75
jael: don't notify breach on initial update to ship
See #2952 for details
2020-05-28 14:38:07 -07:00
Philip Monk
c20cd29932
jael: look for correct wire
We inspect the wire of our subscriber to see if we need to produce the
result as a %public-keys or a %boon.  This is bad -- we should proxy the
subscription to avoid this need, but this doesn't make that change yet.

%pubs is an old name that doesn't exist anymore (last existed around
September 2019).  The new version is /public-keys, but it's worked so
far because /public-keys has only one item in the path, so it missed the
conditional.  This commit makes the intent more clear.

The [%a @ @ *] could be just [%a @ *], but I leave it to reduce the
chance of breaking stuff.
2020-05-28 14:27:08 -07:00
Philip Monk
0642cc5861
ames: add |ames-wake
Somehow we ended up with flows which expected to awaken but did not wake
up.  This was likely caused by the error in r920j OTA, urbit-os-v1.0.18.

This adds a command which ensures that every flow has an active timer.
I expect this to be needed only once, but it's a pretty general tool, so
it's worth keeping.

I've included an unused @t parameter to more easily add simple debug
commands to ames without having to add a new task
2020-05-28 10:28:31 -07:00
Philip Monk
472ad18c90
behn: already deleted, don't need to do it again 2020-05-27 18:47:50 -07:00
Philip Monk
86fb78d933
Merge remote-tracking branch 'origin/ted/behn-same-date' into release/hotfix 2020-05-27 18:36:10 -07:00
Philip Monk
ff01a1ea04
ames: don't set new timer if we woke up too early
Otherwise if we end up having multple outstanding timers, they never
coalesce to a single timer.
2020-05-27 17:38:18 -07:00
Ted Blackman
8ed07dfc7e behn: fix bug with timers at same date 2020-05-27 02:59:07 -04:00
Fang
36b7fc2e4f
Merge branch 'release/next-sys' into m/debug-dashboard 2020-05-26 20:36:27 +02:00
pkova
28cd252ce7 zuse: improve json to rn parsing
Allow the exponent token to be 'e' or 'E', allow the explicit sign of '+'.
Following the spec at https://json.org. Fixes #2935.
2020-05-26 19:29:24 +03:00
pilfer-pandex
78729f4f87 hoon: better comment for +slab 2020-05-25 22:42:49 -04:00
pilfer-pandex
831206d4fe hoon: comment and syn mod for +slab 2020-05-25 22:35:54 -04:00
Fang
58e85fa661
Merge branch 'release/next-sys' into m/debug-dashboard 2020-05-23 01:00:45 +02:00
Fang
52ef23ccca
eyre, zuse: add scry interfaces for eyre state
Scries for getting out open connections, cookie sessions, and existing
channels.

Moves the involved types from eyre into zuse.
2020-05-22 23:55:17 +02:00
Philip Monk
a4a44f1e21
kiln: cleanup 2020-05-22 14:32:32 -07:00
Philip Monk
096149713a
drum: relink to chat-cli
The subscription changes in drum broke existing subscriptions.  This
worked alright (though loud) for dojo, but it left chat-cli "frozen"
unless you manually unlinked/relinked.  This does that automatically.

It also includes a refactoring of +on-load in drum, to avoid vain
repetition.
2020-05-22 00:17:56 -07:00
Philip Monk
4aff4d74e2
kiln: get updates into %home, remove %base
We need to get updates directly into %home in case the marks depend on
changes to hoon.hoon.  %base has no reason to exist.

Our ota strategy is now to merge from parent/kids to home, then
parent/kids to kids.
2020-05-21 23:45:17 -07:00
Philip Monk
4fcd9f23c0
Merge branch 'release/behn-fast' (#2915)
* release/behn-fast:
  zuse: add +ordered-map
  behn: switch to ordered-map
  chat: virtualize message-to-json conversion
2020-05-21 22:43:53 -07:00
Philip Monk
0e7b07e061
Merge branch 'release/link-dojo' (#2867)
* origin/release/link-dojo:
  chat-cli: allow sending • character
  chat-cli: always talk to local ship only
  chat-cli: single-target sole effects as needed
  chat-cli: don't allow excessively small cli widths
  chat-cli: pull in sole-sur namespace where relevant
  chat-cli: remove unused entropy from state
  chat-cli: print newlines correctly
  chat-cli: support multiple sole connections
  chat-cli: don't crash on %bad-text
  dojo: rename remote access generators
  gall: fix handling of empty path list
  dojo: remove unused %json poke
  dojo: add remote access controls
  drum: switch to per-ship /sole/drum duct

Signed-off-by: Philip Monk <phil@pcmonk.me>
2020-05-21 22:42:18 -07:00
Philip Monk
274215ec6b
zuse: add +ordered-map
At some point this should be more properly styled similar to +by, +in,
and +to, but for now this reduces duplication and makes the ordered map
available to everyone.
2020-05-21 22:28:16 -07:00
pilfer-pandex
90e8c9a2b0 hoon: make +slab respect variance using given mode and return false 2020-05-21 19:38:10 -04:00
pilfer-pandex
7e4c0036f6 hoon: make +slab respect variance (%read) and return false 2020-05-21 19:37:20 -04:00
Fang
4c9d18e5c0
Merge branch 'release/next-sys' into m/debug-dashboard 2020-05-21 20:09:58 +02:00
Philip Monk
8c4c0f31fc
Merge pull request #2920 from urbit/ted/ames-mass-alien
ames: fix %alien |mass over-reporting
2020-05-21 01:40:30 -07:00
Philip Monk
a84b0db733
clay: fix clobbering changes if identical changes 2020-05-21 01:23:04 -07:00
Philip Monk
560e3375f5
clay: drip if foreign desk 2020-05-21 01:10:39 -07:00
Ted Blackman
a0eafa8aa3 zuse,ames: handle %trim task 2020-05-21 03:45:08 -04:00
Ted Blackman
0f7b213f38 ames: fix %alien |mass over-reporting 2020-05-21 03:19:20 -04:00
Ted Blackman
96264f7fa3 eyre: clarify common prints 2020-05-20 04:36:33 -04:00
Ted Blackman
1028e9fd7c hoon,kiln: clean up boot prints; new pill 2020-05-20 04:36:16 -04:00
Ted Blackman
5a1f227622 clay: remove beak from compiler path 2020-05-20 04:25:00 -04:00
Ted Blackman
917c55eaa3 gall: remove pupal queue, molt on any event 2020-05-20 03:30:29 -04:00
Ted Blackman
7e69e66280 ames/zuse: handle %trim event 2020-05-20 03:29:54 -04:00
Philip Monk
56c66be87a
behn: switch to ordered-map 2020-05-19 21:40:39 -07:00
Ted Blackman
044c22357d clay: virtualize +read-at-aeon:ze so failures don't kill event 2020-05-19 20:28:24 -04:00
Philip Monk
aaf7a45e25
arvo: properly print %warn 2020-05-17 02:01:17 -07:00
Philip Monk
161cc7aa15
clay: put ship/desk in compiler path 2020-05-17 01:59:10 -07:00
Philip Monk
2583da4d31
gall: subscribe to hoon/arvo/zuse as well 2020-05-17 00:22:51 -07:00
Philip Monk
b7beb6a697
clay: make covariant in type of +hoon 2020-05-16 05:22:39 -07:00
Ted Blackman
88b834107c gall: pupal phase 2020-05-14 07:24:44 -04:00
Philip Monk
a874ab4355
zuse: remove +ford 2020-05-14 00:22:39 -07:00
Philip Monk
2c2e16df7a
language-server: convert to fusion 2020-05-13 23:30:52 -07:00
Philip Monk
fd26b2184e
kiln: convert to fusion 2020-05-13 20:13:53 -07:00
Philip Monk
af1a26aa5d
clay: abort mate on conflicts 2020-05-13 19:29:20 -07:00
Ted Blackman
2ce063f409 ford: delete, update /lib/pill 2020-05-13 21:10:35 -04:00
Ted Blackman
4dde2081f1 Merge branch 'ted/leap-arvo' into ford-fusion 2020-05-13 19:44:44 -04:00
Philip Monk
9b434af44e clay: only reload vanes that changed 2020-05-13 18:27:14 -04:00
Ted Blackman
778f6e9d05 /sys: make hoon optional in %lyra 2020-05-13 18:27:14 -04:00
Philip Monk
6da1424f8a
clay: remove last turbo references 2020-05-12 23:36:55 -07:00
Philip Monk
be77fa39db
clay: convert foreign-update to fusion 2020-05-12 22:53:23 -07:00
Philip Monk
ee13aa73d4
clay: move foreign-request to fusion 2020-05-12 20:22:25 -07:00
Philip Monk
8536c6b1ca
clay: remove move of +util 2020-05-12 03:03:07 -07:00
Philip Monk
6e10a7439a
clay: remove fusion mount and queuing infrastructure 2020-05-12 02:09:41 -07:00
Philip Monk
4e1bac8946
clay: convert |mount to fusion 2020-05-12 01:27:19 -07:00
Philip Monk
5474b2fab6
clay: remove turbo merge 2020-05-12 00:43:45 -07:00
Philip Monk
aacd6f80d8
clay: move merge back into clay 2020-05-12 00:01:46 -07:00
Philip Monk
e75ab631a4
clay: remove turbo commit 2020-05-11 19:33:56 -07:00
Philip Monk
7d5e102dfe
clay: change %info to use ford fusion 2020-05-11 19:26:22 -07:00
Philip Monk
9a9d91214f
clay: port mate/meld to ford fusion 2020-05-11 18:23:44 -07:00
Fang
be087a8c92
Merge branch 'release/next-sys' of https://github.com/urbit/urbit into m/debug-dashboard 2020-05-11 20:39:00 +02:00
pkova
9d3c997ecf zuse: allow whitespace around = in attr:de-xml:html
Allow one or more whitespace characters before and/or after the equals sign in
name attribute pairs, such as `<hello a = "yo" />` or `<hello a=    "yo" />`.
Following the spec at https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-Eq.
2020-05-11 21:09:23 +03:00
Fang
e33a8952c1
Merge pull request #2840 from urbit/m/gall-just-not-unique
gall: smaller %watch-not-unique print
2020-05-11 19:44:30 +02:00
Philip Monk
170f791d1d
Merge branch 'philip/ames-dedup' (#2852)
* origin/philip/ames-dedup:
  clay: don't send peers to message pump
  ames: only dedupe long messages
  ames: don't split messages until ready to send
  ames: dedup new messages and fragments
2020-05-08 13:40:09 -07:00
Ted Blackman
b6dcb65061 clay: rebuild desk on zuse change 2020-05-08 06:03:29 -04:00
Ted Blackman
717d6e1b70 arvo: unvirtualize vane installation 2020-05-08 06:02:54 -04:00
Ted Blackman
b32ca5d222 /sys: kernel upgrades seem to work 2020-05-08 02:18:24 -04:00
Ted Blackman
9588542ed4 eyre: fix tests 2020-05-08 01:29:25 -04:00
Philip Monk
54e550d229
gall: clear outstanding ack queue on-load
This will fix the issue described in #2867 for ducts that have already
triggered the bug.  This will also send spurious acks for any messages
that are outstanding at the time of the upgrade, but I don't believe
this will cause a serious problem.
2020-05-07 21:31:50 -07:00
Philip Monk
35ca2be344
gall: clear outstanding ack queue to breaching ships
fixes #2867
2020-05-07 21:17:42 -07:00
Ted Blackman
ea2386b36c clay: stop the %drip 2020-05-07 23:58:03 -04:00
lukechampine
8cbb8f142e gall: fix handling of empty path list 2020-05-07 22:46:51 -04:00
Fang
664275c9f1
eyre: expose bindings through scry
Allows you to scry out all bound endpoints at /=bindings=.

Moves an internal type into zuse for easier external use.
2020-05-08 01:39:56 +02:00
Fang
61a5e7a45e
behn: expose timers through scry
Instead of giving the tank of the timers, give the list of timers
itself.

Updates +timers to account for this.
2020-05-08 01:38:29 +02:00
Fang
14831f4864
ames: expose state through scries
Support /=peers= and /=peer=/~ship scries for getting at all peers and
a specific peer's connection state, respectively.

Moves some internal types into zuse for easier external use.
2020-05-08 01:37:07 +02:00
Ted Blackman
9dea282d5d arvo: minor cleanup 2020-05-07 05:10:43 -04:00
Ted Blackman
7493fd4fd9 arvo: handle %warn event 2020-05-07 05:00:11 -04:00
Ted Blackman
a064afbd89 /sys: |mass works again 2020-05-07 04:51:08 -04:00
Ted Blackman
63b77c1b7f arvo: WIP trying to get |reset working 2020-05-06 13:11:51 -04:00
Ted Blackman
a3846d6e03 arvo: fix boot bugs 2020-05-06 12:33:42 -04:00
Ted Blackman
ea75255290 arvo: synchronous updates compile; untested 2020-05-06 09:02:11 -04:00
Ted Blackman
339e4e34ce clay: fix %mime->%html mark conversion 2020-05-06 01:09:35 -04:00
Philip Monk
4cc3fea534
clay: don't send peers to message pump 2020-05-05 16:39:50 -07:00
Ted Blackman
3ad411646b clay: fix %sole-effect->%json conversion 2020-05-05 18:24:16 -04:00
Ted Blackman
58d3820e41 clay: track /{mar,lib,sur} dependencies properly 2020-05-05 02:31:35 -04:00
Ted Blackman
8fc787b0ca eyre: use ford-fusion; compiles, untested 2020-05-05 01:28:37 -04:00
Philip Monk
490b615b6a
ames: only dedupe long messages 2020-05-04 21:39:59 -07:00
Fang
ab9ecdd7fe
gall: smaller %watch-not-unique print
Instead of printing all outgoing subscriptions for the app, only print the
subscription whose wire we're trying to re-use.
2020-05-03 23:21:30 +02:00
Philip Monk
081c8a864d
ames: don't split messages until ready to send
Trying to reduce the size of ames queues.  This deduplicates incoming
message-blobs by comparing with existing message-blobs in other queues.

It also stops splitting into fragments in +feed-packets.  Instead, it
splits into fragments at the last moment, in +encrypt.  This means we
don't have to store a large number of packets in our home road.
2020-05-02 03:35:44 -07:00
Philip Monk
c50c34d8be
ames: dedup new messages and fragments 2020-05-01 22:55:14 -07:00
Philip Monk
1d5dfe394f
gall: port mark operations to fusion
Gall no longer refers to Ford Turbo
2020-04-30 23:19:50 -07:00
Ted Blackman
c08161af7d gall: scry and warp to /nowhere 2020-04-30 04:15:28 -04:00
Ted Blackman
7645b32f72 Revert "gall: WIP use ford fusion for mark casting"
This reverts commit 22aa98e717.
2020-04-30 02:00:57 -04:00
Philip Monk
65766a73e2
clay: port -merge to fusion 2020-04-29 17:38:24 -07:00
Ted Blackman
6120eeecc0 Merge remote-tracking branch 'origin/ford-fusion' into ford-fusion 2020-04-29 18:12:54 -04:00
Philip Monk
1ae66bd098
clay: clean up sanity checks 2020-04-29 14:50:30 -07:00
Ted Blackman
73352faa23 Merge remote-tracking branch 'origin/philip/ford-fusion' into ford-fusion 2020-04-29 17:46:33 -04:00
Philip Monk
06c0d55a1e
clay: working sanity checks for ankh 2020-04-28 22:34:48 -07:00
Philip Monk
c5d7473cf7
clay: recurse properly 2020-04-28 20:33:12 -07:00
Philip Monk
7133e50ef3
clay: make first commits use fusion 2020-04-28 18:14:18 -07:00
Ted Blackman
22aa98e717 gall: WIP use ford fusion for mark casting 2020-04-28 10:05:58 -04:00
Ted Blackman
87818b8795 clay: report cache sizes in |mass 2020-04-28 06:37:43 -04:00
Ted Blackman
004d0624da clay: remove stray print 2020-04-28 06:23:53 -04:00
Ted Blackman
0a906dc297 clay: use %mime cache on %into 2020-04-28 05:56:28 -04:00
Ted Blackman
3eac215a1c clay: fix %mime->%hoon bootstrapping 2020-04-28 00:52:07 -04:00
Ted Blackman
80541b39aa gall: live update agents 2020-04-27 23:03:17 -04:00
Ted Blackman
48caee7579 clay: fix +build-fit 2020-04-27 22:53:50 -04:00
Philip Monk
dca81a2ee2
clay: prepare for kernel updates 2020-04-24 17:44:29 -07:00
Philip Monk
d3b5fba864
clay: prepare for switching first commit to fusion
Can't be done right now because get-fit doesn't look at the incoming
changes.
2020-04-24 12:17:22 -07:00
Philip Monk
42bab4ecfb
clay: move -commit back into clay 2020-04-23 17:16:42 -07:00
Philip Monk
fa0e019ddf
clay: change %park interface to not take caches
Now a full commit is synchronous.  -commit will be assimilated back into
clay.
2020-04-23 13:54:57 -07:00
Ted Blackman
d7215321d3 gall: fix scry bug 2020-04-22 06:49:23 -04:00
Ted Blackman
627bb565c2 boots off gall using fusion to build apps; some app errors on boot, but usable 2020-04-22 05:27:36 -04:00
Ted Blackman
3beb6ee65b WIP gall: partial fusion conversion; compiles 2020-04-22 01:37:12 -04:00
Ted Blackman
9b0cb85a02 gall: clean up API, remove empty caches from state. 2020-04-21 18:50:47 -04:00
Ted Blackman
8b4ad9bfc9 :spider2 works with threads in subfolders 2020-04-21 00:22:54 -04:00
Ted Blackman
acaf5a12cf -test: all tests pass; fixed clay +get-fit 2020-04-20 02:41:20 -04:00
Ted Blackman
1f91676c97 ford-fusion: stateful %warp reads compile 2020-04-19 04:58:12 -04:00
Ted Blackman
0e4fb5a4f4 -test /sys/vane/{ames,clay} 2020-04-18 19:53:45 -04:00
Ted Blackman
8d3a497bb9 ford-fusion: add ~| with .changes and .deletes 2020-04-18 04:18:13 -04:00
Ted Blackman
7b19580503 fix +sloe for %hint'ed cores 2020-04-18 02:11:34 -04:00
Ted Blackman
2dd78760f3 fix +sloe for %hint'ed cores 2020-04-18 02:09:51 -04:00
Ted Blackman
8f60c0e036 ford-fusion: update ankh before mime conversion 2020-04-18 01:36:59 -04:00
Ted Blackman
f36dc49ede -build-file, -build-mark, -build-cast 2020-04-17 22:50:03 -04:00
Philip Monk
3d04695ca7
clay: use ford fusion for ankh and mime cache 2020-04-17 18:04:51 -07:00
Ted Blackman
1b27582e3a ford-fusion: minor cleanup to +get-value 2020-04-17 02:23:19 -04:00
Ted Blackman
fdcc80b1e2 ford-fusion: use .baked.nub; fixes /mar/hoon dep cycle 2020-04-17 02:14:41 -04:00
Philip Monk
92f8fad85d
clay: write checkout-ankh and checkout-mime 2020-04-16 20:18:02 -07:00
Philip Monk
a479618a23
clay: add +get-changes 2020-04-16 14:05:43 -07:00
Ted Blackman
af24318955 ford-fusion: check for cycles 2020-04-16 16:30:55 -04:00