okta-mcp-server
Version:
Model Context Protocol (MCP) server for Okta API operations with support for bulk operations and caching
707 lines • 30.2 kB
JavaScript
export const policyTools = [
{
name: 'listPolicies',
description: 'List Okta policies by type with pagination and filtering. Supports listing password, sign-on, MFA enrollment, IdP discovery, and profile enrollment policy types.',
inputSchema: {
type: 'object',
properties: {
type: {
type: 'string',
enum: ['PASSWORD', 'OKTA_SIGN_ON', 'MFA_ENROLL', 'IDP_DISCOVERY', 'PROFILE_ENROLLMENT'],
description: 'Type of policies to list',
},
status: {
type: 'string',
enum: ['ACTIVE', 'INACTIVE'],
description: 'Filter by policy status',
},
limit: {
type: 'number',
description: 'Number of policies to return per page (1-200)',
default: 20,
minimum: 1,
maximum: 200,
},
after: {
type: 'string',
description: 'Cursor for pagination - use the cursor from previous response to get next page',
},
sortBy: {
type: 'string',
enum: ['name', 'priority', 'created', 'lastUpdated'],
description: 'Field to sort results by',
},
sortOrder: {
type: 'string',
enum: ['asc', 'desc'],
description: 'Sort order',
default: 'asc',
},
filter: {
type: 'string',
description: 'Filter expression for policies',
},
},
required: ['type'],
},
},
{
name: 'getPolicy',
description: 'Get a single Okta policy by ID with optional rule expansion',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID to retrieve',
},
expand: {
type: 'string',
enum: ['rules'],
description: 'Expand embedded resources (e.g., "rules" to include policy rules)',
},
},
required: ['policyId'],
},
},
{
name: 'createPasswordPolicy',
description: 'Create a new password policy with complexity, age, and lockout settings',
inputSchema: {
type: 'object',
properties: {
name: {
type: 'string',
description: 'Policy name',
},
description: {
type: 'string',
description: 'Policy description',
},
priority: {
type: 'number',
description: 'Policy priority (1 is highest)',
minimum: 1,
},
status: {
type: 'string',
enum: ['ACTIVE', 'INACTIVE'],
description: 'Policy status',
default: 'ACTIVE',
},
conditions: {
type: 'object',
description: 'Policy conditions (people, network, authContext)',
},
settings: {
type: 'object',
description: 'Password policy settings',
properties: {
password: {
type: 'object',
properties: {
complexity: {
type: 'object',
properties: {
minLength: { type: 'number', minimum: 4, maximum: 100 },
minLowerCase: { type: 'number', minimum: 0, maximum: 10 },
minUpperCase: { type: 'number', minimum: 0, maximum: 10 },
minNumber: { type: 'number', minimum: 0, maximum: 10 },
minSymbol: { type: 'number', minimum: 0, maximum: 10 },
excludeUsername: { type: 'boolean' },
excludeFirstName: { type: 'boolean' },
excludeLastName: { type: 'boolean' },
excludeAttributes: { type: 'array', items: { type: 'string' } },
dictionary: {
type: 'object',
properties: {
common: {
type: 'object',
properties: {
exclude: { type: 'boolean' },
},
},
},
},
},
},
age: {
type: 'object',
properties: {
maxAgeDays: { type: 'number', minimum: 0, maximum: 999 },
expireWarnDays: { type: 'number', minimum: 0, maximum: 999 },
minAgeMinutes: { type: 'number', minimum: 0 },
historyCount: { type: 'number', minimum: 0, maximum: 24 },
},
},
lockout: {
type: 'object',
properties: {
maxAttempts: { type: 'number', minimum: 0, maximum: 100 },
autoUnlockMinutes: { type: 'number', minimum: 0, maximum: 99999 },
showLockoutFailures: { type: 'boolean' },
userLockoutNotificationChannels: {
type: 'array',
items: { type: 'string', enum: ['EMAIL', 'SMS'] },
},
},
},
},
},
recovery: {
type: 'object',
properties: {
factors: {
type: 'object',
properties: {
recovery_question: {
type: 'object',
properties: {
status: { type: 'string', enum: ['ACTIVE', 'INACTIVE'] },
properties: {
type: 'object',
properties: {
complexity: {
type: 'object',
properties: {
minLength: { type: 'number', minimum: 1, maximum: 100 },
},
},
},
},
},
},
okta_email: {
type: 'object',
properties: {
status: { type: 'string', enum: ['ACTIVE', 'INACTIVE'] },
properties: {
type: 'object',
properties: {
recoveryToken: {
type: 'object',
properties: {
tokenLifetimeMinutes: {
type: 'number',
minimum: 5,
maximum: 10080,
},
},
},
},
},
},
},
okta_sms: {
type: 'object',
properties: {
status: { type: 'string', enum: ['ACTIVE', 'INACTIVE'] },
},
},
okta_call: {
type: 'object',
properties: {
status: { type: 'string', enum: ['ACTIVE', 'INACTIVE'] },
},
},
},
},
},
},
delegation: {
type: 'object',
properties: {
options: {
type: 'object',
properties: {
skipUnlock: { type: 'boolean' },
},
},
},
},
},
},
},
required: ['name'],
},
},
{
name: 'createSignOnPolicy',
description: 'Create a new sign-on policy with authentication and session settings',
inputSchema: {
type: 'object',
properties: {
name: {
type: 'string',
description: 'Policy name',
},
description: {
type: 'string',
description: 'Policy description',
},
priority: {
type: 'number',
description: 'Policy priority (1 is highest)',
minimum: 1,
},
status: {
type: 'string',
enum: ['ACTIVE', 'INACTIVE'],
description: 'Policy status',
default: 'ACTIVE',
},
conditions: {
type: 'object',
description: 'Policy conditions (people, network, authContext, app, platform)',
},
settings: {
type: 'object',
description: 'Sign-on policy settings',
properties: {
signon: {
type: 'object',
properties: {
access: { type: 'string', enum: ['ALLOW', 'DENY'] },
requireFactor: { type: 'boolean' },
factorMode: { type: 'string', enum: ['1FA', '2FA'] },
factorPromptMode: { type: 'string', enum: ['ALWAYS', 'DEVICE', 'SESSION'] },
factorLifetime: { type: 'number', minimum: 0 },
session: {
type: 'object',
properties: {
usePersistentCookie: { type: 'boolean' },
maxSessionIdleMinutes: { type: 'number', minimum: 5, maximum: 2628000 },
maxSessionLifetimeMinutes: { type: 'number', minimum: 5, maximum: 2628000 },
},
},
},
},
},
},
},
required: ['name'],
},
},
{
name: 'createMfaPolicy',
description: 'Create a new multi-factor authentication (MFA) enrollment policy',
inputSchema: {
type: 'object',
properties: {
name: {
type: 'string',
description: 'Policy name',
},
description: {
type: 'string',
description: 'Policy description',
},
priority: {
type: 'number',
description: 'Policy priority (1 is highest)',
minimum: 1,
},
status: {
type: 'string',
enum: ['ACTIVE', 'INACTIVE'],
description: 'Policy status',
default: 'ACTIVE',
},
conditions: {
type: 'object',
description: 'Policy conditions (people, network)',
},
settings: {
type: 'object',
description: 'MFA policy settings',
properties: {
factors: {
type: 'object',
description: 'Factor settings',
properties: {
okta_verify: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
okta_sms: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
okta_voice: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
okta_email: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
google_otp: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
fido_webauthn: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
fido_u2f: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
rsa_token: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
symantec_vip: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
duo: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
hotp: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
question: {
type: 'object',
properties: {
status: {
type: 'string',
enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP', 'INACTIVE'],
},
enroll: { type: 'string', enum: ['REQUIRED', 'OPTIONAL', 'NOT_SETUP'] },
},
},
},
},
},
},
},
required: ['name'],
},
},
{
name: 'updatePolicy',
description: 'Update an existing Okta policy',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID to update',
},
name: {
type: 'string',
description: 'Policy name',
},
description: {
type: 'string',
description: 'Policy description',
},
priority: {
type: 'number',
description: 'Policy priority (1 is highest)',
minimum: 1,
},
status: {
type: 'string',
enum: ['ACTIVE', 'INACTIVE'],
description: 'Policy status',
},
conditions: {
type: 'object',
description: 'Policy conditions',
},
settings: {
type: 'object',
description: 'Policy-specific settings (varies by policy type)',
},
},
required: ['policyId'],
},
},
{
name: 'deletePolicy',
description: 'Delete an Okta policy',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID to delete',
},
},
required: ['policyId'],
},
},
{
name: 'activatePolicy',
description: 'Activate an inactive Okta policy',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID to activate',
},
},
required: ['policyId'],
},
},
{
name: 'deactivatePolicy',
description: 'Deactivate an active Okta policy',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID to deactivate',
},
},
required: ['policyId'],
},
},
{
name: 'listPolicyRules',
description: 'List rules for a specific Okta policy',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID to list rules for',
},
limit: {
type: 'number',
description: 'Number of rules to return per page (1-200)',
default: 20,
minimum: 1,
maximum: 200,
},
after: {
type: 'string',
description: 'Cursor for pagination',
},
},
required: ['policyId'],
},
},
{
name: 'getPolicyRule',
description: 'Get a specific rule from an Okta policy',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID',
},
ruleId: {
type: 'string',
description: 'Rule ID to retrieve',
},
},
required: ['policyId', 'ruleId'],
},
},
{
name: 'createPolicyRule',
description: 'Create a new rule for an Okta policy',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID to add rule to',
},
name: {
type: 'string',
description: 'Rule name',
},
priority: {
type: 'number',
description: 'Rule priority (1 is highest)',
minimum: 1,
},
status: {
type: 'string',
enum: ['ACTIVE', 'INACTIVE'],
description: 'Rule status',
default: 'ACTIVE',
},
conditions: {
type: 'object',
description: 'Rule conditions',
},
actions: {
type: 'object',
description: 'Rule actions (varies by policy type)',
},
},
required: ['policyId', 'name', 'actions'],
},
},
{
name: 'updatePolicyRule',
description: 'Update an existing rule in an Okta policy',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID',
},
ruleId: {
type: 'string',
description: 'Rule ID to update',
},
name: {
type: 'string',
description: 'Rule name',
},
priority: {
type: 'number',
description: 'Rule priority (1 is highest)',
minimum: 1,
},
status: {
type: 'string',
enum: ['ACTIVE', 'INACTIVE'],
description: 'Rule status',
},
conditions: {
type: 'object',
description: 'Rule conditions',
},
actions: {
type: 'object',
description: 'Rule actions',
},
},
required: ['policyId', 'ruleId'],
},
},
{
name: 'deletePolicyRule',
description: 'Delete a rule from an Okta policy',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID',
},
ruleId: {
type: 'string',
description: 'Rule ID to delete',
},
},
required: ['policyId', 'ruleId'],
},
},
{
name: 'activatePolicyRule',
description: 'Activate an inactive rule in an Okta policy',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID',
},
ruleId: {
type: 'string',
description: 'Rule ID to activate',
},
},
required: ['policyId', 'ruleId'],
},
},
{
name: 'deactivatePolicyRule',
description: 'Deactivate an active rule in an Okta policy',
inputSchema: {
type: 'object',
properties: {
policyId: {
type: 'string',
description: 'Policy ID',
},
ruleId: {
type: 'string',
description: 'Rule ID to deactivate',
},
},
required: ['policyId', 'ruleId'],
},
},
];
//# sourceMappingURL=definitions.js.map