001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008 Sun Microsystems, Inc.
025 */
026package org.forgerock.opendj.server.config.meta;
027
028
029
030import org.forgerock.opendj.config.AdministratorAction;
031import org.forgerock.opendj.config.AggregationPropertyDefinition;
032import org.forgerock.opendj.config.AliasDefaultBehaviorProvider;
033import org.forgerock.opendj.config.BooleanPropertyDefinition;
034import org.forgerock.opendj.config.ClassPropertyDefinition;
035import org.forgerock.opendj.config.client.ConcurrentModificationException;
036import org.forgerock.opendj.config.client.ManagedObject;
037import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException;
038import org.forgerock.opendj.config.client.OperationRejectedException;
039import org.forgerock.opendj.config.conditions.Conditions;
040import org.forgerock.opendj.config.DefaultBehaviorProvider;
041import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
042import org.forgerock.opendj.config.EnumPropertyDefinition;
043import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
044import org.forgerock.opendj.config.ManagedObjectDefinition;
045import org.forgerock.opendj.config.PropertyOption;
046import org.forgerock.opendj.config.PropertyProvider;
047import org.forgerock.opendj.config.server.ConfigurationChangeListener;
048import org.forgerock.opendj.config.server.ServerManagedObject;
049import org.forgerock.opendj.config.StringPropertyDefinition;
050import org.forgerock.opendj.config.Tag;
051import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
052import org.forgerock.opendj.ldap.DN;
053import org.forgerock.opendj.ldap.LdapException;
054import org.forgerock.opendj.server.config.client.GSSAPISASLMechanismHandlerCfgClient;
055import org.forgerock.opendj.server.config.client.IdentityMapperCfgClient;
056import org.forgerock.opendj.server.config.server.GSSAPISASLMechanismHandlerCfg;
057import org.forgerock.opendj.server.config.server.IdentityMapperCfg;
058import org.forgerock.opendj.server.config.server.SASLMechanismHandlerCfg;
059
060
061
062/**
063 * An interface for querying the GSSAPI SASL Mechanism Handler managed
064 * object definition meta information.
065 * <p>
066 * The GSSAPI SASL mechanism performs all processing related to SASL
067 * GSSAPI authentication using Kerberos V5.
068 */
069public final class GSSAPISASLMechanismHandlerCfgDefn extends ManagedObjectDefinition<GSSAPISASLMechanismHandlerCfgClient, GSSAPISASLMechanismHandlerCfg> {
070
071  // The singleton configuration definition instance.
072  private static final GSSAPISASLMechanismHandlerCfgDefn INSTANCE = new GSSAPISASLMechanismHandlerCfgDefn();
073
074
075
076  /**
077   * Defines the set of permissable values for the "quality-of-protection" property.
078   * <p>
079   * The name of a property that specifies the quality of protection
080   * the server will support.
081   */
082  public static enum QualityOfProtection {
083
084    /**
085     * Quality of protection equals authentication with integrity and
086     * confidentiality protection.
087     */
088    CONFIDENTIALITY("confidentiality"),
089
090
091
092    /**
093     * Quality of protection equals authentication with integrity
094     * protection.
095     */
096    INTEGRITY("integrity"),
097
098
099
100    /**
101     * QOP equals authentication only.
102     */
103    NONE("none");
104
105
106
107    // String representation of the value.
108    private final String name;
109
110
111
112    // Private constructor.
113    private QualityOfProtection(String name) { this.name = name; }
114
115
116
117    /**
118     * {@inheritDoc}
119     */
120    public String toString() { return name; }
121
122  }
123
124
125
126  // The "identity-mapper" property definition.
127  private static final AggregationPropertyDefinition<IdentityMapperCfgClient, IdentityMapperCfg> PD_IDENTITY_MAPPER;
128
129
130
131  // The "java-class" property definition.
132  private static final ClassPropertyDefinition PD_JAVA_CLASS;
133
134
135
136  // The "kdc-address" property definition.
137  private static final StringPropertyDefinition PD_KDC_ADDRESS;
138
139
140
141  // The "keytab" property definition.
142  private static final StringPropertyDefinition PD_KEYTAB;
143
144
145
146  // The "principal-name" property definition.
147  private static final StringPropertyDefinition PD_PRINCIPAL_NAME;
148
149
150
151  // The "quality-of-protection" property definition.
152  private static final EnumPropertyDefinition<QualityOfProtection> PD_QUALITY_OF_PROTECTION;
153
154
155
156  // The "realm" property definition.
157  private static final StringPropertyDefinition PD_REALM;
158
159
160
161  // The "server-fqdn" property definition.
162  private static final StringPropertyDefinition PD_SERVER_FQDN;
163
164
165
166  // Build the "identity-mapper" property definition.
167  static {
168      AggregationPropertyDefinition.Builder<IdentityMapperCfgClient, IdentityMapperCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "identity-mapper");
169      builder.setOption(PropertyOption.MANDATORY);
170      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "identity-mapper"));
171      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
172      builder.setParentPath("/");
173      builder.setRelationDefinition("identity-mapper");
174      builder.setTargetNeedsEnablingCondition(Conditions.contains("enabled", "true"));
175      builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true"));
176      PD_IDENTITY_MAPPER = builder.getInstance();
177      INSTANCE.registerPropertyDefinition(PD_IDENTITY_MAPPER);
178      INSTANCE.registerConstraint(PD_IDENTITY_MAPPER.getSourceConstraint());
179  }
180
181
182
183  // Build the "java-class" property definition.
184  static {
185      ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class");
186      builder.setOption(PropertyOption.MANDATORY);
187      builder.setOption(PropertyOption.ADVANCED);
188      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "java-class"));
189      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.extensions.GSSAPISASLMechanismHandler");
190      builder.setDefaultBehaviorProvider(provider);
191      builder.addInstanceOf("org.opends.server.api.SASLMechanismHandler");
192      PD_JAVA_CLASS = builder.getInstance();
193      INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS);
194  }
195
196
197
198  // Build the "kdc-address" property definition.
199  static {
200      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "kdc-address");
201      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "kdc-address"));
202      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "kdc-address"));
203      PD_KDC_ADDRESS = builder.getInstance();
204      INSTANCE.registerPropertyDefinition(PD_KDC_ADDRESS);
205  }
206
207
208
209  // Build the "keytab" property definition.
210  static {
211      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "keytab");
212      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "keytab"));
213      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "keytab"));
214      PD_KEYTAB = builder.getInstance();
215      INSTANCE.registerPropertyDefinition(PD_KEYTAB);
216  }
217
218
219
220  // Build the "principal-name" property definition.
221  static {
222      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "principal-name");
223      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "principal-name"));
224      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "principal-name"));
225      PD_PRINCIPAL_NAME = builder.getInstance();
226      INSTANCE.registerPropertyDefinition(PD_PRINCIPAL_NAME);
227  }
228
229
230
231  // Build the "quality-of-protection" property definition.
232  static {
233      EnumPropertyDefinition.Builder<QualityOfProtection> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "quality-of-protection");
234      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "quality-of-protection"));
235      DefaultBehaviorProvider<QualityOfProtection> provider = new DefinedDefaultBehaviorProvider<QualityOfProtection>("none");
236      builder.setDefaultBehaviorProvider(provider);
237      builder.setEnumClass(QualityOfProtection.class);
238      PD_QUALITY_OF_PROTECTION = builder.getInstance();
239      INSTANCE.registerPropertyDefinition(PD_QUALITY_OF_PROTECTION);
240  }
241
242
243
244  // Build the "realm" property definition.
245  static {
246      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "realm");
247      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "realm"));
248      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "realm"));
249      PD_REALM = builder.getInstance();
250      INSTANCE.registerPropertyDefinition(PD_REALM);
251  }
252
253
254
255  // Build the "server-fqdn" property definition.
256  static {
257      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "server-fqdn");
258      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "server-fqdn"));
259      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "server-fqdn"));
260      PD_SERVER_FQDN = builder.getInstance();
261      INSTANCE.registerPropertyDefinition(PD_SERVER_FQDN);
262  }
263
264
265
266  // Register the tags associated with this managed object definition.
267  static {
268    INSTANCE.registerTag(Tag.valueOf("security"));
269  }
270
271
272
273  /**
274   * Get the GSSAPI SASL Mechanism Handler configuration definition
275   * singleton.
276   *
277   * @return Returns the GSSAPI SASL Mechanism Handler configuration
278   *         definition singleton.
279   */
280  public static GSSAPISASLMechanismHandlerCfgDefn getInstance() {
281    return INSTANCE;
282  }
283
284
285
286  /**
287   * Private constructor.
288   */
289  private GSSAPISASLMechanismHandlerCfgDefn() {
290    super("gssapi-sasl-mechanism-handler", SASLMechanismHandlerCfgDefn.getInstance());
291  }
292
293
294
295  /**
296   * {@inheritDoc}
297   */
298  public GSSAPISASLMechanismHandlerCfgClient createClientConfiguration(
299      ManagedObject<? extends GSSAPISASLMechanismHandlerCfgClient> impl) {
300    return new GSSAPISASLMechanismHandlerCfgClientImpl(impl);
301  }
302
303
304
305  /**
306   * {@inheritDoc}
307   */
308  public GSSAPISASLMechanismHandlerCfg createServerConfiguration(
309      ServerManagedObject<? extends GSSAPISASLMechanismHandlerCfg> impl) {
310    return new GSSAPISASLMechanismHandlerCfgServerImpl(impl);
311  }
312
313
314
315  /**
316   * {@inheritDoc}
317   */
318  public Class<GSSAPISASLMechanismHandlerCfg> getServerConfigurationClass() {
319    return GSSAPISASLMechanismHandlerCfg.class;
320  }
321
322
323
324  /**
325   * Get the "enabled" property definition.
326   * <p>
327   * Indicates whether the SASL mechanism handler is enabled for use.
328   *
329   * @return Returns the "enabled" property definition.
330   */
331  public BooleanPropertyDefinition getEnabledPropertyDefinition() {
332    return SASLMechanismHandlerCfgDefn.getInstance().getEnabledPropertyDefinition();
333  }
334
335
336
337  /**
338   * Get the "identity-mapper" property definition.
339   * <p>
340   * Specifies the name of the identity mapper that is to be used with
341   * this SASL mechanism handler to match the Kerberos principal
342   * included in the SASL bind request to the corresponding user in the
343   * directory.
344   *
345   * @return Returns the "identity-mapper" property definition.
346   */
347  public AggregationPropertyDefinition<IdentityMapperCfgClient, IdentityMapperCfg> getIdentityMapperPropertyDefinition() {
348    return PD_IDENTITY_MAPPER;
349  }
350
351
352
353  /**
354   * Get the "java-class" property definition.
355   * <p>
356   * Specifies the fully-qualified name of the Java class that
357   * provides the SASL mechanism handler implementation.
358   *
359   * @return Returns the "java-class" property definition.
360   */
361  public ClassPropertyDefinition getJavaClassPropertyDefinition() {
362    return PD_JAVA_CLASS;
363  }
364
365
366
367  /**
368   * Get the "kdc-address" property definition.
369   * <p>
370   * Specifies the address of the KDC that is to be used for Kerberos
371   * processing.
372   * <p>
373   * If provided, this property must be a fully-qualified
374   * DNS-resolvable name. If this property is not provided, then the
375   * server attempts to determine it from the system-wide Kerberos
376   * configuration.
377   *
378   * @return Returns the "kdc-address" property definition.
379   */
380  public StringPropertyDefinition getKdcAddressPropertyDefinition() {
381    return PD_KDC_ADDRESS;
382  }
383
384
385
386  /**
387   * Get the "keytab" property definition.
388   * <p>
389   * Specifies the path to the keytab file that should be used for
390   * Kerberos processing.
391   * <p>
392   * If provided, this is either an absolute path or one that is
393   * relative to the server instance root.
394   *
395   * @return Returns the "keytab" property definition.
396   */
397  public StringPropertyDefinition getKeytabPropertyDefinition() {
398    return PD_KEYTAB;
399  }
400
401
402
403  /**
404   * Get the "principal-name" property definition.
405   * <p>
406   * Specifies the principal name.
407   * <p>
408   * It can either be a simple user name or a service name such as
409   * host/example.com. If this property is not provided, then the
410   * server attempts to build the principal name by appending the fully
411   * qualified domain name to the string "ldap/".
412   *
413   * @return Returns the "principal-name" property definition.
414   */
415  public StringPropertyDefinition getPrincipalNamePropertyDefinition() {
416    return PD_PRINCIPAL_NAME;
417  }
418
419
420
421  /**
422   * Get the "quality-of-protection" property definition.
423   * <p>
424   * The name of a property that specifies the quality of protection
425   * the server will support.
426   *
427   * @return Returns the "quality-of-protection" property definition.
428   */
429  public EnumPropertyDefinition<QualityOfProtection> getQualityOfProtectionPropertyDefinition() {
430    return PD_QUALITY_OF_PROTECTION;
431  }
432
433
434
435  /**
436   * Get the "realm" property definition.
437   * <p>
438   * Specifies the realm to be used for GSSAPI authentication.
439   *
440   * @return Returns the "realm" property definition.
441   */
442  public StringPropertyDefinition getRealmPropertyDefinition() {
443    return PD_REALM;
444  }
445
446
447
448  /**
449   * Get the "server-fqdn" property definition.
450   * <p>
451   * Specifies the DNS-resolvable fully-qualified domain name for the
452   * system.
453   *
454   * @return Returns the "server-fqdn" property definition.
455   */
456  public StringPropertyDefinition getServerFqdnPropertyDefinition() {
457    return PD_SERVER_FQDN;
458  }
459
460
461
462  /**
463   * Managed object client implementation.
464   */
465  private static class GSSAPISASLMechanismHandlerCfgClientImpl implements
466    GSSAPISASLMechanismHandlerCfgClient {
467
468    // Private implementation.
469    private ManagedObject<? extends GSSAPISASLMechanismHandlerCfgClient> impl;
470
471
472
473    // Private constructor.
474    private GSSAPISASLMechanismHandlerCfgClientImpl(
475        ManagedObject<? extends GSSAPISASLMechanismHandlerCfgClient> impl) {
476      this.impl = impl;
477    }
478
479
480
481    /**
482     * {@inheritDoc}
483     */
484    public Boolean isEnabled() {
485      return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
486    }
487
488
489
490    /**
491     * {@inheritDoc}
492     */
493    public void setEnabled(boolean value) {
494      impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value);
495    }
496
497
498
499    /**
500     * {@inheritDoc}
501     */
502    public String getIdentityMapper() {
503      return impl.getPropertyValue(INSTANCE.getIdentityMapperPropertyDefinition());
504    }
505
506
507
508    /**
509     * {@inheritDoc}
510     */
511    public void setIdentityMapper(String value) {
512      impl.setPropertyValue(INSTANCE.getIdentityMapperPropertyDefinition(), value);
513    }
514
515
516
517    /**
518     * {@inheritDoc}
519     */
520    public String getJavaClass() {
521      return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
522    }
523
524
525
526    /**
527     * {@inheritDoc}
528     */
529    public void setJavaClass(String value) {
530      impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value);
531    }
532
533
534
535    /**
536     * {@inheritDoc}
537     */
538    public String getKdcAddress() {
539      return impl.getPropertyValue(INSTANCE.getKdcAddressPropertyDefinition());
540    }
541
542
543
544    /**
545     * {@inheritDoc}
546     */
547    public void setKdcAddress(String value) {
548      impl.setPropertyValue(INSTANCE.getKdcAddressPropertyDefinition(), value);
549    }
550
551
552
553    /**
554     * {@inheritDoc}
555     */
556    public String getKeytab() {
557      return impl.getPropertyValue(INSTANCE.getKeytabPropertyDefinition());
558    }
559
560
561
562    /**
563     * {@inheritDoc}
564     */
565    public void setKeytab(String value) {
566      impl.setPropertyValue(INSTANCE.getKeytabPropertyDefinition(), value);
567    }
568
569
570
571    /**
572     * {@inheritDoc}
573     */
574    public String getPrincipalName() {
575      return impl.getPropertyValue(INSTANCE.getPrincipalNamePropertyDefinition());
576    }
577
578
579
580    /**
581     * {@inheritDoc}
582     */
583    public void setPrincipalName(String value) {
584      impl.setPropertyValue(INSTANCE.getPrincipalNamePropertyDefinition(), value);
585    }
586
587
588
589    /**
590     * {@inheritDoc}
591     */
592    public QualityOfProtection getQualityOfProtection() {
593      return impl.getPropertyValue(INSTANCE.getQualityOfProtectionPropertyDefinition());
594    }
595
596
597
598    /**
599     * {@inheritDoc}
600     */
601    public void setQualityOfProtection(QualityOfProtection value) {
602      impl.setPropertyValue(INSTANCE.getQualityOfProtectionPropertyDefinition(), value);
603    }
604
605
606
607    /**
608     * {@inheritDoc}
609     */
610    public String getRealm() {
611      return impl.getPropertyValue(INSTANCE.getRealmPropertyDefinition());
612    }
613
614
615
616    /**
617     * {@inheritDoc}
618     */
619    public void setRealm(String value) {
620      impl.setPropertyValue(INSTANCE.getRealmPropertyDefinition(), value);
621    }
622
623
624
625    /**
626     * {@inheritDoc}
627     */
628    public String getServerFqdn() {
629      return impl.getPropertyValue(INSTANCE.getServerFqdnPropertyDefinition());
630    }
631
632
633
634    /**
635     * {@inheritDoc}
636     */
637    public void setServerFqdn(String value) {
638      impl.setPropertyValue(INSTANCE.getServerFqdnPropertyDefinition(), value);
639    }
640
641
642
643    /**
644     * {@inheritDoc}
645     */
646    public ManagedObjectDefinition<? extends GSSAPISASLMechanismHandlerCfgClient, ? extends GSSAPISASLMechanismHandlerCfg> definition() {
647      return INSTANCE;
648    }
649
650
651
652    /**
653     * {@inheritDoc}
654     */
655    public PropertyProvider properties() {
656      return impl;
657    }
658
659
660
661    /**
662     * {@inheritDoc}
663     */
664    public void commit() throws ManagedObjectAlreadyExistsException,
665        MissingMandatoryPropertiesException, ConcurrentModificationException,
666        OperationRejectedException, LdapException {
667      impl.commit();
668    }
669
670  }
671
672
673
674  /**
675   * Managed object server implementation.
676   */
677  private static class GSSAPISASLMechanismHandlerCfgServerImpl implements
678    GSSAPISASLMechanismHandlerCfg {
679
680    // Private implementation.
681    private ServerManagedObject<? extends GSSAPISASLMechanismHandlerCfg> impl;
682
683    // The value of the "enabled" property.
684    private final boolean pEnabled;
685
686    // The value of the "identity-mapper" property.
687    private final String pIdentityMapper;
688
689    // The value of the "java-class" property.
690    private final String pJavaClass;
691
692    // The value of the "kdc-address" property.
693    private final String pKdcAddress;
694
695    // The value of the "keytab" property.
696    private final String pKeytab;
697
698    // The value of the "principal-name" property.
699    private final String pPrincipalName;
700
701    // The value of the "quality-of-protection" property.
702    private final QualityOfProtection pQualityOfProtection;
703
704    // The value of the "realm" property.
705    private final String pRealm;
706
707    // The value of the "server-fqdn" property.
708    private final String pServerFqdn;
709
710
711
712    // Private constructor.
713    private GSSAPISASLMechanismHandlerCfgServerImpl(ServerManagedObject<? extends GSSAPISASLMechanismHandlerCfg> impl) {
714      this.impl = impl;
715      this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
716      this.pIdentityMapper = impl.getPropertyValue(INSTANCE.getIdentityMapperPropertyDefinition());
717      this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
718      this.pKdcAddress = impl.getPropertyValue(INSTANCE.getKdcAddressPropertyDefinition());
719      this.pKeytab = impl.getPropertyValue(INSTANCE.getKeytabPropertyDefinition());
720      this.pPrincipalName = impl.getPropertyValue(INSTANCE.getPrincipalNamePropertyDefinition());
721      this.pQualityOfProtection = impl.getPropertyValue(INSTANCE.getQualityOfProtectionPropertyDefinition());
722      this.pRealm = impl.getPropertyValue(INSTANCE.getRealmPropertyDefinition());
723      this.pServerFqdn = impl.getPropertyValue(INSTANCE.getServerFqdnPropertyDefinition());
724    }
725
726
727
728    /**
729     * {@inheritDoc}
730     */
731    public void addGSSAPIChangeListener(
732        ConfigurationChangeListener<GSSAPISASLMechanismHandlerCfg> listener) {
733      impl.registerChangeListener(listener);
734    }
735
736
737
738    /**
739     * {@inheritDoc}
740     */
741    public void removeGSSAPIChangeListener(
742        ConfigurationChangeListener<GSSAPISASLMechanismHandlerCfg> listener) {
743      impl.deregisterChangeListener(listener);
744    }
745    /**
746     * {@inheritDoc}
747     */
748    public void addChangeListener(
749        ConfigurationChangeListener<SASLMechanismHandlerCfg> listener) {
750      impl.registerChangeListener(listener);
751    }
752
753
754
755    /**
756     * {@inheritDoc}
757     */
758    public void removeChangeListener(
759        ConfigurationChangeListener<SASLMechanismHandlerCfg> listener) {
760      impl.deregisterChangeListener(listener);
761    }
762
763
764
765    /**
766     * {@inheritDoc}
767     */
768    public boolean isEnabled() {
769      return pEnabled;
770    }
771
772
773
774    /**
775     * {@inheritDoc}
776     */
777    public String getIdentityMapper() {
778      return pIdentityMapper;
779    }
780
781
782
783    /**
784     * {@inheritDoc}
785     */
786    public DN getIdentityMapperDN() {
787      String value = getIdentityMapper();
788      if (value == null) return null;
789      return INSTANCE.getIdentityMapperPropertyDefinition().getChildDN(value);
790    }
791
792
793
794    /**
795     * {@inheritDoc}
796     */
797    public String getJavaClass() {
798      return pJavaClass;
799    }
800
801
802
803    /**
804     * {@inheritDoc}
805     */
806    public String getKdcAddress() {
807      return pKdcAddress;
808    }
809
810
811
812    /**
813     * {@inheritDoc}
814     */
815    public String getKeytab() {
816      return pKeytab;
817    }
818
819
820
821    /**
822     * {@inheritDoc}
823     */
824    public String getPrincipalName() {
825      return pPrincipalName;
826    }
827
828
829
830    /**
831     * {@inheritDoc}
832     */
833    public QualityOfProtection getQualityOfProtection() {
834      return pQualityOfProtection;
835    }
836
837
838
839    /**
840     * {@inheritDoc}
841     */
842    public String getRealm() {
843      return pRealm;
844    }
845
846
847
848    /**
849     * {@inheritDoc}
850     */
851    public String getServerFqdn() {
852      return pServerFqdn;
853    }
854
855
856
857    /**
858     * {@inheritDoc}
859     */
860    public Class<? extends GSSAPISASLMechanismHandlerCfg> configurationClass() {
861      return GSSAPISASLMechanismHandlerCfg.class;
862    }
863
864
865
866    /**
867     * {@inheritDoc}
868     */
869    public DN dn() {
870      return impl.getDN();
871    }
872
873  }
874}