Repository navigation
FEAT: Let users pick a server credential for a target (part 19) - #4070
Open
varunj-msft wants to merge 269 commits into
Open
varunj-msft wants to merge 269 commits into
varunj-msft wants to merge 269 commits into
Conversation
…benchmark's recipes folder
…reports an unknown attack type
… its Entra ID default
# Conflicts: # pyrit/prompt_target/azure_blob_storage_target.py
# Conflicts: # frontend/e2e/explicit-targets.seeded.spec.ts # frontend/src/components/Config/CreateTargetDialog.test.tsx # frontend/src/components/Config/CreateTargetDialog.tsx
# Conflicts: # tests/unit/backend/test_temporary_components.py
The runtime status keeps its short summary. The restore log now also lists each field's full location and message, escaped, without the stored values, and with URL credentials removed. Credentials are removed before a location is shortened, so the summary can't keep part of one either.
# Conflicts: # pyrit/registry/registry_recipe_storage.py
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.
Description
This is one of the changes for saving Registry entries across restarts. Until the earlier PRs merge, the diff here also shows their changes.
A saved target can't hold a key, so a target that needs an API key could only be Temporary. An administrator can now list keys from the server's environment that users pick by name, each tied to the only endpoint it is sent to.
.pyrit_conftakesserver_credentials: a list of entries with anameusers pick, theenv_varthat holds the key, and theendpointthe key is sent to. Each name can be listed once. The endpoint must be a full http(s) address with no user name, password, query or fragment.GET /api/targets/typeslists each credential's name and endpoint for the types that can use one (the OpenAI targets for now), never the variable or the key.POST /api/targetstakes"server_credential": "<name>"withauth_modeapi_keyand noapi_keyof its own, and not withsource(422 otherwise). The key is used only when the target's endpoint is the credential's endpoint, compared with the scheme and host lowercased and a default port and trailing slash removed. A credential that isn't listed or set, or another endpoint, gets a 400..pyrit_conf_example,doc/getting_started/pyrit_conf.md, the backend README and the GUI doc describe the setting. They say to list a variable that holds only that key: a variable a target reads on its own, such asOPENAI_CHAT_KEY, can still reach any endpoint through a Temporary target created without a key.What stays the same: without
server_credentialsin.pyrit_conf, nothing changes; the types list has empty lists and the dialog offers no new choice. A typed key still makes a Temporary target, and a Temporary target without a key still uses this server's own key variable, as the backend README describes.Screenshots: the New Target dialog with Server credential chosen, and the saved target in the Targets table.


Not covered: