Commit Graph
20 Commits
Author SHA1 Message Date
+2 0d9f47966b feat: Organization revamp (#5579)
Fixes #5131 
Addresses #5408 

### Revamp
- Created a new table to store organizations in the `organizations`
table. Earlier, we never stored organizations in any table, rather we
used to store the organizations in the meta table as part of the `user`
json.
- The users and organization membership relations are now moved to its
own separate tables - `users` and `org_users`.

### New changes

**API changes** -
- `/organizations` - `POST` api to create an org and save it in the meta
table. In non-enterprise version, currently only the root user can
create the org. For enterprise version with rbac enabled, anyone with
`CREATE` access for organizations can create the organization and
becomes an admin. Root user can always create an organization.
- `/{org_id}/rename` - `PUT` api to rename the existing org. Only root
user and the admins of the org can access this API.

The payload for following APIs are changed -
- `POST api/{org_id}/roles` - `{"name":"new_role"}` is changed to
`{"role":"new_role"}
- `POST api/{org_id}/users/{user}` -
`{"role":"viewer","custom_role":["role_name"]}` is the new payload where
`custom_role` is optional and is array of custom roles (only works in
enterprise with rbac enabled) which will be assigned to the user. The
value of `role` can be standard role or as well as any custom role (when
it is custom role, the standard role assigned to the user is decided
based on the enterprise env variable - `O2_DEX_DEFAULT_ROLE`).
- `POST api/{org_id}/users`- the payload -
```
{"email":"user@user.com","role":"viewer","custom_role":["create_org_permission"],"password":"12345678", "first_name": "", "last_name":""}
```

- `PUT api//{org_id}/users/{email_id}` the payload -
```
{"first_name":"Hello","last_name":"j","role":"viewer","isExternal":false,"change_password":false,"password":"","custom_role":["create_org_permission"]}
```


A new ENV variable is introduced - `ZO_CREATE_ORG_THROUGH_INGESTION`
(default `false`) which if true, an org will automatically created when
ingesting data to a new org. If false, user can not create org by
ingesting data to new org, they need to first call the `POST
/organizations` API.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

**New Features**
- Added a `cloud` feature for enhanced organizational management
capabilities.
- Introduced new methods for managing organizational users and
asynchronous message processing.
- Enhanced user invitation and membership features, including improved
role handling.
- Implemented configurable ingestion URL support across various
components.
- Added new functionality for user management and organization handling
in the super cluster architecture.

**Improvements**
- Refined user authentication and authorization processes, including
error handling.
- Updated database schema to support multi-organization architecture.
- Enhanced pagination settings and UI components for better user
experience.
- Improved handling of organization names and user roles in
notifications and alerts.
- Streamlined service account token management with visibility
enhancements.
- Enhanced the `AddUpdateOrganization` component with improved user
input handling and validation.
- Updated the `AppOrganizations` component to dynamically load the
appropriate organization management interface.
- Improved the `ServiceAccountsList` component with updated pagination
options and token handling logic.

**Bug Fixes**
- Resolved issues with user role assignments and organization management
inconsistencies.
- Corrected routing and navigation logic for login and logout processes.
- Addressed various error handling scenarios in user and organization
processes.
- Fixed issues with the visibility of service account options in the
`EditGroup` and `EditRole` components based on the cloud configuration.

**Breaking Changes**
- Significant restructuring of user and organization data models.
- Changes to authentication workflows and configuration handling.
- Removal of certain components related to user and organization
management.
- Updated the logic for determining the ingestion URL across various
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
Co-authored-by: hengfei yang <hengfei.yang@gmail.com>
Co-authored-by: harshiv-7 <harshiv@openobserve.ai>
Co-authored-by: Huaijin <haohuaijin@gmail.com>
Co-authored-by: Zhao.wei <weizhao029@gmail.com>
Co-authored-by: ShyamOOAI <shyam@openobserve.ai>
Co-authored-by: oasisk <ashish.j.kolhe@gmail.com>
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
Co-authored-by: Yashodhan Joshi <yashodhan@openobserve.ai>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-05-25 21:53:55 -07:00
Shyam Panjiyar cac2ded2cf test: Create Objects and Refactoring POM PyTest (#6357) 2025-03-24 16:50:30 +05:30
Hengfei Yang 595490ea33 ci: update rust to nightly-2025-03-02 (#6145) 2025-03-02 17:27:10 +08:00
Shyam PanjiyarandLoakesh Indiran 477446cb1f test: Websocket PyTest Super Cluster (#5878)
Co-authored-by: Loakesh Indiran <66478092+Loaki07@users.noreply.github.com>
2025-02-14 17:22:44 +05:30
Shyam Panjiyar 221821dbb9 test: Summary PyTest in super cluster (#5938) 2025-02-13 12:54:27 +05:30
Hengfei Yang 949296d601 ci: replace base image (#5934) 2025-02-12 10:47:05 +08:00
Hengfei Yang d6487eb9fe ci: update rust version (#5143) 2024-11-25 19:20:07 +08:00
dependabot[bot] 8e627cc1da chore(deps): bump eifinger/setup-rye from 3 to 4 (#3925) 2024-07-09 12:20:03 +08:00
Hengfei Yang 03f1b192c2 feat: ugprade rust to 2024-07-07 (#3922) 2024-07-08 20:56:56 +08:00
dependabot[bot] af00810f00 chore(deps): bump eifinger/setup-rye from 2 to 3 (#3503) 2024-05-22 21:21:41 +08:00
Ankur Srivastava ac4f7a1c57 ci: update the status of the run (#3299) 2024-04-21 00:19:49 +02:00
Hengfei Yang e33ae00ea1 feat: merge dev into main (#3016) 2024-03-17 22:38:07 +08:00
dependabot[bot] e0b4b6f504 chore(deps): bump eifinger/setup-rye from 1 to 2 (#2853) 2024-03-05 11:08:53 +08:00
Ankur Srivastava 8b039dec7b fix: pin rye to 0.27.0 (#2835) 2024-03-01 09:06:26 +01:00
Ankur Srivastava d2949b3270 fix: use latest rye to fix syncing errors (#2674) 2024-02-08 14:35:37 +05:30
dependabot[bot] ab32f8867a chore(deps): bump arduino/setup-protoc from 2 to 3 (#2658) 2024-02-05 23:53:04 +08:00
Ankur Srivastava 3ee0505225 fix: ensure that the ci-run names are unique (#2453) 2024-01-16 14:57:48 +01:00
dependabot[bot] 5ce4c23de6 chore(deps): bump actions/setup-python from 4 to 5 (#2344) 2024-01-03 11:02:17 +08:00
Juan Calderon-Perez 66968e8265 refactor: API Integration Tests workflow (#2324)
- Simplify the API integration tests by removing steps not needed (Node,
k8s, building docker, etc).
- Testing the UI, linting, formatting, etc should be done in a separate
workflow file
- Simplify Rust cache workflow.
  - By default it caches /target
- Removed Dockerfile and k8s deployment from CI.
  - You can just run `OpenObserve` in the background
- Replace `ubicloud-standard-16` with `ubuntu-latest` which is *FREE*.
  - Using 16 cores, 64GB of ram is an overkill for running tests.
- Don't run the CI if changes to `.md` files are detected.

Notes:
- Before caching building `OpenObserve` takes around 5-7 mins, after
cache it goes down to 1-2 mins.
2023-12-29 07:39:09 +01:00
Ankur Srivastavaandneha00290 2c319d9c6f feat: integrate API integration testing using pytest (#2250)
Co-authored-by: neha00290 <neha@openobserve.ai>
2023-12-27 16:59:41 +01:00