Commit Graph

784 Commits

Author SHA1 Message Date
Pascal Fischer
7baeea3d9d disable avoid adding group peers multiple times 2025-07-04 14:17:34 +02:00
Pascal Fischer
b329397d06 Revert "use FullSaveAssociations for single group save"
This reverts commit 76b180a741.
2025-07-04 10:16:41 +02:00
Pascal Fischer
76b180a741 use FullSaveAssociations for single group save 2025-07-04 00:00:40 +02:00
Pascal Fischer
8db9065ed9 run account update buffer in goroutine 2025-07-03 20:36:35 +02:00
Pascal Fischer
1f79fc0728 ignore associations on create 2025-07-03 19:58:11 +02:00
Pascal Fischer
bdd0b1cf02 update get group by name 2025-07-03 19:24:12 +02:00
Pascal Fischer
e6ac248aee load peers on retrival by name 2025-07-03 19:11:18 +02:00
Pascal Fischer
376394f7f9 fix large batch 2025-07-03 19:00:15 +02:00
Pascal Fischer
542dbdb41c fix group save with removal of all peers 2025-07-03 18:50:17 +02:00
Pascal Fischer
982b9604ee cleanup 2025-07-03 18:41:49 +02:00
Pascal Fischer
f2990e2fbc cleanup 2025-07-03 18:10:00 +02:00
Pascal Fischer
dfb47d5545 fix tests 2025-07-03 17:20:21 +02:00
Pascal Fischer
8e0b8f20a2 fix tests 2025-07-03 16:56:47 +02:00
Pascal Fischer
8a42528664 change getGroupsByPeers 2025-07-03 16:24:00 +02:00
Pascal Fischer
a8cba921e1 fix tests and group copy 2025-07-03 16:04:33 +02:00
Pascal Fischer
fee36b0663 fix peer add if group not existing 2025-07-03 15:40:28 +02:00
Pascal Fischer
dfad334780 fix peer add if group not existing 2025-07-03 15:30:35 +02:00
Pascal Fischer
d25da87957 don't fail on conflict 2025-07-03 15:15:48 +02:00
Pascal Fischer
13213d954d fix save account 2025-07-03 14:49:12 +02:00
Pascal Fischer
6fb61c7cf5 remove group peers from extended store 2025-07-03 13:45:59 +02:00
Pascal Fischer
459db2ba4f fix log in test 2025-07-03 13:41:36 +02:00
Pascal Fischer
e78b7dd058 fis association replace 2025-07-03 13:35:18 +02:00
Pascal Fischer
7132642e4c cleanup tests 2025-07-03 13:23:14 +02:00
Pascal Fischer
22a944b157 cleanup tests 2025-07-03 13:15:56 +02:00
Pascal Fischer
005937ae77 Update management/server/migration/migration.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-03 12:56:39 +02:00
Pascal Fischer
5fab2d019a set lock level on update 2025-07-03 12:55:11 +02:00
Pascal Fischer
36155f8de1 disable delete on migration 2025-07-03 12:51:55 +02:00
Pascal Fischer
e23282b92c add groups migration 2025-07-02 19:09:42 +02:00
Pascal Fischer
22678bce7f [management] add uniqueness constraint for peer ip and label and optimize generation (#4042) 2025-07-02 18:13:10 +02:00
Maycon Santos
6c633497bc [management] fix network update test for delete policy (#4086)
when adding a peer we calculate the network map an account using backpressure functions and some updates might arrive around the time we are deleting a policy.

This change ensures we wait enough time for the updates from add peer to be sent and read before continuing with the test logic
2025-07-02 12:25:31 +02:00
Ali Amer
d9402168ad [management] Add option to disable default all-to-all policy (#3970)
This PR introduces a new configuration option `DisableDefaultPolicy` that prevents the creation of the default all-to-all policy when new accounts are created. This is useful for automation scenarios where explicit policies are preferred.
### Key Changes:
- Added DisableDefaultPolicy flag to the management server config
- Modified account creation logic to respect this flag
- Updated all test cases to explicitly pass the flag (defaulting to false to maintain backward compatibility)
- Propagated the flag through the account manager initialization chain

### Testing:

- Verified default behavior remains unchanged when flag is false
- Confirmed no default policy is created when flag is true
- All existing tests pass with the new parameter
2025-07-02 02:41:59 +02:00
Pascal Fischer
0480507a10 [management] report networkmap duration in ms (#4064) 2025-06-28 11:38:15 +02:00
Pascal Fischer
52ff9d9602 [management] remove unused transaction (#4053) 2025-06-26 01:34:22 +02:00
Pascal Fischer
1b73fae46e [management] add breakdown of network map calculation metrics (#4020) 2025-06-25 11:46:35 +02:00
Maycon Santos
870e29db63 [misc] add additional metrics (#4028)
* add additional metrics

we are collecting active rosenpass, ssh from the client side
we are also collecting active user peers and active users

* remove duplicated
2025-06-22 13:44:25 +02:00
Pascal Fischer
83457f8b99 [management] add transaction for integrated validator groups update and primary account update (#4014) 2025-06-20 12:13:24 +02:00
Pascal Fischer
b45284f086 [management] export ephemeral peer flag on api (#4004) 2025-06-19 16:46:56 +02:00
Bethuel Mmbaga
e9016aecea [management] Add backward compatibility for older clients without firewall rules port range support (#4003)
Adds backward compatibility for clients with versions prior to v0.48.0 that do not support port range firewall rules.

- Skips generation of firewall rules with multi-port ranges for older clients
- Preserves support for single-port ranges by treating them as individual port rules, ensuring compatibility with older clients
2025-06-19 13:07:06 +03:00
Bethuel Mmbaga
7c6b85b4cb [management] Refactor routes to use store methods (#2928) 2025-06-18 16:40:29 +03:00
Maycon Santos
af2b427751 [management] Avoid recalculating next peer expiration (#3991)
* Avoid recalculating next peer expiration

- Check if an account schedule is already running
- Cancel executing schedules only when changes occurs
- Add more context info to logs

* fix tests
2025-06-17 15:14:11 +02:00
Maycon Santos
b1247a14ba [management] Use xID for setup key IDs to avoid id collisions (#3977)
This PR addresses potential ID collisions by switching the setup key ID generation from a hash-based approach to using xid-generated IDs.

Replace the hash function with xid.New().String()
Remove obsolete imports and the Hash() function
2025-06-14 12:24:16 +01:00
Vlad
4f63996ae8 [management] added events streaming metrics (#3814) 2025-06-12 18:48:54 +01:00
Bethuel Mmbaga
6d654acbad [management] Persist peer flags in meta updates (#3958)
This PR adds persistence for peer feature flags when updating metadata, including equality checks, gRPC extraction, and corresponding unit tests.

- Introduce a new `Flags` struct with `isEqual` and incorporate it into `PeerSystemMeta`.
- Update `UpdateMetaIfNew` logic to consider flag changes.
- Extend gRPC server’s `extractPeerMeta` to populate `Flags` and add tests for `Flags.isEqual`.
2025-06-11 22:39:59 +02:00
Bethuel Mmbaga
4ee1635baa [management] Propagate user groups when group propagation setting is re-enabled (#3912) 2025-06-11 14:32:16 +03:00
Bethuel Mmbaga
87376afd13 [management] Enable unidirectional rules for all port policy (#3826) 2025-06-10 18:02:45 +03:00
Bethuel Mmbaga
b76d9e8e9e [management] Add support for port ranges in firewall rules (#3823) 2025-06-10 18:02:13 +03:00
Bethuel Mmbaga
de27d6df36 [management] Add account ID index to activity events (#3946) 2025-06-09 14:34:53 +03:00
Bethuel Mmbaga
b604c66140 [management] Add postgres support for activity event store (#3890) 2025-06-04 17:38:49 +03:00
Pedro Maia Costa
87148c503f [management] support account retrieval and creation by private domain (#3825)
* [management] sys initiator save user (#3911)

* [management] activity events with multiple external account users (#3914)
2025-06-04 11:21:31 +01:00
Pedro Maia Costa
07b220d91b [management] REST client impersonation (#3879) 2025-06-02 22:11:28 +02:00