UNPKG

n8n-nodes-arubaclearpass

Version:

n8n community node for Aruba ClearPass API integration with comprehensive identity, policy, and enforcement profile management

340 lines (339 loc) 12.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.serverCertProperties = exports.serverCertFields = exports.serverCertOperations = void 0; exports.serverCertOperations = { displayName: 'Operation', name: 'operation', type: 'options', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], }, }, options: [ { name: 'Disable', value: 'disable', description: 'Disable a server certificate for a service (by server UUID and service name)', action: 'Disable a server certificate', }, { name: 'Enable', value: 'enable', description: 'Enable a server certificate for a service (by server UUID and service name)', action: 'Enable a server certificate', }, { name: 'Get By Service ID', value: 'getByServiceId', description: 'Get the certificate assigned to a service by numeric service ID', action: 'Get server certificate by service ID', }, { name: 'Get By Service Name', value: 'getByServiceName', description: 'Get the certificate assigned to a service by server UUID and service name', action: 'Get server certificate by service name', }, { name: 'List', value: 'list', description: 'Get all server certificate assignments across all services', action: 'List server certificate assignments', }, { name: 'Replace By Service ID', value: 'replaceByServiceId', description: 'Assign a certificate to a service by numeric service ID (RADIUS=1, HTTPS(RSA)=7, HTTPS(ECC)=2, RadSec=21)', action: 'Replace server certificate by service ID', }, { name: 'Replace By Service Name', value: 'replaceByServiceName', description: 'Assign a certificate to a service by server UUID and service name', action: 'Replace server certificate by service name', }, ], default: 'list', }; exports.serverCertFields = [ // Service ID for ID-based operations { displayName: 'Service', name: 'serviceId', type: 'options', required: true, default: '7', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['getByServiceId', 'replaceByServiceId'], }, }, options: [ { name: 'RADIUS (1)', value: '1' }, { name: 'HTTPS - ECC (2)', value: '2' }, { name: 'HTTPS - RSA (7)', value: '7' }, { name: 'RadSec (21)', value: '21' }, { name: 'Database (106)', value: '106' }, ], description: 'ClearPass service to retrieve or replace the certificate for', }, // Server UUID for name-based operations { displayName: 'Server UUID', name: 'serverUuid', type: 'string', required: true, default: '', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['getByServiceName', 'replaceByServiceName', 'enable', 'disable'], }, }, typeOptions: { expressionsEnabled: true, }, description: 'UUID of the ClearPass server node — this is NOT the certificate ID. Find it in the ClearPass Admin UI under Administration → Server Manager → Server Configuration, or from the "server_uuid" field in the List operation response.', hint: 'Looks like xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. If you only see integer IDs from the List operation, check the full JSON output for a server_uuid field.', }, // Service Name for name-based operations { displayName: 'Service Name', name: 'serviceName', type: 'options', required: true, default: 'RADIUS', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['getByServiceName', 'replaceByServiceName', 'enable', 'disable'], }, }, options: [ { name: 'RADIUS', value: 'RADIUS' }, { name: 'HTTPS (RSA)', value: 'HTTPS(RSA)' }, { name: 'HTTPS (ECC)', value: 'HTTPS(ECC)' }, { name: 'RadSec', value: 'RadSec' }, ], description: 'Name of the ClearPass service to manage the certificate for', }, // Certificate input mode selector { displayName: 'Certificate Input Mode', name: 'certInputMode', type: 'options', default: 'pkcs12', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceId'], }, }, options: [ { name: 'PKCS12 / PFX File', value: 'pkcs12', description: 'Upload a .p12 or .pfx bundle containing the certificate and private key', }, { name: 'Certificate and Private Key Files', value: 'certAndKey', description: 'Upload a PEM certificate file and a separate private key file', }, { name: 'URL', value: 'url', description: 'Provide a URL for ClearPass to download the certificate from', }, ], description: 'How to supply the certificate to ClearPass', }, // PKCS12 mode: binary field + passphrase { displayName: 'PKCS12 / PFX Binary Field', name: 'pkcs12BinaryProperty', type: 'string', default: 'data', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceId'], certInputMode: ['pkcs12'], }, }, description: 'Name of the binary property holding the .p12 or .pfx file (from a Form Trigger or HTTP Request node)', hint: 'This is the field name of the file input on your form, not the file name itself', }, { displayName: 'PKCS12 Passphrase', name: 'pkcs12_passphrase', type: 'string', typeOptions: { password: true }, default: '', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceId'], certInputMode: ['pkcs12'], }, }, description: 'Passphrase protecting the PKCS12 bundle (leave blank if none)', }, // Cert + Key mode: two binary fields + key password { displayName: 'Certificate File Binary Field', name: 'certBinaryProperty', type: 'string', default: 'data', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceId'], certInputMode: ['certAndKey'], }, }, description: 'Name of the binary property holding the PEM certificate file (.crt / .pem)', hint: 'This is the field name of the certificate file input on your form', }, { displayName: 'Private Key File Binary Field', name: 'keyBinaryProperty', type: 'string', default: 'data', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceId'], certInputMode: ['certAndKey'], }, }, description: 'Name of the binary property holding the PEM private key file (.key)', hint: 'This is the field name of the private key file input on your form', }, { displayName: 'Private Key Password', name: 'private_key_password', type: 'string', typeOptions: { password: true }, default: '', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceId'], certInputMode: ['certAndKey'], }, }, description: 'Password protecting the private key file (leave blank if none)', }, // URL mode: certificate_url or pkcs12_file_url + passphrase { displayName: 'Certificate URL', name: 'certificate_url', type: 'string', default: '', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceId'], certInputMode: ['url'], }, }, typeOptions: { expressionsEnabled: true }, description: 'URL from which ClearPass will download the PEM certificate file', }, { displayName: 'PKCS12 File URL', name: 'pkcs12_file_url', type: 'string', default: '', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceId'], certInputMode: ['url'], }, }, typeOptions: { expressionsEnabled: true }, description: 'URL from which ClearPass will download the PKCS12 (.pfx/.p12) certificate bundle', }, { displayName: 'URL PKCS12 Passphrase', name: 'url_pkcs12_passphrase', type: 'string', typeOptions: { password: true }, default: '', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceId'], certInputMode: ['url'], }, }, description: 'Passphrase protecting the PKCS12 bundle at the URL (leave blank if none)', }, // replaceByServiceName: URL-only (ClearPass PUT endpoint does not accept cert_file/binary uploads, // only certificate_url or pkcs12_file_url+pkcs12_passphrase per the API spec) { displayName: 'Certificate URL', name: 'certificate_url_byname', type: 'string', default: '', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceName'], }, }, typeOptions: { expressionsEnabled: true }, description: 'URL from which ClearPass will download the PEM certificate file. Provide this OR PKCS12 File URL — not both.', hint: 'ClearPass must be able to reach this URL. Direct file upload is not supported by this endpoint.', }, { displayName: 'PKCS12 File URL', name: 'pkcs12_file_url_byname', type: 'string', default: '', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceName'], }, }, typeOptions: { expressionsEnabled: true }, description: 'URL from which ClearPass will download the PKCS12 (.pfx/.p12) certificate bundle. Provide this OR Certificate URL — not both.', hint: 'ClearPass must be able to reach this URL. Direct file upload is not supported by this endpoint.', }, { displayName: 'PKCS12 Passphrase', name: 'pkcs12_passphrase_byname', type: 'string', typeOptions: { password: true }, default: '', displayOptions: { show: { domain: ['PlatformCertificates'], resource: ['ServerCert'], operation: ['replaceByServiceName'], }, }, description: 'Passphrase protecting the PKCS12 bundle (leave blank if none)', }, ]; exports.serverCertProperties = [exports.serverCertOperations, ...exports.serverCertFields];