n8n-nodes-arubaclearpass
Version:
n8n community node for Aruba ClearPass API integration with comprehensive identity, policy, and enforcement profile management
196 lines (195 loc) • 5.81 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serviceCertProperties = exports.serviceCertFields = exports.serviceCertOperations = void 0;
exports.serviceCertOperations = {
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
domain: ['PlatformCertificates'],
resource: ['ServiceCert'],
},
},
options: [
{
name: 'Delete',
value: 'delete',
description: 'Delete a service certificate by ID',
action: 'Delete a service certificate',
},
{
name: 'Get',
value: 'get',
description: 'Get a service certificate by ID',
action: 'Get a service certificate',
},
{
name: 'List',
value: 'list',
description: 'Get a list of all service certificates',
action: 'List service certificates',
},
{
name: 'Upload',
value: 'upload',
description: 'Upload/add a new service certificate via URL',
action: 'Upload a service certificate',
},
],
default: 'list',
};
exports.serviceCertFields = [
// ID field for get / delete
{
displayName: 'Service Cert ID',
name: 'serviceCertId',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
domain: ['PlatformCertificates'],
resource: ['ServiceCert'],
operation: ['get', 'delete'],
},
},
typeOptions: {
expressionsEnabled: true,
},
description: 'The numeric ID of the service certificate',
},
// Upload — Certificate URL
{
displayName: 'Certificate URL',
name: 'certificate_url',
type: 'string',
default: '',
displayOptions: {
show: {
domain: ['PlatformCertificates'],
resource: ['ServiceCert'],
operation: ['upload'],
},
},
typeOptions: {
expressionsEnabled: true,
},
description: 'URL from which ClearPass will download the PEM certificate file (use this OR PKCS12 URL)',
},
// Upload — PKCS12 URL
{
displayName: 'PKCS12 File URL',
name: 'pkcs12_file_url',
type: 'string',
default: '',
displayOptions: {
show: {
domain: ['PlatformCertificates'],
resource: ['ServiceCert'],
operation: ['upload'],
},
},
typeOptions: {
expressionsEnabled: true,
},
description: 'URL from which ClearPass will download the PKCS12 (.pfx/.p12) certificate bundle',
},
// Upload — PKCS12 passphrase
{
displayName: 'PKCS12 Passphrase',
name: 'pkcs12_passphrase',
type: 'string',
typeOptions: {
password: true,
expressionsEnabled: true,
},
default: '',
displayOptions: {
show: {
domain: ['PlatformCertificates'],
resource: ['ServiceCert'],
operation: ['upload'],
},
},
description: 'Passphrase protecting the PKCS12 certificate bundle',
},
// List — Return All
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
domain: ['PlatformCertificates'],
resource: ['ServiceCert'],
operation: ['list'],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
},
// List — Limit
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
domain: ['PlatformCertificates'],
resource: ['ServiceCert'],
operation: ['list'],
returnAll: [false],
},
},
typeOptions: {
minValue: 1,
maxValue: 1000,
},
default: 100,
description: 'Max number of results to return',
},
// List — Filters
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Filter',
default: {},
displayOptions: {
show: {
domain: ['PlatformCertificates'],
resource: ['ServiceCert'],
operation: ['list'],
},
},
options: [
{
displayName: 'Filter',
name: 'filter',
type: 'string',
default: '',
description: 'JSON filter expression specifying the items to return',
placeholder: '{"service_name": "RADIUS"}',
typeOptions: {
alwaysOpenEditWindow: true,
},
},
{
displayName: 'Sort',
name: 'sort',
type: 'string',
default: '+id',
description: 'Sort ordering for returned items (default +id)',
},
{
displayName: 'Calculate Count',
name: 'calculate_count',
type: 'boolean',
default: false,
description: 'Whether to calculate the total item count',
},
],
},
];
exports.serviceCertProperties = [exports.serviceCertOperations, ...exports.serviceCertFields];