<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added support for query duration adjustments based on a maximum query
range in search functionality.
- Introduced new fields for time range validation in search responses.
- Included maximum query range settings in stream configurations.
- **Improvements**
- Enhanced log stream components to handle maximum query range
restrictions effectively.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
- [x] Includes the following APIs endpoints in auditing -
- `/auth/login` - If the login is successful, the user email along with
the event data (such as response code, path, method, query params and
the timestamp) and if it is unsuccessful, it still audits the event, but
username will be present only if available.
- `/auth/presigned-url`
- `/auth/login` - `GET` request. Similar to the first `login` endpoint.
- `/config/reload` - Audits this event, but as this is not a protected
route, the username will not be present in the audit record.
- `/config/redirect` - Similar to the first `login` endpoint.
- `/config/logout`
- [x] Audit Cron job is run on all the nodes including the router. The
interval can be set through `O2_AUDIT_PUBLISH_INTERVAL` env (in
seconds).
- [x] In case of remote usage reporing, print the error if response from
remote usage url is unsuccessful
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced enhanced auditing functionalities for user authentication
and authorization in the enterprise version.
- Added asynchronous task for auditing and publishing tasks within job
module.
- **Improvements**
- Refined error handling in usage data ingestion to better manage
success and failure responses.
- **Conditional Compilation**
- Multiple new functionalities and auditing enhancements are now
conditionally compiled based on the "enterprise" feature.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced multi-select stream functionality in UI, allowing users to
select and query multiple data streams simultaneously.
- Added new search functions to handle multiple streams of data and
provide aggregated search results.
- **Bug Fixes**
- Corrected UI test cases to improve selection and verification of
stream names.
- **Enhancements**
- Improved search functionalities and error handling within the logs
plugin interface.
- Enhanced stream handling and validation in the search feature.
- **Tests**
- Added new Playwright test cases for stream multi-select functionality.
- Updated existing test cases to adapt to new multi-select stream logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Neha P <neha@openobserve.ai>
Co-authored-by: Neha P <144308844+neha00290@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
Co-authored-by: Subhradeep Chakraborty <chakrabortysubhradeep556@gmail.com>
In case of generating a presigned-url the base url should be a
combination of
```
let base_url = format!("{}{}", cfg.common.web_url, cfg.common.base_uri);
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Refactor**
- Improved URL construction by introducing a `base_url` variable for
better maintainability and flexibility.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixes#3695
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added `trace_id` support across various functions to enhance tracking
and debugging capabilities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced user authentication by adding extended password fields and
support for generating presigned login URLs.
- Improved user management with new functions for handling user data and
authentication tokens.
- **Bug Fixes**
- Fixed issues with user data handling by passing references instead of
values in database operations.
- **Refactor**
- Streamlined authentication and user management code for better
maintainability and performance.
- **Tests**
- Added new test cases to validate password hashing and presigned URL
generation functionalities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: oasisk <ashish.j.kolhe@gmail.com>
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced `searchType` attribute across various components to enhance
search functionality.
- Added support for different search event types like `UI`,
`Dashboards`, `Reports`, `Alerts`, `Values`, and `RUM`.
- **Bug Fixes**
- Improved search parameter handling in multiple components and API
calls.
- **Enhancements**
- Updated search-related functions to include `searchType` for more
precise search results.
- Enhanced dashboard and RUM views with new `searchType` attributes for
better data filtering.
- **Refactor**
- Standardized search functionality across different modules and
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
The query `size` works like this, it should more clear now:
1. size > 0, it will return hits equal to `size`
2. size = 0, it will return empty hits, this used to other purposes,
like: get total, get aggs.
3. size = -1, it will use a backend default limit to return hits,
setting by `ZO_QUERY_DEFAULT_LIMIT=1000`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Corrected handling of query parameters by changing types from `usize`
to `i64` to support larger values and prevent potential overflow issues.
- **Improvements**
- Enhanced the logic for setting query limits to handle negative values
more gracefully, ensuring better default behavior.
- **Refactor**
- Updated various internal structures and function signatures to use
`i64` instead of `usize` for consistency and improved range handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
The new endpoint `/config/reload` will refresh the
environment variables.
There are a bunch of env-vars which will not be reloaded
for e.g. HTTP_PORT etc. these will need a restart.
---------
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
There are three cases to consider:
if ZO_ENABLE_EMBEDDED_REPORT_SERVER=true
If running a binary, alertmanager node will spawn an embedded server
running at localhost:5082.
All the requests from alert-manager will go to localhost:5082 for pdf
generation related tasks.
For single node k8s deployment, as this is running in a container there
is no chromium installed, so even if you set the variable to true, the
report server will panic due to missing dependencies. For this situation
helm chart will spawn a report-server instance which can be used.
Same for cluster deployment.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced a new report server for generating and sending reports.
- Added health check and report sending endpoints.
- **Improvements**
- Enhanced logging for report server operations.
- Configurable option to skip TLS verification for report server
connections.
- **Bug Fixes**
- Fixed formatting issue in HTTP status request handler.
- **Chores**
- Updated dependencies and configurations for the new report server
module.
- **Documentation**
- Added new structures and functions for email configuration, report
generation, and server operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Add cluster selection in logs search queries for additional filtering
based on region/clusters
- add org/stream info in ingestion http handler error logging
---------
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
- [x] invalid peer certificate: UnknownIssuer
- [x] SSO user - infinite loop when accessing query cancelation UI
- [x] Clusters API should be accessible with SSO user
- [x] Handle _timestamp for _all fields
1. Users can define schema fields for existing streams.
2. During querying/exploring only those defined schema fields will be
available in schema, rest all fields will be available in "_all" field
in the schema.
---------
Co-authored-by: oasisk <ashish.j.kolhe@gmail.com>
For enterprise in rbac, `GET` methods for `reports` and `savedviews`
consists of `{org_id}/<reports|savedviews>/{id}` format, i.e. `url_len`
is 3. This PR corrects how the fga object string is extracted (which
should be `report:{report_name}` or `savedview:{view_id}`) from the url
path with the above format with `GET` method.