Files
openobserve/web
Harsh MahajanandClaude Sonnet 4.5 2fcdfeb726 fix: adding api access to non-native users (#9704)
### **User description**
resolves https://github.com/openobserve/o2-enterprise/issues/991


___

### **PR Type**
Enhancement


___

### **Description**
- Allow service account token auth before native login

- Unify token validation for ingestion endpoints

- Expose `service_account_enabled` in config API

- Conditionally enable serviceAccounts UI route and tab


___

### Diagram Walkthrough


```mermaid
flowchart LR
  VC["validate_credentials"]
  ZC["zo_config handler"]
  UI["UI route & tabs"]
  VC -- "token auth bypass" --> ZC
  ZC -- "include service_account_enabled" --> UI
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>validator.rs</strong><dd><code>Reorder and unify token
authentication logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/handler/http/auth/validator.rs

<ul><li>Moved service account token checks above native login
restriction<br> <li> Added unified token auth for ingestion
endpoints<br> <li> Removed duplicate token validation blocks</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9704/files#diff-f4d4b51574b378a8c372345ea48875834a4eadacfac33fa4d0ceca1e0ef96b35">+31/-26</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>mod.rs</strong><dd><code>Add service_account_enabled to
API config</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/handler/http/request/status/mod.rs

<ul><li>Added <code>service_account_enabled</code> field to
<code>ConfigResponse</code><br> <li> Initialized field from
<code>dex_cfg</code> or default value<br> <li> Updated API response to
include new config flag</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9704/files#diff-ca09c9c9b020049bdbc3382c466bfcca80daac92e98760d9a9a76172abf34049">+7/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>useEnterpriseRoutes.ts</strong><dd><code>Guard
serviceAccounts route by configuration</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

web/src/composables/shared/useEnterpriseRoutes.ts

<ul><li>Added guard to check <code>service_account_enabled</code>
flag<br> <li> Redirect disabled serviceAccounts route to users page</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9704/files#diff-962367ed3d329e73232da2c262cf10c60b14820dd43e95e94302cdcb2f080cbe">+10/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>IdentityAccessManagement.vue</strong><dd><code>Filter
IAM tabs based on service_account_enabled</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/views/IdentityAccessManagement.vue

<ul><li>Imported <code>computed</code> to dynamically filter tabs<br>
<li> Replaced static <code>tabs</code> ref with computed filtering on
config<br> <li> Hid serviceAccounts tab when feature disabled</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9704/files#diff-60b63024c98ee8927e12f9ebec93e99ba7ff419038cfe1cc57d49de1f6f342d6">+16/-3</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-01-22 11:00:57 +05:30
..
2023-02-02 09:03:11 +05:30
2025-12-04 13:58:09 +05:30
2023-08-06 01:29:13 +08:00
2023-02-02 09:03:11 +05:30
2023-02-02 09:03:11 +05:30
2024-04-03 12:49:25 +05:30

web

This template should help get you started developing with Vue 3 in Vite.

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

For stand-alone UI development environment, create .env file and which contains below environment variable

VITE_OPENOBSERVE_ENDPOINT=http://localhost:5080/
npm run dev

Type-Check, Compile and Minify for Production

npm run build

Run Unit Tests with Vitest

npm run test:unit

Run End-to-End Tests with Cypress

npm run test:e2e:dev

This runs the end-to-end tests against the Vite development server. It is much faster than the production build.

But it's still recommended to test the production build with test:e2e before deploying (e.g. in CI environments):

npm run build
npm run test:e2e

Lint with ESLint

npm run lint