Skip to content

Commit 662350a

Browse files
committed
Merge remote-tracking branch 'upstream/main' into leseb/api-spec-comparison-v2
Signed-off-by: Sébastien Han <seb@redhat.com>
2 parents a14b07d + 58d74f4 commit 662350a

58 files changed

Lines changed: 1883 additions & 1977 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ OGX uses GitHub Actions for Continuous Integration (CI). Below is a table detail
1313
| File Processors Tests | [file-processors-tests.yml](file-processors-tests.yml) | Run file processors integration tests |
1414
| Installer CI | [install-script-ci.yml](install-script-ci.yml) | Test the installation script |
1515
| Integration Auth Tests | [integration-auth-tests.yml](integration-auth-tests.yml) | Run the integration test suite with Kubernetes authentication |
16-
| Integration Responses & Conversations Auth Tests | [integration-responses-conversations-auth-tests.yml](integration-responses-conversations-auth-tests.yml) | Run responses and conversations auth tests with Kubernetes authentication |
16+
| Integration Responses, Conversations & Prompts Auth Tests | [integration-responses-conversations-auth-tests.yml](integration-responses-conversations-auth-tests.yml) | Run responses, conversations, and prompts auth tests with Kubernetes authentication |
1717
| SqlStore Integration Tests | [integration-sql-store-tests.yml](integration-sql-store-tests.yml) | Run the integration test suite with SqlStore |
1818
| Integration Tests (Replay) | [integration-tests.yml](integration-tests.yml) | Run the integration test suites from tests/integration in replay mode |
1919
| Vector IO Integration Tests | [integration-vector-io-tests.yml](integration-vector-io-tests.yml) | Run the integration test suite with various VectorIO providers |

.github/workflows/integration-responses-conversations-auth-tests.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: Integration Responses & Conversations Auth Tests
1+
name: Integration Responses, Conversations & Prompts Auth Tests
22

3-
run-name: Run responses and conversations auth tests with Kubernetes authentication
3+
run-name: Run responses, conversations, and prompts auth tests with Kubernetes authentication
44

55
on:
66
push:
@@ -218,6 +218,16 @@ jobs:
218218
when:
219219
- user is owner
220220
description: Users can access their own responses
221+
- permit:
222+
actions: [create]
223+
resource: sql_record::prompts::*
224+
description: Any authenticated user can create prompts
225+
- permit:
226+
actions: [read, update, delete]
227+
resource: sql_record::prompts::*
228+
when:
229+
- user is owner
230+
description: Users can only access their own prompts
221231
EOF
222232
yq eval '.server.auth.provider_config.type = "${{ matrix.auth-provider }}"' -i "$run_dir/config.yaml"
223233
yq eval '.server.auth.provider_config.tls_cafile = "${{ env.KUBERNETES_CA_CERT_PATH }}"' -i "$run_dir/config.yaml"

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,26 @@ repos:
308308
}
309309
exit 0
310310
311+
- id: enforce-authorized-sqlstore
312+
name: Enforce AuthorizedSqlStore usage
313+
entry: bash
314+
language: system
315+
types: [python]
316+
pass_filenames: false
317+
always_run: true
318+
files: ^src/
319+
args:
320+
- -c
321+
- |
322+
grep -rn --include="*.py" -E 'sqlstore_impl' src/ \
323+
| grep -v 'core/storage/sqlstore/' && {
324+
echo;
325+
echo "❌ Direct sqlstore_impl usage is not allowed outside core/storage/sqlstore/.";
326+
echo "Use authorized_sqlstore() from ogx.core.storage.sqlstore.authorized_sqlstore instead.";
327+
echo;
328+
exit 1;
329+
} || true
330+
311331
- id: check-file-size
312332
name: Check Python file size limit
313333
entry: python scripts/check_file_size.py

ARCHITECTURE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Client (ogx-client SDK or raw HTTP)
2121
FastAPI Server (src/ogx/core/server/server.py)
2222
|
2323
|-- AuthenticationMiddleware (token validation, user extraction)
24-
|-- QuotaMiddleware (rate limiting per client)
2524
|
2625
v
2726
Route Dispatch

0 commit comments

Comments
 (0)