UNPKG

@pulumi/juniper-mist

Version:

A Pulumi package for creating and managing Juniper Mist resources.

210 lines 10.7 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Nacidp = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * This resource manages NAC IDPs (Identity Providers). * * The NAC IDPs are used to validate NAC client accounts against an IDP with OAuth2.0, LDAP/LDAPS, or a local Mist Edge.\ * Mist Access Assurance can also retrieve group membership from the IDP, and use this information in the NAC Rules (`junipermist.org.Nacrule` resource) * * IMPORTANT: * * Once created, the NAC IDP must be registered in the `junipermist.org.Setting` resource (full path: `mist_org_setting.mist_nac.idps`). * * The associated REALMS are configured under `mist_org_setting.mist_nac.idps` * * To make the IDP the Default IDP, set the IDP ID under `mist_org_setting.mist_nac.default_idp_id` * * For SAML IDP, the NAC IDP Metadata can be retrieved with the `junipermist.org.getNacidpMetadata` data source. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as junipermist from "@pulumi/juniper-mist"; * * // OAuth with Azure Example * const idpAzure = new junipermist.org.Nacidp("idp_azure", { * orgId: terraformTest.id, * name: "idp_azure", * idpType: "oauth", * oauthCcClientId: "client_id", * oauthCcClientSecret: "-----BEGIN CERTIFICATE-----MIIF0jC .../fSCGx7-----END CERTIFICATE-----", * oauthRopcClientId: "ropc_client_id", * oauthRopcClientSecret: "ropc_client_secret", * oauthTenantId: "tenant_id", * oauthType: "azure", * }); * // Custom LDAP Example * const idpLdap = new junipermist.org.Nacidp("idp_ldap", { * orgId: terraformTest.id, * name: "idp_ldap", * idpType: "ldap", * ldapType: "custom", * groupFilter: "memberOf", * memberFilter: "memberOf", * ldapUserFilter: "(mail=%s)", * ldapServerHosts: [ * "ldap.mycorp.com", * "1.2.3.4", * ], * ldapBaseDn: "DC=abc,DC=com", * ldapBindDn: "CN=admin,CN=users,DC=abc,DC=com", * ldapBindPassword: "secret!password", * ldapCacerts: [ * `-----BEGIN CERTIFICATE----- * MIIFZjCCA06gAwIBAgIIP61/1qm/uDowDQYJKoZIhvcNAQELBQE * -----END CERTIFICATE-----`, * `-----BEGIN CERTIFICATE----- * BhMCRVMxFDASBgNVBAoMC1N0YXJ0Q29tIENBMSwwKgYDVn-----END CERTIFICATE-----`, * ], * ldapClientCert: `-----BEGIN CERTIFICATE----- * MIIFZjCCA06gAwIBAgIIP61/1qm/uDowDQYJKoZIhvcNAQELBQE * -----END CERTIFICATE-----`, * ldapClientKey: "-----BEGIN PRI...", * }); * ``` * * ## Import * * Using `pulumi import`, import `junipermist.org.Nacidp` with: * Org PSK can be imported by specifying the orgId and the nacidpId * * ```sh * $ pulumi import junipermist:org/nacidp:Nacidp idp_azure 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309 * ``` */ class Nacidp extends pulumi.CustomResource { /** * Get an existing Nacidp resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new Nacidp(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'junipermist:org/nacidp:Nacidp'; /** * Returns true if the given object is an instance of Nacidp. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Nacidp.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["groupFilter"] = state?.groupFilter; resourceInputs["idpType"] = state?.idpType; resourceInputs["ldapBaseDn"] = state?.ldapBaseDn; resourceInputs["ldapBindDn"] = state?.ldapBindDn; resourceInputs["ldapBindPassword"] = state?.ldapBindPassword; resourceInputs["ldapCacerts"] = state?.ldapCacerts; resourceInputs["ldapClientCert"] = state?.ldapClientCert; resourceInputs["ldapClientKey"] = state?.ldapClientKey; resourceInputs["ldapGroupAttr"] = state?.ldapGroupAttr; resourceInputs["ldapGroupDn"] = state?.ldapGroupDn; resourceInputs["ldapResolveGroups"] = state?.ldapResolveGroups; resourceInputs["ldapServerHosts"] = state?.ldapServerHosts; resourceInputs["ldapType"] = state?.ldapType; resourceInputs["ldapUserFilter"] = state?.ldapUserFilter; resourceInputs["memberFilter"] = state?.memberFilter; resourceInputs["name"] = state?.name; resourceInputs["oauthCcClientId"] = state?.oauthCcClientId; resourceInputs["oauthCcClientSecret"] = state?.oauthCcClientSecret; resourceInputs["oauthDiscoveryUrl"] = state?.oauthDiscoveryUrl; resourceInputs["oauthPingIdentityRegion"] = state?.oauthPingIdentityRegion; resourceInputs["oauthProviderDomain"] = state?.oauthProviderDomain; resourceInputs["oauthRopcClientId"] = state?.oauthRopcClientId; resourceInputs["oauthRopcClientSecret"] = state?.oauthRopcClientSecret; resourceInputs["oauthTenantId"] = state?.oauthTenantId; resourceInputs["oauthType"] = state?.oauthType; resourceInputs["openroamingSsids"] = state?.openroamingSsids; resourceInputs["openroamingWbaClientCert"] = state?.openroamingWbaClientCert; resourceInputs["openroamingWbaClientKey"] = state?.openroamingWbaClientKey; resourceInputs["orgId"] = state?.orgId; resourceInputs["scimEnabled"] = state?.scimEnabled; resourceInputs["scimSecretToken"] = state?.scimSecretToken; } else { const args = argsOrState; if (args?.idpType === undefined && !opts.urn) { throw new Error("Missing required property 'idpType'"); } if (args?.orgId === undefined && !opts.urn) { throw new Error("Missing required property 'orgId'"); } resourceInputs["groupFilter"] = args?.groupFilter; resourceInputs["idpType"] = args?.idpType; resourceInputs["ldapBaseDn"] = args?.ldapBaseDn; resourceInputs["ldapBindDn"] = args?.ldapBindDn; resourceInputs["ldapBindPassword"] = args?.ldapBindPassword; resourceInputs["ldapCacerts"] = args?.ldapCacerts; resourceInputs["ldapClientCert"] = args?.ldapClientCert; resourceInputs["ldapClientKey"] = args?.ldapClientKey; resourceInputs["ldapGroupAttr"] = args?.ldapGroupAttr; resourceInputs["ldapGroupDn"] = args?.ldapGroupDn; resourceInputs["ldapResolveGroups"] = args?.ldapResolveGroups; resourceInputs["ldapServerHosts"] = args?.ldapServerHosts; resourceInputs["ldapType"] = args?.ldapType; resourceInputs["ldapUserFilter"] = args?.ldapUserFilter; resourceInputs["memberFilter"] = args?.memberFilter; resourceInputs["name"] = args?.name; resourceInputs["oauthCcClientId"] = args?.oauthCcClientId; resourceInputs["oauthCcClientSecret"] = args?.oauthCcClientSecret ? pulumi.secret(args.oauthCcClientSecret) : undefined; resourceInputs["oauthDiscoveryUrl"] = args?.oauthDiscoveryUrl; resourceInputs["oauthPingIdentityRegion"] = args?.oauthPingIdentityRegion; resourceInputs["oauthProviderDomain"] = args?.oauthProviderDomain; resourceInputs["oauthRopcClientId"] = args?.oauthRopcClientId; resourceInputs["oauthRopcClientSecret"] = args?.oauthRopcClientSecret ? pulumi.secret(args.oauthRopcClientSecret) : undefined; resourceInputs["oauthTenantId"] = args?.oauthTenantId; resourceInputs["oauthType"] = args?.oauthType; resourceInputs["openroamingSsids"] = args?.openroamingSsids; resourceInputs["openroamingWbaClientCert"] = args?.openroamingWbaClientCert ? pulumi.secret(args.openroamingWbaClientCert) : undefined; resourceInputs["openroamingWbaClientKey"] = args?.openroamingWbaClientKey ? pulumi.secret(args.openroamingWbaClientKey) : undefined; resourceInputs["orgId"] = args?.orgId; resourceInputs["scimEnabled"] = args?.scimEnabled; resourceInputs["scimSecretToken"] = args?.scimSecretToken ? pulumi.secret(args.scimSecretToken) : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["oauthCcClientSecret", "oauthRopcClientSecret", "openroamingWbaClientCert", "openroamingWbaClientKey", "scimSecretToken"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Nacidp.__pulumiType, name, resourceInputs, opts); } } exports.Nacidp = Nacidp; //# sourceMappingURL=nacidp.js.map