Repository navigation
fix(profiles): let the profile form make a credentialed endpoint - #149
Open
Gkrumbach07 wants to merge 1 commit into
Open
Gkrumbach07 wants to merge 1 commit into
Gkrumbach07 wants to merge 1 commit into
Conversation
The gateway refuses a credentialed profile endpoint that is L4 only unless it sets allow_uninspected_credentials, and refuses an inspected protocol without an access preset or rules. The Create provider profile form sent host and port only, so a profile with a credential and an endpoint could never be created from it. Each endpoint row now picks REST, WebSocket or not inspected (L4). An inspected protocol carries an access preset; L4 offers the allow-uninspected opt-out and warns when credentials would be refused. The form sends networkEndpoints in the gateway's spelling. A host with a scheme, a path, a space or a trailing slash is refused before it is sent: the gateway's lint accepts `api.example.com/`, and such a host never matches a request. Fixes ai-openshell#148 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Gage Krumbach <gkrumbac@redhat.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #148.
Problem
The Create provider profile form couldn't create a profile with both a credential and a network endpoint. The form sent only host and port. The gateway refuses a credentialed endpoint that is L4 only:
Change
In
CreateProfileModal, each endpoint row now has a protocol:api.example.com/, and a host like that never matches a request.networkEndpoints(protojson, the gateway's spelling) instead of the host/portendpointsform. There's no BFF change.The layout overlap mentioned in #148 didn't reproduce on
mainat 1400 or 900 px wide, so this PR doesn't touch it.Testing
make gateway): gateway lint refuses L4 with no allow, refuses REST with no access, and accepts REST + access, L4 + allow, and a trailing-slash host. Through the UI, I created a REST/Read-write profile and an L4 + allow profile; both were stored as sent, then deleted.CreateProfileModal.spec.tsx(default and chosen preset, L4 warning and opt-out, no warning without credentials, three bad hosts). The full frontend suite passes (2184), along with eslint, prettier andtsc.🤖 Generated with Claude Code