Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4534ad5
Issue 593: Move framework to a single directory - .NET part
Nov 13, 2009
a72796e
Issue 593: Move framework to a single directory - .NET part
Nov 13, 2009
bf37e1e
Issue 593: Move framework to a single directory - Java part
Nov 13, 2009
6728c42
Use 'Last changed Rev' for revision part of version in dotnet builds.…
Dec 14, 2009
2602056
Issue 606: Test operation fails with bad error message when period is…
Dec 17, 2009
be1e694
issue #609: Add Rename Group support for AD Connector
Dec 23, 2009
cb22e9a
Issue #622: Support for Exchange 2010
Mar 5, 2010
5f46781
Issue #633: Method not found error while initializing Exchange connector
Mar 31, 2010
2bf8565
Replace the precoded framework directory dll path with OPENICF_HOME e…
May 31, 2011
e5311bf
OPENICF-24 CR-422 AD Connector releases the allocated memory properly
May 29, 2012
76935d4
Fixes the NPE issue with large groups (> 1500 members) OPENIDM-598 an…
GaelAllioux Jun 20, 2012
f46ac1e
Small refactoring of the search to avoid calling 'count' on SearchRes…
GaelAllioux Aug 10, 2012
97b392a
Fix the broken default schema
Aug 14, 2012
9affabc
fixes the OPENICF-35 Read of AD Group without members fails
GaelAllioux Aug 21, 2012
cbf6855
OPENICF-37 - Fix the ActiveDirectoryConnector and ExchangeConnector p…
Aug 26, 2012
f0402bc
CR1414 - fixes OPENICF-44 and OPENICF-92
GaelAllioux Mar 14, 2013
514cb4b
CR-1427 OPENICF-94 OPENICF-92
GaelAllioux Mar 15, 2013
6930086
CR-1443 OPENICF-42
GaelAllioux Mar 19, 2013
7d84c23
RDN attribute should not be CREATABLE/UPDATEABLE
GaelAllioux Mar 21, 2013
2699af4
Updated Copyright
GaelAllioux Mar 25, 2013
dcb1837
CR-1580 OPENICF-100 fixes compilation issue
GaelAllioux Apr 19, 2013
1006985
OPENICF-182 / CR-3097 – Update the AD Connector to use OpenICF 1.4 API
Feb 25, 2014
765122c
OPENICF-215 Spaces removed from DN during normalization if preceded b…
cgdrake Apr 17, 2014
1514efe
Fix failing build job because of compilation error
May 1, 2014
328982c
CR-3758 OPENICF-182 AD connector does not work with ICF 1.4
GaelAllioux Jun 12, 2014
9f5eadc
CR-3479 OPENICF-225 NOT operator
GaelAllioux Jun 12, 2014
4f8370e
CR-3827 / OPENICF-243 – There is typo problem in the methods name
Jun 20, 2014
2a544e5
Update the project version after release
Jun 26, 2014
d8e34ae
CR-4033 OPENICF-262
GaelAllioux Jul 18, 2014
73fc17a
CR-4094 / OPENICF-269 - Add the 'legal-notices' folder with necessary…
Jul 30, 2014
8773c9e
OPENICF-129 OPENICF-314 FR-446 Allow updates to the sAMAccountName an…
cgdrake Oct 27, 2014
e19aef6
OPENICF-88 CR-5045 Fix OverflowException thrown when setting __PASSWO…
cgdrake Oct 28, 2014
f91a9bc
Move to dotnet-connector/
vharseko Jul 2, 2024
c633277
Merge remote-tracking branch 'openicf-dotnet-connector/master'
vharseko Jul 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
/*
* ====================
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of the Common Development
* and Distribution License("CDDL") (the "License"). You may not use this file
* except in compliance with the License.
*
* You can obtain a copy of the License at
* http://IdentityConnectors.dev.java.net/legal/license.txt
* See the License for the specific language governing permissions and limitations
* under the License.
*
* When distributing the Covered Code, include this CDDL Header Notice in each file
* and include the License file at identityconnectors/legal/license.txt.
* If applicable, add the following below this CDDL Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
* ====================
*/
using System;
using System.Text;
using Org.IdentityConnectors.Framework.Spi;
using Org.IdentityConnectors.Framework.Common.Exceptions;
using Org.IdentityConnectors.Framework.Spi.Operations;

