mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 01:06:23 +02:00
feat: implement token encryption and state management for OAuth connectors
- Added encryption for sensitive tokens (access token, refresh token, client secret) in Google Calendar, Google Drive, Gmail, Linear, and Notion connectors to enhance security. - Introduced OAuthStateManager for secure state parameter generation and validation, improving the integrity of OAuth flows. - Updated callback routes to handle state validation and error management, ensuring robust handling of authorization processes. - Enhanced indexers to support decryption of tokens for backward compatibility, maintaining functionality with existing encrypted credentials. - Improved validation for date parameters in connector routes to ensure proper input handling.
This commit is contained in:
parent
ec7599362d
commit
45489423d1
17 changed files with 1140 additions and 152 deletions
|
|
@ -514,16 +514,6 @@ def validate_connector_config(
|
|||
"validators": {},
|
||||
},
|
||||
"SLACK_CONNECTOR": {"required": ["SLACK_BOT_TOKEN"], "validators": {}},
|
||||
"NOTION_CONNECTOR": {
|
||||
"required": ["access_token"], # OAuth-based only
|
||||
"optional": [
|
||||
"workspace_id", # OAuth fields
|
||||
"workspace_name",
|
||||
"workspace_icon",
|
||||
"bot_id",
|
||||
],
|
||||
"validators": {},
|
||||
},
|
||||
"GITHUB_CONNECTOR": {
|
||||
"required": ["GITHUB_PAT", "repo_full_names"],
|
||||
"validators": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue