snow-flow 8.39.2 → 8.39.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp/servicenow-mcp-unified/shared/permission-validator.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/shared/types.d.ts +1 -1
- package/dist/mcp/servicenow-mcp-unified/shared/types.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/index.d.ts +6 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/index.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/index.js +19 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/index.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_email_logs.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_email_logs.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_email_logs.js +185 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_email_logs.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_flow_execution_logs.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_flow_execution_logs.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_flow_execution_logs.js +280 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_flow_execution_logs.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_inbound_http_logs.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_inbound_http_logs.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_inbound_http_logs.js +233 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_inbound_http_logs.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_outbound_http_logs.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_outbound_http_logs.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_outbound_http_logs.js +218 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_outbound_http_logs.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_scheduled_job_logs.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_scheduled_job_logs.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_scheduled_job_logs.js +276 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_scheduled_job_logs.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_slow_queries.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_slow_queries.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_slow_queries.js +340 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_get_slow_queries.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/index.d.ts +10 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/index.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/integration/index.js +34 -1
- package/dist/mcp/servicenow-mcp-unified/tools/integration/index.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_configure_mid_server.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_configure_mid_server.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_configure_mid_server.js +397 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_configure_mid_server.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_connection_alias.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_connection_alias.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_connection_alias.js +234 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_connection_alias.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_credential_alias.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_credential_alias.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_credential_alias.js +280 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_credential_alias.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_flow_action.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_flow_action.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_flow_action.js +358 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_flow_action.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_oauth_profile.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_oauth_profile.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_oauth_profile.js +237 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_create_oauth_profile.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_install_spoke.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_install_spoke.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_install_spoke.js +326 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_install_spoke.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_mid_capabilities.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_mid_capabilities.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_mid_capabilities.js +442 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_mid_capabilities.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_oauth_tokens.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_oauth_tokens.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_oauth_tokens.js +348 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_oauth_tokens.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_spoke_connection.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_spoke_connection.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_spoke_connection.js +427 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_spoke_connection.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_test_mid_connectivity.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_test_mid_connectivity.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_test_mid_connectivity.js +432 -0
- package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_test_mid_connectivity.js.map +1 -0
- package/dist/templates/agents-md-template.d.ts +2 -2
- package/dist/templates/agents-md-template.d.ts.map +1 -1
- package/dist/templates/agents-md-template.js +57 -2
- package/dist/templates/agents-md-template.js.map +1 -1
- package/dist/templates/claude-md-template.d.ts +2 -2
- package/dist/templates/claude-md-template.d.ts.map +1 -1
- package/dist/templates/claude-md-template.js +17 -1
- package/dist/templates/claude-md-template.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* snow_manage_oauth_tokens - Manage OAuth tokens for integrations
|
|
4
|
+
*
|
|
5
|
+
* View, refresh, and manage OAuth tokens for external integrations.
|
|
6
|
+
* Check token status, force refresh, and troubleshoot authentication issues.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.author = exports.version = exports.toolDefinition = void 0;
|
|
10
|
+
exports.execute = execute;
|
|
11
|
+
const auth_js_1 = require("../../shared/auth.js");
|
|
12
|
+
const error_handler_js_1 = require("../../shared/error-handler.js");
|
|
13
|
+
exports.toolDefinition = {
|
|
14
|
+
name: 'snow_manage_oauth_tokens',
|
|
15
|
+
description: 'Manage OAuth tokens: view status, refresh tokens, troubleshoot authentication issues',
|
|
16
|
+
category: 'integration',
|
|
17
|
+
subcategory: 'oauth',
|
|
18
|
+
use_cases: ['oauth', 'tokens', 'authentication', 'troubleshooting'],
|
|
19
|
+
complexity: 'intermediate',
|
|
20
|
+
frequency: 'medium',
|
|
21
|
+
permission: 'write',
|
|
22
|
+
allowedRoles: ['developer', 'admin'],
|
|
23
|
+
inputSchema: {
|
|
24
|
+
type: 'object',
|
|
25
|
+
properties: {
|
|
26
|
+
action: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
enum: ['list', 'status', 'refresh', 'revoke', 'test'],
|
|
29
|
+
description: 'Action to perform',
|
|
30
|
+
default: 'list'
|
|
31
|
+
},
|
|
32
|
+
oauth_profile_id: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
description: 'sys_id of the OAuth profile (required for status/refresh/revoke/test)'
|
|
35
|
+
},
|
|
36
|
+
oauth_profile_name: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Name of the OAuth profile (alternative to sys_id)'
|
|
39
|
+
},
|
|
40
|
+
include_expired: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
description: 'Include expired tokens in list',
|
|
43
|
+
default: false
|
|
44
|
+
},
|
|
45
|
+
limit: {
|
|
46
|
+
type: 'number',
|
|
47
|
+
description: 'Maximum number of tokens to return',
|
|
48
|
+
default: 50
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
required: ['action']
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
async function execute(args, context) {
|
|
55
|
+
var action = args.action || 'list';
|
|
56
|
+
var oauth_profile_id = args.oauth_profile_id || '';
|
|
57
|
+
var oauth_profile_name = args.oauth_profile_name || '';
|
|
58
|
+
var include_expired = args.include_expired || false;
|
|
59
|
+
var limit = args.limit || 50;
|
|
60
|
+
try {
|
|
61
|
+
var client = await (0, auth_js_1.getAuthenticatedClient)(context);
|
|
62
|
+
// If name provided but not ID, look up the profile
|
|
63
|
+
if (!oauth_profile_id && oauth_profile_name) {
|
|
64
|
+
var profileLookup = await client.get('/api/now/table/oauth_entity_profile', {
|
|
65
|
+
params: {
|
|
66
|
+
sysparm_query: 'nameLIKE' + oauth_profile_name,
|
|
67
|
+
sysparm_limit: 1,
|
|
68
|
+
sysparm_fields: 'sys_id,name'
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
if (profileLookup.data.result && profileLookup.data.result.length > 0) {
|
|
72
|
+
oauth_profile_id = profileLookup.data.result[0].sys_id;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (action === 'list') {
|
|
76
|
+
// List all OAuth profiles and their token status
|
|
77
|
+
var profilesResponse = await client.get('/api/now/table/oauth_entity_profile', {
|
|
78
|
+
params: {
|
|
79
|
+
sysparm_limit: limit,
|
|
80
|
+
sysparm_fields: 'sys_id,name,grant_type,oauth_entity,client_id,token_url,active',
|
|
81
|
+
sysparm_display_value: 'all'
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
var profiles = profilesResponse.data.result || [];
|
|
85
|
+
// Get token information for each profile
|
|
86
|
+
var profilesWithTokens = [];
|
|
87
|
+
for (var i = 0; i < profiles.length; i++) {
|
|
88
|
+
var profile = profiles[i];
|
|
89
|
+
// Query for tokens associated with this profile
|
|
90
|
+
var tokenQuery = 'oauth_entity_profile=' + profile.sys_id;
|
|
91
|
+
if (!include_expired) {
|
|
92
|
+
tokenQuery += '^expires>javascript:gs.now()';
|
|
93
|
+
}
|
|
94
|
+
var tokensResponse = await client.get('/api/now/table/oauth_credential', {
|
|
95
|
+
params: {
|
|
96
|
+
sysparm_query: tokenQuery,
|
|
97
|
+
sysparm_limit: 5,
|
|
98
|
+
sysparm_fields: 'sys_id,expires,token_type,scope,sys_created_on'
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
var tokens = tokensResponse.data.result || [];
|
|
102
|
+
profilesWithTokens.push({
|
|
103
|
+
sys_id: profile.sys_id,
|
|
104
|
+
name: profile.name && profile.name.display_value ? profile.name.display_value : profile.name,
|
|
105
|
+
grant_type: profile.grant_type,
|
|
106
|
+
client_id: profile.client_id,
|
|
107
|
+
active: profile.active === 'true' || profile.active === true,
|
|
108
|
+
token_count: tokens.length,
|
|
109
|
+
tokens: tokens.map(function (t) {
|
|
110
|
+
return {
|
|
111
|
+
sys_id: t.sys_id,
|
|
112
|
+
expires: t.expires,
|
|
113
|
+
token_type: t.token_type,
|
|
114
|
+
scope: t.scope,
|
|
115
|
+
created: t.sys_created_on,
|
|
116
|
+
is_expired: new Date(t.expires) < new Date()
|
|
117
|
+
};
|
|
118
|
+
})
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
return (0, error_handler_js_1.createSuccessResult)({
|
|
122
|
+
action: 'list',
|
|
123
|
+
profiles: profilesWithTokens,
|
|
124
|
+
total_profiles: profilesWithTokens.length,
|
|
125
|
+
summary: {
|
|
126
|
+
with_active_tokens: profilesWithTokens.filter(function (p) {
|
|
127
|
+
return p.tokens.some(function (t) { return !t.is_expired; });
|
|
128
|
+
}).length,
|
|
129
|
+
without_tokens: profilesWithTokens.filter(function (p) {
|
|
130
|
+
return p.token_count === 0;
|
|
131
|
+
}).length
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
else if (action === 'status') {
|
|
136
|
+
if (!oauth_profile_id) {
|
|
137
|
+
return (0, error_handler_js_1.createErrorResult)('oauth_profile_id or oauth_profile_name is required for status action');
|
|
138
|
+
}
|
|
139
|
+
// Get detailed status of a specific OAuth profile
|
|
140
|
+
var profileResponse = await client.get('/api/now/table/oauth_entity_profile/' + oauth_profile_id, {
|
|
141
|
+
params: {
|
|
142
|
+
sysparm_display_value: 'all'
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
var profileData = profileResponse.data.result;
|
|
146
|
+
// Get all tokens for this profile
|
|
147
|
+
var allTokensResponse = await client.get('/api/now/table/oauth_credential', {
|
|
148
|
+
params: {
|
|
149
|
+
sysparm_query: 'oauth_entity_profile=' + oauth_profile_id,
|
|
150
|
+
sysparm_fields: 'sys_id,expires,token_type,scope,sys_created_on,sys_updated_on',
|
|
151
|
+
sysparm_limit: 20
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
var allTokens = allTokensResponse.data.result || [];
|
|
155
|
+
var now = new Date();
|
|
156
|
+
var tokenStats = {
|
|
157
|
+
total: allTokens.length,
|
|
158
|
+
active: 0,
|
|
159
|
+
expired: 0,
|
|
160
|
+
expiring_soon: 0
|
|
161
|
+
};
|
|
162
|
+
allTokens.forEach(function (token) {
|
|
163
|
+
var expiryDate = new Date(token.expires);
|
|
164
|
+
if (expiryDate < now) {
|
|
165
|
+
tokenStats.expired++;
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
tokenStats.active++;
|
|
169
|
+
// Check if expiring within 1 hour
|
|
170
|
+
var oneHourFromNow = new Date(now.getTime() + 60 * 60 * 1000);
|
|
171
|
+
if (expiryDate < oneHourFromNow) {
|
|
172
|
+
tokenStats.expiring_soon++;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
return (0, error_handler_js_1.createSuccessResult)({
|
|
177
|
+
action: 'status',
|
|
178
|
+
profile: {
|
|
179
|
+
sys_id: profileData.sys_id,
|
|
180
|
+
name: profileData.name && profileData.name.display_value ? profileData.name.display_value : profileData.name,
|
|
181
|
+
grant_type: profileData.grant_type,
|
|
182
|
+
client_id: profileData.client_id,
|
|
183
|
+
token_url: profileData.token_url,
|
|
184
|
+
active: profileData.active === 'true' || profileData.active === true
|
|
185
|
+
},
|
|
186
|
+
token_statistics: tokenStats,
|
|
187
|
+
tokens: allTokens.map(function (t) {
|
|
188
|
+
var expiry = new Date(t.expires);
|
|
189
|
+
return {
|
|
190
|
+
sys_id: t.sys_id,
|
|
191
|
+
expires: t.expires,
|
|
192
|
+
expires_in_minutes: Math.round((expiry.getTime() - now.getTime()) / 60000),
|
|
193
|
+
token_type: t.token_type,
|
|
194
|
+
scope: t.scope,
|
|
195
|
+
is_expired: expiry < now,
|
|
196
|
+
is_expiring_soon: expiry < new Date(now.getTime() + 60 * 60 * 1000)
|
|
197
|
+
};
|
|
198
|
+
}),
|
|
199
|
+
health: tokenStats.active > 0 ? 'healthy' : (tokenStats.expired > 0 ? 'needs_refresh' : 'no_tokens')
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
else if (action === 'refresh') {
|
|
203
|
+
if (!oauth_profile_id) {
|
|
204
|
+
return (0, error_handler_js_1.createErrorResult)('oauth_profile_id or oauth_profile_name is required for refresh action');
|
|
205
|
+
}
|
|
206
|
+
// Trigger token refresh via background script
|
|
207
|
+
var refreshScript = `
|
|
208
|
+
var oauth = new sn_auth.GlideOAuthClient();
|
|
209
|
+
var profile = new GlideRecord('oauth_entity_profile');
|
|
210
|
+
if (profile.get(${JSON.stringify(oauth_profile_id)})) {
|
|
211
|
+
var tokenResponse = oauth.getToken(profile.sys_id.toString(), '');
|
|
212
|
+
if (tokenResponse) {
|
|
213
|
+
var token = tokenResponse.getToken();
|
|
214
|
+
if (token) {
|
|
215
|
+
gs.print(JSON.stringify({
|
|
216
|
+
success: true,
|
|
217
|
+
message: 'Token refreshed successfully',
|
|
218
|
+
expires_in: tokenResponse.getExpiresIn()
|
|
219
|
+
}));
|
|
220
|
+
} else {
|
|
221
|
+
gs.print(JSON.stringify({
|
|
222
|
+
success: false,
|
|
223
|
+
message: 'Failed to get token: ' + tokenResponse.getErrorMessage()
|
|
224
|
+
}));
|
|
225
|
+
}
|
|
226
|
+
} else {
|
|
227
|
+
gs.print(JSON.stringify({
|
|
228
|
+
success: false,
|
|
229
|
+
message: 'Token response is null'
|
|
230
|
+
}));
|
|
231
|
+
}
|
|
232
|
+
} else {
|
|
233
|
+
gs.print(JSON.stringify({
|
|
234
|
+
success: false,
|
|
235
|
+
message: 'OAuth profile not found'
|
|
236
|
+
}));
|
|
237
|
+
}
|
|
238
|
+
`;
|
|
239
|
+
var refreshResponse = await client.post('/api/now/table/sys_script_execution', {
|
|
240
|
+
script: refreshScript,
|
|
241
|
+
description: 'Refresh OAuth token for profile: ' + oauth_profile_id
|
|
242
|
+
});
|
|
243
|
+
var refreshOutput = refreshResponse.data.result?.output || '';
|
|
244
|
+
var refreshMatch = refreshOutput.match(/\{[^}]+\}/);
|
|
245
|
+
var refreshResult = refreshMatch ? JSON.parse(refreshMatch[0]) : { success: false, message: 'Unknown error' };
|
|
246
|
+
return (0, error_handler_js_1.createSuccessResult)({
|
|
247
|
+
action: 'refresh',
|
|
248
|
+
profile_id: oauth_profile_id,
|
|
249
|
+
result: refreshResult
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
else if (action === 'revoke') {
|
|
253
|
+
if (!oauth_profile_id) {
|
|
254
|
+
return (0, error_handler_js_1.createErrorResult)('oauth_profile_id or oauth_profile_name is required for revoke action');
|
|
255
|
+
}
|
|
256
|
+
// Revoke/delete tokens for a profile
|
|
257
|
+
var revokeScript = `
|
|
258
|
+
var gr = new GlideRecord('oauth_credential');
|
|
259
|
+
gr.addQuery('oauth_entity_profile', ${JSON.stringify(oauth_profile_id)});
|
|
260
|
+
gr.query();
|
|
261
|
+
var count = 0;
|
|
262
|
+
while (gr.next()) {
|
|
263
|
+
gr.deleteRecord();
|
|
264
|
+
count++;
|
|
265
|
+
}
|
|
266
|
+
gs.print(JSON.stringify({
|
|
267
|
+
success: true,
|
|
268
|
+
tokens_revoked: count
|
|
269
|
+
}));
|
|
270
|
+
`;
|
|
271
|
+
var revokeResponse = await client.post('/api/now/table/sys_script_execution', {
|
|
272
|
+
script: revokeScript,
|
|
273
|
+
description: 'Revoke OAuth tokens for profile: ' + oauth_profile_id
|
|
274
|
+
});
|
|
275
|
+
var revokeOutput = revokeResponse.data.result?.output || '';
|
|
276
|
+
var revokeMatch = revokeOutput.match(/\{[^}]+\}/);
|
|
277
|
+
var revokeResult = revokeMatch ? JSON.parse(revokeMatch[0]) : { success: false, tokens_revoked: 0 };
|
|
278
|
+
return (0, error_handler_js_1.createSuccessResult)({
|
|
279
|
+
action: 'revoke',
|
|
280
|
+
profile_id: oauth_profile_id,
|
|
281
|
+
result: revokeResult
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
else if (action === 'test') {
|
|
285
|
+
if (!oauth_profile_id) {
|
|
286
|
+
return (0, error_handler_js_1.createErrorResult)('oauth_profile_id or oauth_profile_name is required for test action');
|
|
287
|
+
}
|
|
288
|
+
// Test OAuth connectivity
|
|
289
|
+
var testScript = `
|
|
290
|
+
var oauth = new sn_auth.GlideOAuthClient();
|
|
291
|
+
var profile = new GlideRecord('oauth_entity_profile');
|
|
292
|
+
if (profile.get(${JSON.stringify(oauth_profile_id)})) {
|
|
293
|
+
var startTime = new Date().getTime();
|
|
294
|
+
var tokenResponse = oauth.getToken(profile.sys_id.toString(), '');
|
|
295
|
+
var endTime = new Date().getTime();
|
|
296
|
+
|
|
297
|
+
if (tokenResponse) {
|
|
298
|
+
var token = tokenResponse.getToken();
|
|
299
|
+
gs.print(JSON.stringify({
|
|
300
|
+
success: token ? true : false,
|
|
301
|
+
response_time_ms: endTime - startTime,
|
|
302
|
+
has_token: token ? true : false,
|
|
303
|
+
expires_in: tokenResponse.getExpiresIn(),
|
|
304
|
+
error: tokenResponse.getErrorMessage() || null
|
|
305
|
+
}));
|
|
306
|
+
} else {
|
|
307
|
+
gs.print(JSON.stringify({
|
|
308
|
+
success: false,
|
|
309
|
+
response_time_ms: endTime - startTime,
|
|
310
|
+
error: 'No response from OAuth server'
|
|
311
|
+
}));
|
|
312
|
+
}
|
|
313
|
+
} else {
|
|
314
|
+
gs.print(JSON.stringify({
|
|
315
|
+
success: false,
|
|
316
|
+
error: 'OAuth profile not found'
|
|
317
|
+
}));
|
|
318
|
+
}
|
|
319
|
+
`;
|
|
320
|
+
var testResponse = await client.post('/api/now/table/sys_script_execution', {
|
|
321
|
+
script: testScript,
|
|
322
|
+
description: 'Test OAuth profile: ' + oauth_profile_id
|
|
323
|
+
});
|
|
324
|
+
var testOutput = testResponse.data.result?.output || '';
|
|
325
|
+
var testMatch = testOutput.match(/\{[^}]+\}/);
|
|
326
|
+
var testResult = testMatch ? JSON.parse(testMatch[0]) : { success: false, error: 'Unknown error' };
|
|
327
|
+
return (0, error_handler_js_1.createSuccessResult)({
|
|
328
|
+
action: 'test',
|
|
329
|
+
profile_id: oauth_profile_id,
|
|
330
|
+
result: testResult,
|
|
331
|
+
recommendation: testResult.success
|
|
332
|
+
? 'OAuth profile is working correctly'
|
|
333
|
+
: 'Check OAuth profile configuration and credentials'
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
return (0, error_handler_js_1.createErrorResult)('Unknown action: ' + action);
|
|
337
|
+
}
|
|
338
|
+
catch (error) {
|
|
339
|
+
if (error.response?.status === 403) {
|
|
340
|
+
return (0, error_handler_js_1.createErrorResult)('Permission denied (403): Your ServiceNow user lacks permissions to manage OAuth tokens. ' +
|
|
341
|
+
'Required roles: "oauth_admin" or "admin". Please contact your ServiceNow administrator.');
|
|
342
|
+
}
|
|
343
|
+
return (0, error_handler_js_1.createErrorResult)(error.message);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
exports.version = '1.0.0';
|
|
347
|
+
exports.author = 'Snow-Flow Team';
|
|
348
|
+
//# sourceMappingURL=snow_manage_oauth_tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snow_manage_oauth_tokens.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/integration/snow_manage_oauth_tokens.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAiDH,0BAmUC;AAjXD,kDAA8D;AAC9D,oEAAuF;AAE1E,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,sFAAsF;IACnG,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,OAAO;IACpB,SAAS,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,iBAAiB,CAAC;IACnE,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,QAAQ;IAEnB,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;IACpC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;gBACrD,WAAW,EAAE,mBAAmB;gBAChC,OAAO,EAAE,MAAM;aAChB;YACD,gBAAgB,EAAE;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uEAAuE;aACrF;YACD,kBAAkB,EAAE;gBAClB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;aACjE;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,gCAAgC;gBAC7C,OAAO,EAAE,KAAK;aACf;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oCAAoC;gBACjD,OAAO,EAAE,EAAE;aACZ;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;CACF,CAAC;AAEK,KAAK,UAAU,OAAO,CAAC,IAAS,EAAE,OAA0B;IACjE,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,UAAU;gBAClB,cAAc,EAAE,UAAU,CAAC,OAAO;oBAChC,CAAC,CAAC,oCAAoC;oBACtC,CAAC,CAAC,mDAAmD;aACxD,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAA,oCAAiB,EAAC,kBAAkB,GAAG,MAAM,CAAC,CAAC;IAExD,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,IAAI,KAAK,CAAC,QAAQ,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;YACnC,OAAO,IAAA,oCAAiB,EACtB,0FAA0F;gBAC1F,yFAAyF,CAC1F,CAAC;QACJ,CAAC;QACD,OAAO,IAAA,oCAAiB,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* snow_manage_spoke_connection - Manage spoke connection configurations
|
|
3
|
+
*
|
|
4
|
+
* Configure, test, and manage connection settings for IntegrationHub spokes
|
|
5
|
+
* including connection aliases, credentials, and endpoint configurations.
|
|
6
|
+
*/
|
|
7
|
+
import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
|
|
8
|
+
export declare const toolDefinition: MCPToolDefinition;
|
|
9
|
+
export declare function execute(args: any, context: ServiceNowContext): Promise<ToolResult>;
|
|
10
|
+
export declare const version = "1.0.0";
|
|
11
|
+
export declare const author = "Snow-Flow Team";
|
|
12
|
+
//# sourceMappingURL=snow_manage_spoke_connection.d.ts.map
|
package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_manage_spoke_connection.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snow_manage_spoke_connection.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/integration/snow_manage_spoke_connection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAgD5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAoZxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,mBAAmB,CAAC"}
|