Freigeben über


Add-AzHDInsightSecurityProfile

Fügt einem Clusterkonfigurationsobjekt ein Sicherheitsprofil hinzu.

Syntax

Add-AzHDInsightSecurityProfile
   [-Config] <AzureHDInsightConfig>
   -DomainResourceId <String>
   -DomainUserCredential <PSCredential>
   [-OrganizationalUnitDN <String>]
   -LdapsUrls <String[]>
   [-ClusterUsersGroupDNs <String[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Beschreibung

Sicherheitsprofil wird verwendet, um einen sicheren Cluster zu erstellen, indem es kerberisiert wird. Sicherheitsprofil enthält konfigurationsbezogene Verknüpfungen mit dem Cluster zu Active Directory-Domäne.

Beispiele

Beispiel 1: Hinzufügen eines Sicherheitsprofils zum Clusterkonfigurationsobjekt

#Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name $storageAccountName)[0].value

$storageContainer = "container001"

# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-001"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:
#   New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

#Security profile info
$domain="sampledomain.onmicrosoft.com"
$domainUser="sample.user@sampledomain.onmicrosoft.com"
$domainPassword=ConvertTo-SecureString "domainPassword" -AsPlainText -Force
$domainUserCredential=New-Object System.Management.Automation.PSCredential($domainUser, $domainPassword)
$organizationalUnitDN="ou=testunitdn"
$ldapsUrls=("ldaps://sampledomain.onmicrosoft.com:636","ldaps://sampledomain.onmicrosoft.com:389")
$clusterUsersGroupDNs=("groupdn1","groupdn2")

# Create the cluster
New-AzHDInsightClusterConfig `
            | Add-AzHDInsightSecurityProfile `
                -DomainResourceId $domain `
                -DomainUserCredential $domainUserCredential `
                -OrganizationalUnitDN $organizationalUnitDN `
                -LdapsUrls $ldapsUrls `
                -ClusterUsersGroupDNs $clusterUsersGroupDNs `
            | New-AzHDInsightCluster `
                -ClusterType Spark `
                -OSType Linux `
                -ClusterSizeInNodes 4 `
                -ResourceGroupName $clusterResourceGroupName `
                -ClusterName $clusterName `
                -HttpCredential $clusterCreds `
                -Location $location `
                -StorageAccountResourceId $storageAccountResourceId `
                -StorageAccountKey $storageAccountKey `
                -StorageContainer $storageContainer

Mit diesem Befehl wird dem Cluster mit dem Namen "your-hadoop-001" ein Sicherheitsprofilwert hinzugefügt.

Parameter

-ClusterUsersGroupDNs

Distinguished names of the Active Directory groups that will be available in Ambari and Ranger

Typ:String[]
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-Config

Gibt das HDInsight-Clusterkonfigurationsobjekt an, das dieses Cmdlet ändert. Dieses Objekt wird vom Cmdlet New-AzHDInsightClusterConfig erstellt.

Typ:AzureHDInsightConfig
Position:0
Standardwert:None
Erforderlich:True
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Hiermit werden Sie vor der Ausführung des Cmdlets zur Bestätigung aufgefordert.

Typ:SwitchParameter
Aliases:cf
Position:Named
Standardwert:False
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure

Typ:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-DomainResourceId

Active Directory Standard Ressourcen-ID für den Cluster.

Typ:String
Position:Named
Standardwert:None
Erforderlich:True
Accept pipeline input:False
Accept wildcard characters:False

-DomainUserCredential

Eine do Standard Benutzerkontoanmeldeinformationen mit ausreichenden Berechtigungen zum Erstellen des Clusters. Der Benutzername sollte im user@do Standard Format vorliegen.

Typ:PSCredential
Position:Named
Standardwert:None
Erforderlich:True
Accept pipeline input:False
Accept wildcard characters:False

-LdapsUrls

URLs eines oder mehrerer LDAPS-Server für active Directory

Typ:String[]
Position:Named
Standardwert:None
Erforderlich:True
Accept pipeline input:False
Accept wildcard characters:False

-OrganizationalUnitDN

Distinguished name of the organizational unit in the Active directory where user and computer accounts will be created

Typ:String
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Typ:SwitchParameter
Aliases:wi
Position:Named
Standardwert:False
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

Eingaben

AzureHDInsightConfig

Ausgaben

AzureHDInsightSecurityProfile