namespace Org.IdentityConnectors.ActiveDirectory
{
public class ActiveDirectoryConfiguration : Org.IdentityConnectors.Framework.Spi.AbstractConfiguration
{
[ConfigurationProperty(Confidential = false, DisplayMessageKey = "display_DirectoryAdminName",
Required = true, HelpMessageKey = "help_DirectoryAdminName", Order = 1)]
public String DirectoryAdminName
{ get; set; }

[ConfigurationProperty(Confidential = true, DisplayMessageKey = "display_DirectoryAdminPassword",
Required = true, HelpMessageKey = "help_DirectoryAdminPassword", Order = 2)]
public String DirectoryAdminPassword
{ get; set; }

[ConfigurationProperty(Confidential = false, DisplayMessageKey = "display_ObjectClass", HelpMessageKey = "help_ObjectClass", Order = 3)]
public String ObjectClass
{ get; set; }

[ConfigurationProperty(Confidential = false, DisplayMessageKey = "display_Container",
Required=true, HelpMessageKey = "help_Container", Order = 4)]
public String Container
{ get; set; }

[ConfigurationProperty(Confidential = false, DisplayMessageKey = "display_CreateHomeDirectory", HelpMessageKey = "help_CreateHomeDirectory", Order = 5)]
public bool CreateHomeDirectory { get; set; }

[ConfigurationProperty(Confidential = false, DisplayMessageKey = "display_LDAPHostName", HelpMessageKey = "help_LDAPHostName", Order = 6)]
public String LDAPHostName
{ get; set; }

[ConfigurationProperty(Confidential = false, DisplayMessageKey = "display_SearchChildDomains", HelpMessageKey = "help_SearchChildDomains", Order = 7)]
public bool SearchChildDomains { get; set; }

[ConfigurationProperty(Confidential = false, DisplayMessageKey = "display_domainName",
Required = true, HelpMessageKey = "help_domainName", Order = 8)]
public String DomainName
{ get; set; }

[ConfigurationProperty(OperationTypes = new Type[] { typeof(SyncOp) }, Confidential = false, DisplayMessageKey = "display_SyncGlobalCatalogServer", HelpMessageKey = "help_SyncGlobalCatalogServer", Order = 9)]
public String SyncGlobalCatalogServer
{ get; set; }

[ConfigurationProperty(OperationTypes = new Type[] { typeof(SyncOp) }, Confidential = false, DisplayMessageKey = "display_SyncDomainController", HelpMessageKey = "help_SyncDomainController", Order=10)]
public String SyncDomainController
{ get; set; }

private string _searchContext = string.Empty;
[ConfigurationProperty(Confidential = false, DisplayMessageKey = "display_SearchContext", HelpMessageKey = "help_SearchContext", Order=11)]
public String SearchContext
{
get
{
if((_searchContext == null) || (_searchContext.Length == 0))
{
return Container;
}
return _searchContext;
}

set
{
_searchContext = value;
}
}

public ActiveDirectoryConfiguration()
{
DomainName = "";
Container = "";
DirectoryAdminName = "administrator";
ObjectClass = "User";
CreateHomeDirectory = true;
SearchChildDomains = false;
LDAPHostName = "";
}

/// <summary>
/// Determines if the configuration is valid.
/// </summary>
/// <remarks>See <see cref="Org.IdentityConnectors.Framework.Spi.Configuration"/> for the definition of a valid
/// configuration.</remarks>
/// <exception cref="Org.IdentityConnectors.Framework.Common.Exceptions.ConfigurationException"/>
/// Thrown when the configuration is not valid.</exception>
public override void Validate()
{
var message = new StringBuilder();

Boolean foundError = false;

// can't lookup the schema without the domain name
if ((DomainName == null) || (DomainName.Length == 0))
{
message.Append(ConnectorMessages.Format(
"confReqParam_domainName", "Domain name not supplied "));
foundError = true;
}

if ((DirectoryAdminName == null) || (DirectoryAdminName.Length == 0))
{
message.Append(ConnectorMessages.Format(
"confReqParam_adminName", "Directory administrator name not supplied "));
foundError = true;
}

if ((DirectoryAdminPassword == null) || (DirectoryAdminPassword.Length == 0))
{
message.Append(ConnectorMessages.Format(
"confReqParam_adminPass", "Directory administrator password not supplied "));
foundError = true;
}

if ((ObjectClass == null) || (ObjectClass.Length == 0))
{
message.Append(ConnectorMessages.Format(
"confReqParam_objClass", "ObjectClass was not supplied "));
foundError = true;
}

if (string.IsNullOrEmpty(Container))
{
message.Append(ConnectorMessages.Format(
"confReqParam_Container", "Container was not supplied "));
foundError = true;
}
else
{
if (!ActiveDirectoryUtils.IsValidDn(Container))
{
message.Append( ConnectorMessages.Format(
"confParam_Container_invalid_path", @"Container '{0}' could not be recognized as a distinguished name (DN) ", Container ) );
foundError = true;
}
}

if (foundError)
{
throw new ConfigurationException( ConnectorMessages.Format(
"ex_ConfigErrors", "Configuration errors: {0}", message.ToString() ) );
}
}
}
}
Loading