Commit Graph

207 Commits

Author SHA1 Message Date
J
c1b259af5b interface, gcp: don't spam the console with 500s
Options here were: make the get-token thread try to return a unit, or
write a different thread to check whether GCP Storage seemed to be
configured and poll on that thread, or move the whole thing into a Gall
app.

The compromise between time-to-implement and overall cleanliness seemed
to be to write a different thread that just checks whether the settings
fields have been poked. Unfortunately this means GcpManager is now a
somewhat hefty JavaScript state machine.

Took out the logic to check whether S3 was configured in GcpManager,
since it was really only there to prevent spamming the console with
500s. If you have both S3 and GCP Storage configured for some reason,
you will now use GCP per the logic in useStorage.
2021-02-26 23:42:57 +00:00
J
0a23c0f4a4 -get-gcp-token: docs, formatting
Correct expiry from @da -> @dr, and set max cols to 72.
2021-02-24 21:26:59 +00:00
J
2a82da55ca -get-gcp-token: error messages
Don't dump extra console output on thread failure. Say 'gcp' in failures
to aid debugging.
2021-02-24 20:37:37 +00:00
J
03e99f52c9 gcp: make expiry relative
This indeed makes it easier on the Landscape side. It also makes it
easier to coerce from the JSON Google gives us, so a win all around.
2021-02-24 20:35:24 +00:00
J
328159da67 -get-gcp-token: renamed from -get-gcp-jwt 2021-02-24 00:49:47 +00:00
J
d94f35aa5c gcp: add token type
Also use it in -get-gcp-jwt.
2021-02-24 00:49:47 +00:00
J
a8113182a8 -get-gcp-jwt: vertical 2021-02-23 23:48:50 +00:00
J
6a07130f0d -get-gcp-jwt: correct scope, clean up call
It turns out 'devstorage.read_write' also gives us an access token
instead of a JWT, and is probably more the thing that we want.

Took the opportunity to make scope a macro to clean up the make-jwt call
site.
2021-02-23 23:12:48 +00:00
J
aa93ac49c1 -get-gcp-jwt: sot -> jot, moar vertical
Since we only have one JWT (the thing we produce is an "access token",
not a JWT), we can just call it jot.
2021-02-23 23:03:07 +00:00
J
61d8030ec9 -get-gcp-jwt: documentation, clearer return faces 2021-02-23 22:53:42 +00:00
J
9f43fef85d -get-gcp-jwt: returns time of expiry
Couldn't bring myself to pass in a relative date without a base, so we
instead pass now into get-access-token, and return the time of expiry.
2021-02-23 22:40:05 +00:00
J
b0bb659f12 -get-gcp-jwt: @dr expires_in, cleanup
The expiry field we get from Google is not a timestamp, but a count of
seconds after which the token is invalid (hence, 'expires_in'). We
represent this as a @dr by multiplying the integer we get from Google by
~1s. (Perhaps it will wind up being easier on the Landscape side to
consume the raw integer, but we may as well start off more
type-correct.)

Also cleans up some names now that I'm less confused about how the token
API works, and makes some syntax more vertical.
2021-02-23 22:34:48 +00:00
J
d978e6a551 -get-gcp-jwt: produces an access token
The correct scope to ask for is not devstorage.editor, but
cloud-platform. This will, rather than returning a signed JWT from
Google that looks like it works but doesn't, return a JSON object
containing an access token and expiration time.
2021-02-23 22:18:59 +00:00
J
860343e3d4 -get-gcp-jwt: clean up references, use +ot
Moves =, closer to call sites so it's clearer what's coming from where.
Also uses +ot, allowing a less horrifying +sign-jwt. This also seems to
not jump back and forth between tapes and cords as much, for what that's
worth.
2021-02-23 21:14:35 +00:00
Jōshin
ac40b5cf24 -get-gcp-jwt: produce a JWT for use in GCP Storage 2021-02-23 21:13:30 +00:00
Liam Fitzgerald
66d9fd8426
sane: fix accidental self kick
Does not remove ourselves from the group when run. Additionally adds
card preview support to the inside app pokes.

