Commit Graph

263 Commits

Author SHA1 Message Date
Neeraj Gupta
f35d2773aa [server]Use regular go context in repo 2024-07-22 16:29:20 +05:30
Neeraj Gupta
40a4f783f7 [server] Add API to return indexed files for given model 2024-07-22 16:15:25 +05:30
Manav Rathi
f02bd096b0 [server] Add a workaround for Safari to recognize Yubikeys (#2429)
Safari just doesn't recognize the Yubikey (macOS/iOS, NFC/USB, doesn't
matter) if display name is set to the empty string. Safari's long
description doesn't care to mention this requirement:
https://webkit.org/blog/11312/meet-face-id-and-touch-id-for-the-web/

Tested on localhost with Safari macOS. Will test on iOS post deployment.
2024-07-12 12:57:13 +05:30
Manav Rathi
0ea408379a [server] [cli] Fix docker "FROM AS" case warnings
With the latest Docker update (27.0.3), it now warns about the "FROM" and "AS"
in the Dockerfile not matching. E.g. when building the server docker image:

> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)
2024-07-12 11:19:37 +05:30
Manav Rathi
eeab98c768 [server] Add a workaround for Safari to recognize Yubikeys
Safari just doesn't recognize the Yubikey (macOS/iOS, NFC/USB, doesn't matter)
if display name is set to the empty string. Safari's long description doesn't
care to mention this requirement:
https://webkit.org/blog/11312/meet-face-id-and-touch-id-for-the-web/

Tested on localhost with Safari macOS. Will test on iOS post deployment.
2024-07-12 11:10:56 +05:30
Manav Rathi
0b3ca8db69 [server] Increase HTTP request body size to prevent 413 Too Large errors
Allow HTTP request body up to 4 MB. The default is 1 MB, which is too small for
face embeddings for photos with more than a couple of hundred faces.

Roughly, each face embedding is 4KB, but encrypting and base-64-ing the
embedding also has a 30% addition (just from one sample I saw), so this should
allow photos with ~700 faces to go through.

Ref:
- https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
2024-07-05 14:08:10 +05:30
Manav Rathi
06e7626206 [server] Return key attributes in the session-validity response 2024-06-25 15:25:04 +05:30
Manav Rathi
0f1d45587e [server] Reduce DB healthcheck interval in starter Docker compose template
The museum container depends on the postgres container being up and the DB being
ready to accept connections. To enforce this dependency, we use the healthcheck
attribute.

See: https://docs.docker.com/compose/startup-order/

The value of the healthcheck interval was set to 1s since the default (30s)
caused each `docker compose up` to require at least 30 seconds on each startup,
which was prohibitive. The downside is that the healthchecks continue to run
beyond the startup phase too, and for small VMs, this caused a lot of
unnecessary CPU usage.

Thankfully, now Docker has a new option for a different healthcheck during the
start phase:

> start interval is the time between health checks during the start period. This
  option requires Docker Engine version 25.0 or later.

They were added in Docker compose 2.20.2, released an year ago (2023-07-19).

