feat(providers): make profiles authoritative - #2962
Conversation
|
🌿 Preview your docs: https://nvidia-preview-pr-2962.docs.buildwithfern.com/openshell |
Closes #1988 Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
a096026 to
60598bc
Compare
PR Review StatusThe current head is a patch-identical rebase of the already-reviewed change, so no additional code review is needed and no blocking Gator findings remain. The required current-head E2E workflow is queued and running, so pipeline monitoring can resume. Blocking findings:
Carried findings:
Gator metadata
|
There was a problem hiding this comment.
Global-profile updates resolve against a workspace shadow
Before this PR, provider updates retained the provider scope already selected by the stored record. With authoritative profiles, a provider created with --global-profile persists profile_workspace == "", which the server interprets as platform scope. In provider_update, the OIDC branch replaces that empty scope with the current workspace, and the --from-existing branch always passes workspace instead of the persisted existing.profile_workspace. When the workspace shadows the same profile ID, discovery or OIDC subject-token inference uses the workspace profile while the gateway validates and runs the provider against the platform profile. A valid global-provider update can therefore fail with misleading credential errors or select credentials from the wrong profile.
Please resolve both update paths using the persisted profile scope and add a regression with same-ID platform and workspace profiles.
There was a problem hiding this comment.
Profile deletion can orphan newly created providers
Before this PR, profileless providers were a supported model. This PR makes profiles authoritative for every new provider record, but handle_delete_provider_profile checks only sandboxes that currently attach the profile. An administrator can create a provider from a custom profile, delete that profile while the provider is unattached, and then attach the orphaned provider: attachment validates that the provider record exists, but the missing profile contributes no provider-owned policy or endpoint binding. That recreates a new profileless provider through supported operations and bypasses the authoritative-profile invariant.
Please reject deletion while any provider record in the applicable scope references the profile, and synchronize create versus delete so the check cannot race; alternatively, reject later attachment while preserving compatibility only for genuine pre-migration records. Add a create, delete-profile, then attach regression.
Summary
Make provider profiles authoritative for new provider creation and discovery, removing the Providers v2 compatibility switch and legacy public provider workflows.
Related Issue
Closes #1988
Changes
providers_v2_enabledand always composes attached profile policy for sandbox-scoped policiesopenaiandanthropicprofiles and retires publicgeneric,gitlab,opencode, andoutlookselection/discoveryTesting
mise run cimise run testmise run e2e:rustmise run e2e:python(89 passed, 84 skipped)mise run docs:build:strictcargo test --manifest-path e2e/rust/Cargo.toml --all-features --no-runcargo test --manifest-path examples/governance-interceptor/Cargo.tomlChecklist