aboutsummaryrefslogtreecommitdiff
path: root/src/api/mod.rs
AgeCommit message (Collapse)Author
2024-07-12Improved HTTP client (#4740)Daniel García
* Improved HTTP client * Change config compat to use auto, rename blacklist * Fix wrong doc references
2024-06-23Change API and structs to camelCase (#4386)Daniel García
* Change API inputs/outputs and structs to camelCase * Fix fields and password history * Use convert_json_key_lcase_first * Make sends lowercase * Update admin and templates * Update org revoke * Fix sends expecting size to be a string on mobile * Convert two-factor providers to string
2024-04-27Implement custom DNS resolver (#3988)Daniel García
2024-03-17Remove custom WebSocket code (#4001)Mathijs van Veluw
* Remove custom WebSocket code Remove our custom WebSocket code and only use the Rocket code. Removed all options in regards to WebSockets Added a new option `WEBSOCKET_DISABLED` which defaults too `false`. This can be used to disable WebSockets if you really do not want to use it. * Addressed remarks given and some updates - Addressed comments given during review - Updated crates, including Rocket to the latest merged v0.5 changes - Removed an extra header which should not be sent for websocket connections * Updated suggestions and crates - Addressed the suggestions - Updated Rocket to latest rc4 Also made the needed code changes - Updated all other crates Pinned `openssl` and `openssl-sys` --------- Co-authored-by: Daniel García <[email protected]>
2024-01-27Improve file limit handling (#4242)Daniel García
* Improve file limit handling * Oops * Update PostgreSQL migration * Review comments --------- Co-authored-by: BlackDex <[email protected]>
2023-11-12Add Protected Actions Check (#4067)Mathijs van Veluw
Since the feature `Login with device` some actions done via the web-vault need to be verified via an OTP instead of providing the MasterPassword. This only happens if a user used the `Login with device` on a device which uses either Biometrics login or PIN. These actions prevent the athorizing device to send the MasterPasswordHash. When this happens, the web-vault requests an OTP to be filled-in and this OTP is send to the users email address which is the same as the email address to login. The only way to bypass this is by logging in with the your password, in those cases a password is requested instead of an OTP. In case SMTP is not enabled, it will show an error message telling to user to login using there password. Fixes #4042
2023-08-13Implement login-with-deviceBernd Schoolmann
2023-06-11feat: Push NotificationsGeekCornerGH
Co-authored-by: samb-devel <[email protected]> Co-authored-by: Zoruk <[email protected]>
2022-12-01Add Organizational event logging featureBlackDex
This PR adds event/audit logging support for organizations. By default this feature is disabled, since it does log a lot and adds extra database transactions. All events are touched except a few, since we do not support those features (yet), like SSO for example. This feature is tested with multiple clients and all database types. Fixes #229
2022-11-28redirect to admin login page when forward failsStefan Melmuk
currently, if the admin guard fails the user will get a 404 page. and when the session times out after 20 minutes post methods will give the reason "undefined" as a response while generating the support string will fail without any user feedback. this commit changes the error handling on admin pages * by removing the reliance on Rockets forwarding and making the login page an explicit route that can be redirected to from all admin pages * by removing the obsolete and mostly unused Referer struct we can redirect the user back to the requested admin page directley * by providing an error message for json requests the `get_diagnostics_config` and all post methods can return a more comprehensible message and the user can be alerted * the `admin_url()` function can be simplified because rfc2616 has been obsoleted by rfc7231 in 2014 (and also by the recently released rfc9110) which allows relative urls in the Location header. c.f. https://www.rfc-editor.org/rfc/rfc7231#section-7.1.2 and https://www.rfc-editor.org/rfc/rfc9110#section-10.2.2
2022-10-20group supportMFijak
2022-10-15use static_files() for email attachmentsStefan Melmuk
Apply suggestions from code review Co-authored-by: Mathijs van Veluw <[email protected]>
2022-09-25add api_not_found catcher for 404 errors in /apiStefan Melmuk
2022-09-25add not_found catcher for 404 errorsStefan Melmuk
2022-02-27Update to rocket 0.5 and made code async, missing updating all db calls, ↵Daniel García
that are currently blocking
2021-10-28Add email notifications for incomplete 2FA loginsJeremy Lin
An incomplete 2FA login is one where the correct master password was provided, but the 2FA token or action required to complete the login was not provided within the configured time limit. This potentially indicates that the user's master password has been compromised, but the login was blocked by 2FA. Be aware that the 2FA step can usually still be completed after the email notification has already been sent out, which could be confusing. Therefore, the incomplete 2FA time limit should be long enough that this situation would be unlikely. This feature can also be disabled entirely if desired.
2021-09-17Add Emergency contact featurethelittlefireman
Signed-off-by: thelittlefireman <[email protected]>
2021-06-19Fix clippy lintsDaniel García
2021-06-16Support for webauthn and u2f->webauthn migrationsDaniel García
2021-04-06Merge remote-tracking branch 'origin/master' into fmtJake Howard
2021-04-06Modify rustfmt fileJake Howard
2021-04-05Add support for auto-deleting trashed itemsJeremy Lin
Upstream will soon auto-delete trashed items after 30 days, but some people use the trash as an archive folder, so to avoid unexpected data loss, this implementation requires the user to explicitly enable auto-deletion.
2021-04-05Add a generic job schedulerJeremy Lin
Also rewrite deletion of old sends using the job scheduler.
2021-03-22Send deletion thread and updated users revisionDaniel García
2020-07-14Removed try_trait and some formatting, particularly around importsDaniel García
2020-05-03Remove unused dependency and simple feature, update dependencies and fix ↵Daniel García
some clippy lints
2019-02-16Implemented multiple U2f keys, key names, and compromised checksDaniel García
2019-01-25Fix editing users from collections menuDaniel García
2018-12-30Start using rustfmt and some style changes to make some lines shorterDaniel García
2018-12-30Implemented proper error handling, now we can do `user.save($conn)?;` and it ↵Daniel García
works. In the future, maybe we can do the same with the `find_by_id` methods that return an Option.
2018-12-30Initial version of admin panel, list users and reload user list works. No ↵Daniel García
serious auth method yet, password is 'token123'
2018-12-07Migrate to rust 2018 editionDaniel García
2018-11-01Updated bw_rs to Rocket version 0.4-rc1Daniel García
2018-08-30Initial version of websockets notification support.Daniel García
For now only folder notifications are sent (create, rename, delete). The notifications are only tested between two web-vault sessions in different browsers, mobile apps and browser extensions are untested. The websocket server is exposed in port 3012, while the rocket server is exposed in another port (8000 by default). To make notifications work, both should be accessible in the same port, which requires a reverse proxy. My testing is done with Caddy server, and the following config: ``` localhost { # The negotiation endpoint is also proxied to Rocket proxy /notifications/hub/negotiate 0.0.0.0:8000 { transparent } # Notifications redirected to the websockets server proxy /notifications/hub 0.0.0.0:3012 { websocket } # Proxy the Root directory to Rocket proxy / 0.0.0.0:8000 { transparent } } ``` This exposes the service in port 2015.
2018-08-24Implemented basic support for prelogin and notification negotiationDaniel García
2018-07-13Ignore U2F challenge if not provided. Also checked that error_code has to be ↵Daniel García
0 for a successfull registration
2018-07-12Implemented U2F, refactored Two Factor authentication, registering U2F ↵Daniel García
device and authentication should work. Works on Chrome on MacOS with a virtual device.
2018-06-11Some style changes, removed useless matches and formatsDaniel García
2018-06-01Make sure the inputs are always in the same case (PascalCase, which is what ↵Daniel García
upstream seems to prefer most of the time)
2018-05-26Make sure TOTP codes can be both Numbers or Strings, fixes #30Daniel García
2018-05-04Implemented some admin methods, inserted CollectionsUsers only when Org ↵Daniel García
accessAll == false, and implemented find_collection when user has access_all in Org
2018-02-23Fixed cipher import, created missing data structs instead of using generic ↵Daniel García
Value, and fixed some warnings
2018-02-17Detect device type correctly and shorten return types of functionsDaniel García
2018-02-10First working versionDaniel García