@pulumi/juniper-mist
Version:
A Pulumi package for creating and managing Juniper Mist resources.
178 lines • 8.47 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Nacidp = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = 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 `mist_org_nacidp` with:
*
* Org PSK can be imported by specifying the org_id and the nacidp_id
*
* ```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 });
}
/**
* 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["oauthRopcClientId"] = state?.oauthRopcClientId;
resourceInputs["oauthRopcClientSecret"] = state?.oauthRopcClientSecret;
resourceInputs["oauthTenantId"] = state?.oauthTenantId;
resourceInputs["oauthType"] = state?.oauthType;
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;
resourceInputs["oauthDiscoveryUrl"] = args?.oauthDiscoveryUrl;
resourceInputs["oauthPingIdentityRegion"] = args?.oauthPingIdentityRegion;
resourceInputs["oauthRopcClientId"] = args?.oauthRopcClientId;
resourceInputs["oauthRopcClientSecret"] = args?.oauthRopcClientSecret;
resourceInputs["oauthTenantId"] = args?.oauthTenantId;
resourceInputs["oauthType"] = args?.oauthType;
resourceInputs["orgId"] = args?.orgId;
resourceInputs["scimEnabled"] = args?.scimEnabled;
resourceInputs["scimSecretToken"] = args?.scimSecretToken;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Nacidp.__pulumiType, name, resourceInputs, opts);
}
}
exports.Nacidp = Nacidp;
/** @internal */
Nacidp.__pulumiType = 'junipermist:org/nacidp:Nacidp';
//# sourceMappingURL=nacidp.js.map