-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(servicenow): update servicenow block to use basic auth instead of oauth #2435
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR successfully migrates ServiceNow integration from OAuth to basic authentication with username/password credentials. Key Changes
Architecture ImprovementsThe migration simplifies the authentication flow significantly by removing the complex OAuth abstraction that didn't fit ServiceNow's multi-instance model well. Basic auth is a cleaner fit since users need to authenticate against their specific ServiceNow instance. Credentials HandlingThe implementation correctly uses The previous OAuth security concerns raised in earlier threads (storing credentials in cookies, passing them via URL parameters) have been completely eliminated since those routes and flows no longer exist. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant WorkflowUI as Workflow UI
participant ServiceNowBlock as ServiceNow Block
participant Tool as ServiceNow Tool
participant Utils as Auth Utils
participant API as ServiceNow API
User->>WorkflowUI: Configure ServiceNow block
WorkflowUI->>User: Show username/password fields
User->>WorkflowUI: Enter instanceUrl, username, password
User->>WorkflowUI: Execute workflow
WorkflowUI->>ServiceNowBlock: Trigger with params
ServiceNowBlock->>Tool: Call tool (create/read/update/delete)
Tool->>Tool: Validate instanceUrl, username, password
Tool->>Utils: createBasicAuthHeader(username, password)
Utils->>Utils: Base64 encode credentials
Utils->>Tool: Return "Basic {encoded}"
Tool->>API: HTTP request with Authorization header
API->>API: Validate credentials
API->>Tool: Return response
Tool->>ServiceNowBlock: Return formatted result
ServiceNowBlock->>WorkflowUI: Return output
WorkflowUI->>User: Display result
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
apps/sim/app/api/auth/servicenow/authorize/route.ts, line 179-192 (link)logic: added validation for credentials in JavaScript, but validation happens after credentials are already exposed in the URL - they're already logged by this point
move to POST endpoint to prevent credential exposure in URLs and logs
9 files reviewed, 8 comments
...itor/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx
Outdated
Show resolved
Hide resolved
e6096c4 to
68bb7ac
Compare
68bb7ac to
724882a
Compare
Summary
Type of Change
Testing
Tested manually
Checklist