173 Commits

Author SHA1 Message Date
14c2bb5ac6 Fix cargo clippy issue 2024-12-03 22:34:19 +01:00
0e5e2f55c5 Fix HTTPS detection 2024-07-05 22:08:12 +02:00
7f7bb0871f Update Rust crate base32 to 0.5.0 ()
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [base32](https://github.com/andreasots/base32) | dependencies | minor | `0.4.0` -> `0.5.0` |

---

### Release Notes

<details>
<summary>andreasots/base32 (base32)</summary>

### [`v0.5.0`](https://github.com/andreasots/base32/compare/v0.4.0...v0.5.0)

[Compare Source](https://github.com/andreasots/base32/compare/v0.4.0...v0.5.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMCIsInVwZGF0ZWRJblZlciI6IjM3LjM2OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: 
2024-05-23 11:16:26 +00:00
473e5bfe50 Update Rust crate actix-web to v4.6.0 ()
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actix-web](https://actix.rs) ([source](https://github.com/actix/actix-web)) | dependencies | minor | `4.5.1` -> `4.6.0` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguOCIsInVwZGF0ZWRJblZlciI6IjM3LjM2OC44IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: 
2024-05-23 09:20:43 +00:00
91ef6c25d5 Can define additional claims on per-client basis 2024-03-31 18:37:08 +02:00
0a5649fcb9 Add implicit authentication flow ()
Reviewed-on: 
Co-authored-by: Pierre HUBERT <pierre.git@communiquons.org>
Co-committed-by: Pierre HUBERT <pierre.git@communiquons.org>
2024-03-28 21:13:25 +00:00
7060ce3fe4 Enforce 2FA for user admin routes 2024-03-27 21:03:49 +01:00
cf0e7e1e68 Can enforce 2FA for specific clients 2024-03-27 20:59:29 +01:00
9a79ef701b Need to perform 2FA before modifying factors 2024-03-27 19:26:07 +01:00
8d739c6f72 Fix issue with code 2024-03-26 21:59:43 +01:00
771cbc0888 Fix issue for unauthenticated users 2024-03-26 21:50:37 +01:00
3a7e2d01f0 Remove useless cargo clippy annotation 2024-03-26 21:09:52 +01:00
dfb277d636 Can force 2FA authent 2024-03-26 21:07:29 +01:00
5644e40763 Record successful 2FA authentication in session cookie 2024-03-25 18:04:54 +01:00
b704e9868b Accept future OTP code 2024-03-25 17:18:08 +01:00
06766a2af4 Update chrono & clap dependencies 2024-03-15 16:39:17 +01:00
e71fad8546 Check login before logging it 2024-02-19 19:11:13 +01:00
75b70008e3 Updated all dependencies 2024-02-19 18:42:19 +01:00
176b6cbe61 Fix update issue 2023-08-31 10:05:58 +00:00
6cc9f4c54c Refactor dependencies to reduce code base size ()
Use crates to reduce code base size :

* `actix-remote-ip` to safely determine user IP location
* `light-openid` for the OpenID primitives & as client to handle federation

Reviewed-on: 
2023-04-29 11:11:24 +00:00
f262e6f183 First issue with Owncloud OIDC client ()
OwnCloud 10.12.1 authentication fails with message "Authentication method unknown!"

Reviewed-on: 
2023-04-28 09:39:52 +00:00
e351c333fc Update bincode to v2.0.0-rc3 ()
Prepare for the next major update of bincode

Reviewed-on: 
2023-04-28 08:29:04 +00:00
5e53da0afa Remove empty module 2023-04-27 18:35:11 +02:00
9b18b787a9 Add authentication from upstream providers ()
Let BasicOIDC delegate authentication to upstream providers (Google, GitHub, GitLab, Keycloak...)

Reviewed-on: 
2023-04-27 10:10:28 +00:00
4f7c56a4b8 Loads clients list only once ()
Currently, the list of client is loaded separately for each Actix HTTP handler threads.

In prevision of future improvements, it is worthwhile to load this list only once.

Reviewed-on: 
2023-04-17 16:49:19 +00:00
6d2e52d632 Add default clients ()
* Add the possibility to create client enabled by default when creating new accounts
* Can mark clients are granted for all users, regardless of users accounts grants

Reviewed-on: 
2023-04-15 10:19:15 +00:00
f2e4826b14 Update to code to Rust 1.67 2023-02-02 10:22:15 +01:00
e35f890241 Update crate base64 2023-01-23 16:38:21 +01:00
99780104e0 Fix logic bug on sign in 2022-12-03 12:43:59 +01:00
85e165bd29 Refactor users management ()
* Update users backend interface signatures
2022-12-03 12:28:11 +01:00
fc6ab00e30 Refactor users management ()
* Improve general settings management by admin
2022-11-26 16:06:16 +01:00
a2d731bfff Refactor users management ()
* Improve second factor removal by admin
2022-11-26 15:08:36 +01:00
f5ac7bf278 Refactor users management ()
* Use asynchronous interface to set authorized clients list
2022-11-26 14:51:08 +01:00
b68304c976 Refactor users management ()
* Use asynchronous interface to clear 2FA history
2022-11-26 14:18:46 +01:00
3e65555d0f Add additional comment 2022-11-19 18:41:49 +01:00
e739b10065 Refactor users management ()
* Improve deletion of 2FA factors
2022-11-19 18:35:41 +01:00
ec2f271ed4 Refactor users management ()
* Improve creation of 2FA factors
2022-11-19 18:27:08 +01:00
fcf3ec7036 Refactor users management ()
* Create UserBackend trait
2022-11-19 18:18:46 +01:00
65d334b947 Refactor users management
* Shard `src/data/user.rs` into two different files
  * One for user data structure (same file)
  * One for user manipulation (new file: `user_file_entity.rs`)
* Isolate password hashing and verification
2022-11-19 17:52:35 +01:00
75d894d648 Simplify delete user call syntax 2022-11-19 16:46:40 +01:00
0c35400e64 Simplify user update call syntax 2022-11-19 16:43:28 +01:00
b10c48d080 Simplify password change call syntax 2022-11-19 16:41:39 +01:00
d06c0352fc Log all user actions on stdout 2022-11-19 13:38:24 +01:00
bfe65b0216 Add IP location service 2022-11-12 17:02:34 +01:00
cc4a8a962b User can delete his own 2FA login history 2022-11-12 11:51:24 +01:00
1fa36c0aff Automatically remove outdated 2FA successful entries 2022-11-12 11:27:19 +01:00
46bf14025b cargo clippy 2022-11-12 11:18:40 +01:00
7e1cbb184d Can clear 2FA login history from edit_user page 2022-11-12 11:16:55 +01:00
7a3eaa944e Start to create 2FA exemption after successful 2FA login 2022-11-12 10:24:00 +01:00
af383720b7 Merge factors type for authentication 2022-11-11 12:26:02 +01:00