https://docs.docker.com/compose/release-notes/#2202
2024-06-23 09:22:51 +05:30
Manav Rathi
53140de879 [server] Tweak verification email
Despite all of our efforts, gmail insists on marking our verification emails to
new users as spam. We have already changed our mail delivery providers;
non-gmail users don't face this problem; and even for gmail, (a) existing Ente
users also get these mails correctly with SPF/DKIM/DMARC PASS, and (b)
non-verification emails get delivered (in the anecdotal reports we've received).

As an attempt at some voodoo, try changing the subject and content of the mail,
to try and rule out some faulty gmail classifier that uses the email body.
2024-06-23 00:07:31 +05:30
Kermina Awad
81b07e772d make replication.worker-url optional 2024-06-22 12:49:35 -04:00
Neeraj Gupta
2a905a439c [server] Inc passkey name limit to 256 2024-06-19 10:11:10 +05:30
Neeraj Gupta
b89378e838 Return bad request if name validation fails 2024-06-18 22:54:42 +05:30
Neeraj Gupta
0ee2da9028 [server] Return bad req if passkey is deleted 2024-06-18 18:01:44 +05:30
vishnukvmd
f032739461 ente -> Ente 2024-06-15 16:21:10 +05:30
Neeraj Gupta
d2e526769d Reject passkey verification for already claimed session 2024-06-13 17:52:27 +05:30
Neeraj Gupta
cfafcf8278 make linter happy 2024-06-13 16:44:16 +05:30
Neeraj Gupta
186981014e Fix typo 2024-06-12 16:40:12 +05:30
Neeraj Gupta
cf4d407f39 Add API to get token data for given passkey session 2024-06-12 16:16:48 +05:30
Neeraj Gupta
7e48953b6a Store token data on passkey auth 2024-06-12 15:56:54 +05:30
Neeraj Gupta
ae170acb30 Schema update to enable tokenData fetch for passkey session 2024-06-12 14:27:37 +05:30
Neeraj Gupta
c95260a228 Reduce account jwt token validity to 30mins 2024-06-12 14:13:52 +05:30
vishnukvmd
4561c8f85c Increase grace period of Stripe subscriptions to 14 days 2024-06-11 14:09:57 +05:30
Manav Rathi
00769bdd7a Use 2 min timeout, no need to override on the client 2024-06-10 21:26:38 +05:30
Manav Rathi
89f58236fc Use the default of yarn dev:accounts 2024-06-10 20:48:38 +05:30
Neeraj Gupta
fe324c3124 Add rpi id and origin for localhost 2024-06-10 18:25:44 +05:30
Neeraj Gupta
c0ac43b6c8 Upgrade webauthn + go from 1.20 -> 1.21 2024-06-10 18:25:18 +05:30
Manav Rathi
d47287095d Document webauthn keys 2024-06-10 16:44:15 +05:30
Manav Rathi
b9d4f9ff10 /passkeys/registration/begin GET => POST 2024-06-10 16:35:10 +05:30
Neeraj Gupta
3389acd42b Lint fix 2024-06-06 15:20:21 +05:30
Neeraj Gupta
985659ea56 Prefer wasabi objects for CLI requets 2024-06-06 14:38:05 +05:30
Manav Rathi
af382d483d [server] Mention more details around s3 provider config 2024-05-26 04:50:44 +05:30
Vishnu Mohandas
c2fc0a3d57 Update verification email address (#1855) 2024-05-25 18:48:50 +05:30
vishnukvmd
39a706ea20 Update verification email address 2024-05-25 18:47:19 +05:30
Neeraj Gupta
0949102959 Improve logs 2024-05-19 08:33:29 +05:30
Neeraj Gupta
367431bef8 Improve log 2024-05-19 08:31:32 +05:30
Neeraj Gupta
113b776aea [server] Remove fallback check as dc column was added with default dc b2 2024-05-19 08:21:32 +05:30
Neeraj Gupta
89b01f0a39 Query DB to get fallback DC 2024-05-17 15:40:09 +05:30
Neeraj Gupta
e33d85412c Fix query for add new DC 2024-05-17 15:08:57 +05:30
Neeraj Gupta
da155464fa Remove updated_at trigger for embeddings table 2024-05-17 15:08:48 +05:30
Neeraj Gupta
fd50461214 Add dc in the log ctx 2024-05-17 10:52:00 +05:30
Neeraj Gupta
698ceca49e Lint fix 2024-05-16 16:21:55 +05:30
Neeraj Gupta
51138e9263 Increase initial timeout val for b2 dc 2024-05-16 16:21:08 +05:30
Neeraj Gupta
08555954d2 Document 2024-05-16 16:10:51 +05:30
Neeraj Gupta
b404b77da3 Update dc while copying derived file 2024-05-16 16:08:38 +05:30
Neeraj Gupta
a522631c2b Refactor 2024-05-16 15:19:22 +05:30
Neeraj Gupta
20e9a6a1fc Refactor 2024-05-16 13:39:47 +05:30
Neeraj Gupta
3485b31475 Clean up & new line 2024-05-16 12:58:42 +05:30
Neeraj Gupta
b53a70cf65 Avoid retry if object is missing 2024-05-16 12:57:31 +05:30
Neeraj Gupta
3f1ee82ec5 Inline 2024-05-16 12:52:20 +05:30
Neeraj Gupta
4cc866fa12 Refactor 2024-05-16 12:49:23 +05:30