Fixes urbit/landscape#442
2021-02-16 12:24:30 +10:00
L
071fcc621b
Merge pull request #4398 from urbit/lf/spider-code
ted: add -code thread
2021-02-10 13:20:07 -06:00
Liam Fitzgerald
b6935d50d6
-graph-delete: fix syntax error 2021-02-10 17:20:32 +10:00
Liam Fitzgerald
a1eda0469b
ted: add -code thread 2021-02-09 10:28:49 +10:00
Logan Allen
3a7c201e80 Merge branch 'release/next-userspace' into la/push-hook-list-resource 2021-02-03 11:52:38 -06:00
L
ac759b7d96
Merge pull request #4365 from urbit/lf/revive-invites
Invites: update for new group-view
2021-02-02 18:58:58 -06:00
Liam Fitzgerald
e17bf31859
group-view: add -group-invite thread 2021-02-03 09:52:00 +10:00
Liam Fitzgerald
c16f2365bf
Merge remote-tracking branch 'origin/release/next-userspace' into lf/graph-permissioning 2021-02-02 10:40:40 +10:00
Logan Allen
e1b1e1abf7 group-threads: contact push/pull hooks added to group lifecycle 2021-02-01 16:19:25 -06:00
Liam Fitzgerald
ee1ab3b131
metadata, groups: update for %groups metadata 2021-02-01 17:54:37 +10:00
Liam Fitzgerald
97502838d6
Merge remote-tracking branch 'origin/la/contact-store' into lf/join-cleanup 2021-02-01 17:01:02 +10:00
Liam Fitzgerald
e6d66b205a
group,graph-view: fixup calling convention for awaiting threads 2021-02-01 16:27:38 +10:00
Liam Fitzgerald
2730eb6c09
graph-view: refactor threads to call into %group-view 2021-02-01 14:07:39 +10:00
Liam Fitzgerald
d5bfe028e8
group-view: add leave, delete threads 2021-02-01 13:43:40 +10:00
Liam Fitzgerald
a6e1459395
group-view: add %create thread 2021-02-01 13:25:00 +10:00
Logan Allen
7b82c55b59 graph-delete thread: fix %metadata-store scry and %hook reference to %push-hook 2021-01-29 16:58:44 -06:00
Logan Allen
13bad6b16c graph-create thread: fix metadata to metadatum rename 2021-01-29 16:52:04 -06:00
Logan Allen
691409eda9 metadata-store: compiles 2021-01-29 16:38:32 -06:00
Logan Allen
72e036bae3 Merge branch 'release/next-userspace' into la/contact-store 2021-01-29 14:48:39 -06:00
Liam Fitzgerald
aa62d18d2f
ChannelSettings: refine delete/remove logic and buttons 2021-01-28 14:59:26 +10:00
Matilde Park
78940cb10f Merge branch 'release/next-js' into mp/contacts/ui-detail 2021-01-26 16:51:46 -05:00
Liam Fitzgerald
4b6637ec9a
graph-hooks: %remove-nodes permissioning 2021-01-26 14:47:35 +10:00
Liam Fitzgerald
ccbe4f9ad3
Merge remote-tracking branch 'origin/release/next-userspace' into lf/md-modernize 2021-01-25 14:00:07 +10:00
Matilde Park
d3c52c5e19 Merge branch 'release/next-js' into release/next-userspace 2021-01-22 17:01:28 -05:00
matildepark
84d23a9308
Merge pull request #4239 from urbit/m/graph-join-backoff
graph: make the join thread back off
2021-01-21 13:27:59 -05:00
Liam Fitzgerald
3bf03ffc9b
graph-join: crash on backoff and fix scry mold 2021-01-21 10:43:25 +10:00
Matilde Park
31def6f57a Merge branch 'release/next-js' into release/next-userspace 2021-01-20 12:47:31 -05:00
Logan Allen
1eb99bfdcd contact-store: wrote out all the JSON conversions and store compiles 2021-01-19 13:59:11 -06:00
Liam Fitzgerald
5d9955c0ce
Merge remote-tracking branch 'origin/release/next-js' into lf/md-modernize 2021-01-15 14:53:10 +10:00
Liam Fitzgerald
2cfa0f073f
Merge remote-tracking branch 'origin/release/next-userspace' into lf/md-modernize 2021-01-14 13:37:55 +10:00
Liam Fitzgerald
541efa5ff9
various, metadata: update metadata interactions 2021-01-14 11:04:15 +10:00
Liam Fitzgerald
2cd5e462b0
Merge remote-tracking branch 'origin/release/next-userspace' into lf/app-sane 2021-01-12 14:29:22 +10:00
fang
69704c6a80
graph: make the join thread back off
Pushes the pathological case back a bit, but doesn't make it stop trying.
2021-01-06 23:22:54 +01:00
Logan Allen
c99bf65d81 graph-delete thread: properly remove entry from metadata-store and hook 2021-01-06 15:32:16 -06:00
Liam Fitzgerald
06ed5af3f4
graph-store: add -eval thread 2020-12-11 15:52:17 +10:00