-
Notifications
You must be signed in to change notification settings - Fork 263
feat: encrypted secrets in transit for settings API #3060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
8dd26d8
feat: add encrypted secrets in transit for settings API
openhands-agent 385ee87
chore: remove RemoteWorkspace settings methods (deferred to follow-up)
openhands-agent 8598e40
fix: decrypt secrets in StartConversationRequest when secrets_encrypt…
openhands-agent 29488c4
test: add unit tests for encrypted secrets feature
openhands-agent 3cd1c35
fix: address review feedback for encrypted secrets feature
openhands-agent 4d9e4a9
docs: clarify authentication model in settings endpoint docstring
openhands-agent 5527f61
fix: address PR review feedback for encrypted secrets
openhands-agent 8d8b6c4
chore: fix pre-commit formatting issues
openhands-agent b9e34eb
fix: address PR review feedback for settings API security
openhands-agent 444e189
style: fix pre-commit formatting issues
openhands-agent dd3d55d
fix: add type: ignore for intentional type error tests
openhands-agent 7fb15e9
fix: shorten comment to fix line length
openhands-agent e741e60
fix: address PR review feedback - atomicity, error handling, and tests
openhands-agent 013d081
fix: type assertion for api_key in test to satisfy pyright
openhands-agent 93ca458
fix: consolidate SECRET_NAME_PATTERN and add live server test
openhands-agent bcf3c91
docs: add inline comments explaining 'from None' security rationale
openhands-agent d2f2dc0
feat: add settings and secrets API example
openhands-agent 73308e3
chore: Remove PR-only artifacts [automated]
7b9d014
refactor: remove def main nesting from settings example
openhands-agent 1453121
feat: add real agent session to settings/secrets API example
openhands-agent 1d62e8d
feat: use REST API to start conversation with encrypted secrets
openhands-agent fa84627
refactor: simplify by using encrypted_llm directly from settings
openhands-agent 4722817
fix: set OH_SECRET_KEY to enable encrypted secrets feature
openhands-agent 7623968
fix: use correct endpoint /api/conversations/{id} for polling
openhands-agent baeb77d
refactor: use LookupSecret for conversation secrets
openhands-agent c3434bf
fix: set TMUX_TMPDIR to avoid socket path length issues on macOS
openhands-agent f94b748
feat: support optional LLM_BASE_URL environment variable
openhands-agent 72b8b2f
fix: use agent_final_response endpoint instead of non-existent execute
openhands-agent 9e932a7
fix: handle None metrics in conversation response
openhands-agent b56e7c8
fix: use stats.usage_to_metrics for accumulated cost
openhands-agent eee11d6
simplify task
malhotra5 5f2ecd5
style: fix formatting
openhands-agent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
369 changes: 369 additions & 0 deletions
369
examples/02_remote_agent_server/12_settings_and_secrets_api.py
Large diffs are not rendered by default.
Oops, something went wrong.
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
43 changes: 43 additions & 0 deletions
43
openhands-agent-server/openhands/agent_server/persistence/__init__.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| """Persistence module for settings and secrets storage.""" | ||
|
|
||
| from openhands.agent_server.persistence.models import ( | ||
| SECRET_NAME_PATTERN, | ||
| CustomSecret, | ||
| CustomSecretCreate, | ||
| CustomSecretResponse, | ||
| PersistedSettings, | ||
| Secrets, | ||
| SecretsResponse, | ||
| SettingsUpdatePayload, | ||
| ) | ||
| from openhands.agent_server.persistence.store import ( | ||
| FileSecretsStore, | ||
| FileSettingsStore, | ||
| SecretsStore, | ||
| SettingsStore, | ||
| get_secrets_store, | ||
| get_settings_store, | ||
| reset_stores, | ||
| ) | ||
|
|
||
|
|
||
| __all__ = [ | ||
| # Constants | ||
| "SECRET_NAME_PATTERN", | ||
| # Models | ||
| "CustomSecret", | ||
| "CustomSecretCreate", | ||
| "CustomSecretResponse", | ||
| "PersistedSettings", | ||
| "Secrets", | ||
| "SecretsResponse", | ||
| "SettingsUpdatePayload", | ||
| # Stores | ||
| "FileSecretsStore", | ||
| "FileSettingsStore", | ||
| "SecretsStore", | ||
| "SettingsStore", | ||
| "get_secrets_store", | ||
| "get_settings_store", | ||
| "reset_stores", | ||
| ] |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.