Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,6 @@ testing/e2e/logs/

# Cached checkout of sibling docs sources (e.g. cargo-gears) for `make docs-preview`
.web-docs-sources/

# Superpowers brainstorming/spec scratch (local design docs; not tracked)
docs/superpowers/
19 changes: 18 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions config/e2e-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@ gears:
config:
vendor: "constructorfabric"

credstore:
database:
server: "sqlite_users"
file: "credstore.db"
config:
# Gateway selects its value-store backend plugin by GTS vendor;
# must match static-credstore-plugin (default "constructorfabric").
vendor: "constructorfabric"

static-credstore-plugin:
config:
secrets:
Expand Down
9 changes: 9 additions & 0 deletions config/e2e-scope-enforcement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ logging:
file_level: debug

gears:
credstore:
database:
server: "sqlite_users"
file: "credstore.db"
config:
# Gateway selects its value-store backend plugin by GTS vendor;
# must match static-credstore-plugin (default "constructorfabric").
vendor: "constructorfabric"

api-gateway:
config:
bind_addr: "0.0.0.0:8086"
Expand Down
9 changes: 9 additions & 0 deletions config/e2e-tr-authz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ gears:
config:
vendor: "constructorfabric"

credstore:
database:
server: "sqlite_users"
file: "credstore.db"
config:
# Gateway selects its value-store backend plugin by GTS vendor;
# must match static-credstore-plugin (default "constructorfabric").
vendor: "constructorfabric"

static-credstore-plugin:
config:
secrets:
Expand Down
9 changes: 9 additions & 0 deletions config/mini-chat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ gears:
config:
max_field_length: 100

credstore:
database:
server: "sqlite_mini_chat"
file: "credstore.db"
config:
# Gateway selects its value-store backend plugin by GTS vendor;
# must match static-credstore-plugin (default "constructorfabric").
vendor: "constructorfabric"

static-credstore-plugin:
config:
secrets:
Expand Down
9 changes: 9 additions & 0 deletions config/quickstart-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@ gears:
parent_id: "00000000-0000-0000-0000-000000000011"
status: active

credstore:
database:
server: "sqlite_users"
file: "credstore.db"
config:
# Gateway selects its value-store backend plugin by GTS vendor;
# must match static-credstore-plugin (default "constructorfabric").
vendor: "constructorfabric"

static-credstore-plugin:
config:
secrets:
Expand Down
32 changes: 25 additions & 7 deletions config/quickstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,33 @@ gears:
parent_id: "00000000-0000-0000-0000-000000000005"
status: active

credstore:
database:
server: "sqlite_users"
file: "credstore.db"
config:
# Gateway selects its value-store backend plugin by GTS vendor;
# must match static-credstore-plugin (default "constructorfabric").
vendor: "constructorfabric"

static-credstore-plugin:
# Value-store backend for the credstore gateway (selected by the `vendor`
# above). With the stateful gateway a secret is reachable only once a
# metadata row exists in the credstore DB, and that row is created by
# writing the secret THROUGH the gateway API. A config-only static seed here
# has no metadata row, so it is no longer resolvable on its own — provision
# the provider keys at runtime instead, e.g.:
#
# curl -X PUT localhost:8080/cf/credstore/v1/secrets/openai-key \
# -H 'content-type: application/json' \
# -H 'authorization: Bearer <token>' \
# -d '{"value":"sk-...","sharing":"tenant"}'
Comment on lines +350 to +353

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Incorrect port in the curl example comment.

The example curl command uses localhost:8080, but the api-gateway in this config binds to 127.0.0.1:8087 (Line 91) with prefix_path: "/cf" (Line 94). Users following this example will get a connection refused.

📝 Proposed fix for the curl example port
-    #   curl -X PUT localhost:8080/cf/credstore/v1/secrets/openai-key \
+    #   curl -X PUT localhost:8087/cf/credstore/v1/secrets/openai-key \
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# curl -X PUT localhost:8080/cf/credstore/v1/secrets/openai-key \
# -H 'content-type: application/json' \
# -H 'authorization: Bearer <token>' \
# -d '{"value":"sk-...","sharing":"tenant"}'
# curl -X PUT localhost:8087/cf/credstore/v1/secrets/openai-key \
# -H 'content-type: application/json' \
# -H 'authorization: Bearer <token>' \
# -d '{"value":"sk-...","sharing":"tenant"}'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/quickstart.yaml` around lines 350 - 353, The curl example comment uses
the wrong gateway port, so update the example to match the api-gateway
configuration that binds at 127.0.0.1:8087 with the /cf prefix. Fix the
commented command near the secrets example so users hit the same endpoint as the
configured api-gateway, and keep the path consistent with
cf/credstore/v1/secrets/openai-key.

#
# mini-chat registers its OAGW upstreams at boot and retries in the
# background (with backoff, no restart needed) until the referenced secret
# (`openai-key`, and `azure-openai-key` if enabled above) is provisioned.
config:
secrets:
- tenant_id: "00000000-df51-5b42-9538-d2b56b7ee953"
key: "openai-key"
value: "sk-test-e2e-fake-key"
- tenant_id: "00000000-df51-5b42-9538-d2b56b7ee953"
key: "azure-openai-key"
value: "REPLACE_WITH_AZURE_KEY"
secrets: []

file-storage:
# SQLite backend — no Postgres required for local / quickstart runs.
Expand Down
9 changes: 9 additions & 0 deletions config/static-tenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ database:
max_conns: 5

gears:
credstore:
database:
server: "sqlite_test"
file: "credstore.db"
config:
# Gateway selects its value-store backend plugin by GTS vendor;
# must match static-credstore-plugin (default "constructorfabric").
vendor: "constructorfabric"

Comment thread
coderabbitai[bot] marked this conversation as resolved.
api-gateway:
config:
bind_addr: "127.0.0.1:8087"
Expand Down
Loading
Loading